Repository navigation
fix(#1069): merge origin/main into pushed branches instead of rebasing before PR - #1120
Merged
admarble merged 3 commits intoSep 20, 2026
Conversation
…g before PR Entire-Checkpoint: b1850a37d976
…fails mid-way so createPR never sees MERGE_HEAD
…s run on identity-less CI runners
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
rebaseBeforePRnow mergesorigin/mainwhen the branch is already pushed (upstream exists and is not the base ref), so no pushed SHA is rewritten; unpushed branches still rebase.worktree add -b … origin/mainbranch tracksorigin/mainby default, so a bare@{u}check would have merged every first run; the probe excludes the base ref (spec AC-5).merge --abortand leave HEAD untouched (spec AC-6). The printed line ismerged origin/mainorrebased onto origin/main.spawnSyncmocks insrc/commands/run.test.tsupdated for the added probe calls.batch-executor.tsneeded no change (call site unchanged).Acceptance criteria
src/lib/workflow/worktree-manager.test.tscasepushed branch merges and keeps SHAsno upstream rebases, plusfresh worktree branch tracking origin/main still rebasesreports merge vs rebasenpm run buildandnpm run lintpass locally; fullnpm testis left to the runner per the launch rules. Ranworktree-manager.test.tsandrun.test.ts: 148 passed.Test plan
npx vitest run src/lib/workflow/worktree-manager.test.ts -t 1069(5 passed, real git, no mocks)npm run build,npm run lintMutation-verified: AC-1 — forced
pushed = false(unconditional rebase);pushed branch merges and keeps SHAsfailed; restored.Closes #1069
🤖 Generated with Claude Code
Runner verification (guard-2026-09 wave 2, 2026-09-20)
4f3328dc.git clone(4f3328dc); a merge that fails after staging is aborted socreatePRnever seesMERGE_HEAD(fb95d910). A widening of push detection toorigin/<branch>was tried and reverted: AC-1/AC-2 are literal about@{u}, the exec skill pushes with-u, and the mockedrun.test.tscases assume the@{u}call shape.worktree-manager.test.ts+run.test.ts(148 passed) and the five bug(qa): the qa phase rebases an already-pushed branch onto main, forcing a force-push to land it #1069 cases under an identity-less git (user.useConfigOnly, 5 passed); both markers classifier-valid; nobatch-executor.tschange was needed.npm testfrom a clean shell on4f3328dc: 330 files, 6620 passed, 3 expected fail, 3 skipped, 349 s. CI green on the same head.