Skip to content

ci: close issues resolved by a next-to-main promotion #523

Closed

Description

@ss-o

Issues in next-model repositories stay open after their fix merges, because GitHub only runs closing keywords when a pull request merges into the default branch. A Closes #N in a next-targeted pull request has no effect.

Evidence

An organization-wide issue review on 2026-08-19 found eight issues open with the fix already merged. All eight have now been closed manually:

Issue Resolved by Merged into next
z-shell/zi#343 zi#365 2026-08-15
z-shell/zi#354 zi#355 2026-08-15
z-shell/zi#367 zi#368 2026-08-15
z-shell/zi#369 zi#370 2026-08-15
z-shell/zi#371 zi#372 2026-08-15
z-shell/zi#374 zi#375 2026-08-15
z-shell/src#180 src#181 2026-08-16
z-shell/zsh-eza#93 zsh-eza#97 2026-08-16

This is not a one-off. It recurs after every merge wave on next, and the backlog silently overstates open work in the interim.

Proposed work

Add a "close issues resolved by this promotion" step to the promotion checklist, so the closure happens at a defined point rather than during ad hoc cleanup. decisions/0008-branching-model.md and the promotion gate in z-shell/zi#377 are the natural homes.

Two cases that must not be swept up

Automation here must read the keyword and its qualifier, not merely an issue reference:

  • z-shell/zi#364: PR zi#366 says only Refs #364.
  • z-shell/zi#360: PR zi#363 says Closes #360 after ancestry, CI, and PR-routing follow-up are verified.

Both are legitimately still open.

Related

  • z-shell/zi#377 release: gate next-to-main promotions and define rollback readiness
  • z-shell/.github#513 docs(branching): define promotion trigger criteria for next -> main repos

Activity

  1. added
    type:maintenanceNon-feature maintenance, cleanup, or org work.
    area:ciContinuous integration or GitHub Actions work.
    meta:org-trackedIndicates this issue has cross-repository tracking implications (synced to Linear).
    on Aug 18, 2026
  2. ss-o commented on Sep 30, 2026

    @ss-o
    MemberAuthor

    Project 28 triage pass. Blank values filled on this issue (existing values left unchanged):

    • Impact: Medium. Recurs after every merge wave on next, and the backlog overstates open work (eight issues in one review).
    • Effort: S. The proposed first step is one checklist step in the branching ADR and the zi promotion gate.
  3. ss-o commented on Oct 1, 2026

    @ss-o
    MemberAuthor

    Project 28 triage pass (2026-10-02): stays in Triage.

    • Premise check on main at b849468 (premise confirmed): At b849468 runbooks/pull-requests.md section 4 says 'Close those issues by hand when next is promoted to main, not earlier (zi's AGENTS.md)' and zi AGENTS.md@next line 35 says the same, but neither decisions/0008-branching-model.md, decisions/0016, decisions/0028 nor runbooks/release.md 'Zi promotion publication' contains a promotion-time 'close issues resolved by this promotion' step (grep for close/resolved: no match). zi#377 and .github#513 are CLOSED; no merged PR references ci: close issues resolved by a next-to-main promotion #523.
    • Proposed disposition: implement, once the open points below are agreed.
    • Unknowns and next investigation: Unknown: whether the maintainer considers the existing pull-requests.md section-4 rule plus zi AGENTS.md sufficient (then close-completed), or wants the explicit checklist step in runbooks/release.md 'Zi promotion publication' (and/or ADR-0008), and whether automation that reads the keyword qualifier is in scope or explicitly out. Next: maintainer picks the home (release.md step vs ADR-0008 vs close as covered); if a step is wanted it is a one-paragraph docs PR.
  4. ss-o commented on Oct 8, 2026

    @ss-o
    MemberAuthor

    Disposition: automate. The maintainer chose closing at promotion time over a checklist step.

    • ci(promotion): close issues delivered by a next promotion zi#596 adds the Promotion Issue Closure workflow. On a push to main that is a merged next to main promotion, it closes each issue a promoted pull request names in an unqualified closing clause, with a comment naming the promotion. The two cases above stay open: Refs #364 is not a closing clause, and Closes #360 after ... is qualified. Both kinds, plus cross-repository references and issue URLs, are listed in the run summary for a manual check.
    • GitHub's closingIssuesReferences is not used: it is empty for zi#592 although the body says Closes #538., so the workflow parses pull request bodies.
    • docs(runbooks): close zi issues by workflow at promotion #763 updates runbooks/pull-requests.md; it should merge after zi#596 is promoted to main.

    This issue can close once zi#596 is promoted and the first promotion run is checked.

  5. ss-o commented on Oct 8, 2026

    @ss-o
    MemberAuthor

    Delivered by z-shell/zi#596 and z-shell/zi#603, with the organization runbook updated in #763. Promotion z-shell/zi#617 exercised the workflow successfully on main commit 199bbcafddde93ab22f3fcf9e000e81ac3a75385: https://github.com/z-shell/zi/actions/runs/37786546853.

    The workflow reads unqualified closing keywords from the merged constituent PRs, preserves reference-only and qualified statements, and reports sidebar-linked issues for review. The reviewed parser and workflow tests cover those exclusions. Issue z-shell/zi#615 was closed by this promotion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:ciContinuous integration or GitHub Actions work.meta:org-trackedIndicates this issue has cross-repository tracking implications (synced to Linear).type:maintenanceNon-feature maintenance, cleanup, or org work.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions