Repository navigation
fix(ci): fast-forward dev to the release-branch mirror sync commit - #1121
Merged
Merged
Conversation
The dev-side mirror reconcile must share ancestry with the release branch: the extension fast-forwards dev to the release-branch sync commit (non-force ref update, only while dev still sits on the freeze commit) instead of minting a sibling commit, so the post-promote sync-main-to-dev merge sees the mirror rewrite as common history. Fallback to the sibling-commit reconcile stays pinned for the dev-advanced race. Refs: #1115
The extension previously minted a sibling reconcile commit on dev (same parent and tree as the release-branch sync commit, distinct object), so the mirror's merge base at post-promote sync time was the stale pre-freeze content and sync-main-to-dev conflicted on the mirror every release cycle. Fast-forwarding dev to the release branch's sync commit makes the mirror rewrite shared ancestry, the same property that keeps the root changelog conflict-free. Dev-advanced races and ref-update failures fall back to the sibling-commit reconcile (status quo). Every rollback failure path still leaves dev's root+mirror consistent. Refs: #1115
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every release cycle the post-promote
sync-main-to-devPR conflicted on exactly one file: the workspace changelog mirrorassets/workspace/.devcontainer/CHANGELOG.md(#1091, #1114). Root cause, verified on the 1.2.1 cycle: the prepare extension minted the mirror reconcile as a sibling commit ondev(11ff0e1c) — same parent (freeze849b324a) and same tree (d5b4f190) as the release-branch sync commit (e727daf0), but a distinct object. Dev's copy was never an ancestor of the release branch, so the mirror's merge base at sync time was the stale pre-freeze content → deterministic overlap conflict. The root changelog merges clean precisely because the freeze commit is shared ancestry.Fix
After the extension commits the mirror sync to the release branch, fast-forward
devto that commit (non-force refPATCHvia the COMMIT_APP token) — but only while dev still sits on the freeze commit (inputs.branch_sha). Both branches then share the literal commit object, giving the mirror the same shared-ancestry property that already keeps the root changelog conflict-free.commit-shaoutput, not a fresh ref read (avoids the read-after-write ref lag documented in [BUG] prepare-release can branch release/X.Y.Z at pre-freeze dev SHA (read-after-write race) #617).force=falsemakes the update FF-only and atomic: a dev that advanced in the race window can never be clobbered. Deliberately not retried — a legitimate non-FF rejection must not be retried; transient failures degrade to the fallback.ff_done != 'true', and the fallback reconcile commit stays the job's last step — every failure path still leaves dev's root+mirror consistent under prepare-release.yml's dev-advanced guard. Header comment rewritten with the full analysis.Devkit-local change only:
prepare-release.ymlstays scaffold-verbatim; the consumer no-op scaffold extension is untouched.Verification
5f991fa2pins the new invariants (3 red structural tests),71dc5d79turns them green —tests/test_workflow_prepare_extension.py: 18 passed.steps.*.outputsreferences andifexpressions).git merge-tree --write-treeconflicts on the mirror (reproduces chore: sync dev with main (conflicts) #1114); dev fast-forwarded to the release-branch sync commit instead → same merge is clean.Closes #1115