Catch up a moved main in the delivery gate before landing
When canonical main is not an ancestor of the item HEAD, the gate now merges main into the item workspace under the delivery lock, re-runs the declared checks on the merged commit, and fast-forwards main to it. A conflicting merge is aborted with the workspace verified unchanged and a diagnostic naming the files. Successful catch-ups are logged.
This commit is contained in:
@@ -45,3 +45,19 @@ change.
|
||||
Recovery checklist: retain `connection-reconnect` and unfinished feature
|
||||
branches; merge only complete committed trees that pass mapped checks; do not
|
||||
infer delivery from a dirty worktree or an old deployed-backend capture.
|
||||
|
||||
## Catch-up merge when main moved (2026-10-31)
|
||||
|
||||
Two delivery runs finishing close together used to fail the second with
|
||||
"delivery item commit cannot fast-forward canonical main" (run #211), although a
|
||||
retry of its Land stage succeeded. Now, while holding the delivery lock, the gate
|
||||
merges canonical main's HEAD into the item workspace (`git merge --no-edit`, an
|
||||
ordinary merge commit), runs the declared checks on the merged commit in the
|
||||
disposable candidate worktree, and only then fast-forwards main. A conflicting
|
||||
merge is aborted, the workspace is verified back at its prior commit and clean,
|
||||
and the step fails with "main moved and the item no longer merges cleanly:
|
||||
<files>". If checks fail on the merged tree, main is untouched; the merge commit
|
||||
stays on the item branch and the diagnostic names the catch-up. A successful
|
||||
catch-up is written to the server log (a success-step diagnostic renders as a
|
||||
stop in the TUI). Nothing is forced onto main and history is never rewritten;
|
||||
the clean-checkout, access and ancestry checks are unchanged.
|
||||
|
||||
Reference in New Issue
Block a user