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
Merge a Reported Promotion With --match-head-commit Set to the Reported Head, Not a Fresh Read #2505
merge-and-release "The Procedure" step 2 records the promotion's live head, compares it against the head drive-pr's ready report named, and stops to re-ask where they differ. Step 3 then merges with --match-head-commit <recorded-sha>.
On #2502 the head moved between the ready report and the merge. A peer lane squashed #2503 into develop in between. The session read the live head and merged it in one command, so the comparison never ran, and the merge took #2503 to main past the maintainer's go-ahead. --match-head-commit could not catch it, because it was handed the head the same command had just read. The maintainer then chose to release both, but nothing mechanical stopped the merge.
Why it recurs
The comparison is a prose step between two commands. The guard the server enforces, --match-head-commit, protects only against movement after the live read, which is the smaller window. The larger window runs from the report to the read, and it is guarded by nothing but the agent remembering to compare.
Shape of a fix
Where a ready report named a head, pass that reported SHA to --match-head-commit, rather than the live read. The server then refuses a merge whose head moved at any point after the report. The stop-and-re-ask in step 2 becomes the handling of that refusal, rather than a check the agent has to remember. A promotion made ready by hand, which has no report, keeps the live read as it does now.
Activity
Guard a Promotion Merge with the Head the Go-Ahead Covers (#2511)
Promote develop to main: Guard a Promotion Merge with the Head the Go…