You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: close issues resolved by a next-to-main promotion #523
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
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.
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.
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.
Activity
ss-o commentedon Sep 30, 2026
Project 28 triage pass. Blank values filled on this issue (existing values left unchanged):
Medium. Recurs after every merge wave onnext, and the backlog overstates open work (eight issues in one review).S. The proposed first step is one checklist step in the branching ADR and the zi promotion gate.ss-o commentedon Oct 1, 2026
Project 28 triage pass (2026-10-02): stays in
Triage.mainatb849468(premise confirmed): At b849468 runbooks/pull-requests.md section 4 says 'Close those issues by hand whennextis promoted tomain, not earlier (zi'sAGENTS.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.ss-o commentedon Oct 8, 2026
Disposition: automate. The maintainer chose closing at promotion time over a checklist step.
Promotion Issue Closureworkflow. On a push tomainthat is a mergednexttomainpromotion, 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 #364is not a closing clause, andCloses #360 after ...is qualified. Both kinds, plus cross-repository references and issue URLs, are listed in the run summary for a manual check.closingIssuesReferencesis not used: it is empty for zi#592 although the body saysCloses #538., so the workflow parses pull request bodies.runbooks/pull-requests.md; it should merge after zi#596 is promoted tomain.This issue can close once zi#596 is promoted and the first promotion run is checked.
fix(promotion): report edited bodies and late qualified clauses
ci(promotion): close issues delivered by a next promotion (#596)
fix(promotion): retry late PR lookup and list sidebar-linked issues (#…
docs(runbooks): name edited bodies and the manual close in zi
ss-o commentedon Oct 8, 2026
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.