Skip to content

fix(release): merge concurrent main updates - #858

Merged
code-yeongyu merged 1 commit into
mainfrom
fix/release-main-race
Aug 13, 2026
Merged

fix(release): merge concurrent main updates#858
code-yeongyu merged 1 commit into
mainfrom
fix/release-main-race

Conversation

@code-yeongyu

@code-yeongyu code-yeongyu commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Problem

Release preparation completed versioning, clean build, and the full serial test gate, then failed at git push origin main because PR #853 merged while the release was running. The release branch was non-fast-forward even though every release artifact was already verified.

Failed run: https://github.com/code-yeongyu/senpi/actions/runs/31680010156

Fix

  • Fetch origin/main after the release tag and next-cycle commit are created.
  • If remote main advanced, merge it with a normal two-parent commit before pushing main.
  • Keep the release tag anchored to the already verified release commit.
  • Add unit coverage for advanced, already-contained, dry-run, and call-order paths.

Verification

  • Failing-first source proof confirms the old release flow had no pre-push synchronization.
  • Focused tests: 4/4 passed.
  • Root script suite: passed.
  • npm run check: passed.
  • Real two-clone Git simulation: concurrent main commit was preserved, next-cycle HEAD became a two-parent merge, and the release tag remained on the verified release commit.
  • No v2026.8.13 tag or npm version exists.

Summary by cubic

Synchronizes and merges concurrent origin/main updates during release before pushing to prevent non-fast-forward failures. Previously we pushed without syncing; now we fetch origin/main after creating the release tag and next-cycle commit and merge if needed, keeping the tag on the verified commit.

  • Adds scripts/release-git.mjs and calls syncRemoteMainBeforePush in scripts/release.mjs after the next-cycle commit and before both pushes.
  • If origin/main is not an ancestor, creates a two-parent merge on main; release artifacts and tag remain unchanged.
  • Dry-run previews the fetch and conditional merge; unit tests cover advanced, already-contained, dry-run, and call order.

Written for commit 54bcd71. Summary will update on new commits.

Review in cubic

@code-yeongyu
code-yeongyu merged commit 72ec6d3 into main Aug 13, 2026
@code-yeongyu
code-yeongyu deleted the fix/release-main-race branch August 13, 2026 08:09
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