Repository navigation
fix(#1406): a non-default bare --base is cut from local <base> but counted against origin/<base> (#1380 follow-up, #1234/#1386 class) - #1479
Merged
admarble merged 3 commits intoOct 16, 2026
Conversation
creation, recreate and the recorded base now share one ref Entire-Checkpoint: bee26b292e0a
Entire-Checkpoint: babd04a25b75
…tree-a-non-default-bare-base-is-cut-from-l
admarble
deleted the
feature/1406-fix-worktree-a-non-default-bare-base-is-cut-from-l
branch
October 16, 2026 23:11
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
A non-default bare
--base(e.g.release) was cut from the local branch but counted as stale againstorigin/<base>, so a lagging localreleaseproduced a worktree that was already behind.computeWorktreeBaseRefnow returnsorigin/<base>when the remote has it, except in chain mode, so creation, staleness (countCommitsBehind) and the recordedsequantBaseRefread one ref. The base is resolved after the fetch, which now runs for every non-chain base (a failed fetch is tolerated, so a local-only base still works). A--stackedpredecessor and a base with noorigin/<base>stay bare, as before.Fixes #1406
Acceptance criteria
worktree-manager.test.ts› "1406 a lagging local base: the worktree is cut from origin/". Mutation recorded belowtestjob on this PRRunner check:
npx vitest run src/lib/workflow/worktree-manager.test.tson the unmodified branch gives 71/71 passed.Mutation verification
Mutation-verified: AC-1 — deleted the line in
computeWorktreeBaseRefthat returns origin/baseBranch when not in chain mode and the remote has it;worktree-manager.test.ts > #1234 ensureWorktree records sequantBaseRef > 1406 a lagging local base: the worktree is cut from origin/<base>failed (1 failed, 70 passed); restored.🤖 Generated by
sequant run; body rewritten by the graph runner.