Skip to content

docs(branching): fix the promotion template ancestry precondition - #462

Merged
ss-o merged 1 commit into
nextfrom
bug-461
Aug 30, 2026
Merged

docs(branching): fix the promotion template ancestry precondition#462
ss-o merged 1 commit into
nextfrom
bug-461

Conversation

@ss-o

@ss-o ss-o commented Aug 30, 2026

Copy link
Copy Markdown
Member

Summary

Fixes the promotion precondition in .github/PULL_REQUEST_TEMPLATE/promotion.md,
which required a check that cannot pass after any successful promotion.

Closes #461

Problem

Line 19 of the promotion readiness record required:

- [ ] `git merge-base --is-ancestor <prior-main> <candidate-next>` succeeds.

Promotion creates a merge commit on main that never reaches next, so main
stops being an ancestor of next as soon as a promotion lands. The template
then instructed the maintainer to stop and reconcile, on every promotion,
including healthy ones.

Three no-content reconciliation merges have already landed here as a result:
9a4fa51, b0ebcc3, and 73df7bf. git diff --name-only <merge>^1 <merge>
returns zero files for each.

Change

Replaces the checklist item with an empty three-dot content diff and corrects
the accompanying guidance to identify a genuinely omitted commit with
git log --oneline <candidate-next>..<prior-main>.

Verification

Scenario old check new check Correct
Just promoted, healthy fail pass pass
Work continued on next, healthy fail pass pass
Unmerged hotfix on main fail fail fail
Hotfix synchronized forward pass pass pass

The third row confirms a genuine stable-only commit is still caught, so this
removes a false negative without weakening the gate.

Against the live pending candidate:

git merge-base --is-ancestor origin/main origin/next   ->  fails
git diff --name-only origin/next...origin/main         ->  empty

trunk check reports no issues on the changed file.

Dependency

The canonical rule is corrected in z-shell/.github#574, which closes
z-shell/.github#573. This repository-local template must be fixed too, or the
impossible check is reimposed on the promotion pull request even after the
runbook is correct.

Both should land before the pending next to main promotion.

The promotion readiness record required
`git merge-base --is-ancestor <prior-main> <candidate-next>`. That check cannot
pass once any promotion has landed, because the promotion merge commit exists
only on `main` and never reaches `next`.

Replace it with an empty three-dot content diff, matching the corrected
procedure in the organization branch-protection runbook. The diff confirms
`main` carries no content the candidate lacks and still fails when a genuine
stable-only commit, such as an unmerged hotfix, is missing.
@ss-o
ss-o merged commit 9fe6d31 into next Aug 30, 2026
8 checks passed
@ss-o
ss-o deleted the bug-461 branch August 30, 2026 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant