Repository navigation
fix(#1386): --base creates the worktree from the branch but opens the PR against the repo default branch - #1394
Merged
admarble merged 4 commits intoOct 10, 2026
Conversation
Entire-Checkpoint: 007e4b4eef8e
Entire-Checkpoint: 750054fd873f
Entire-Checkpoint: 3b711153e46a
Entire-Checkpoint: 651241c99501
admarble
deleted the
feature/1386-fix-run-base-creates-the-worktree-from-the-branch-
branch
October 10, 2026 13:53
This was referenced Oct 10, 2026
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
sequant run <N> --base <branch>built the worktree from<branch>and rebased onto it, but opened the PR against the repo's default branch.createPRonly got a base under--stacked(stackOptions.prBase).Now the run's one resolved base (
ResolvedRun.baseBranch, from--base, thensettings.run.defaultBase, then the detected default) reachescreatePR. That is the same value worktree creation andrebaseBeforePRalready used.resolvePrBaseinworktree-manager.tspicks the PR target:--stackedpredecessor if there is one;origin/prefix, when it isn't the repo default;ghkeeps the repo default as before.It adds no second resolver (graph doc D-2). The create path and the update-existing-PR path (#1247) use the same value.
Fixes #1386
Acceptance criteria
--basewithout--stackedopens the PR withbase: <branch>, and worktree creation,rebaseBeforePRandcreatePRall get one value. Covered bybatch-executor.test.ts›#1386 AC-1: rebaseBeforePR and createPR receive the run's one resolved base,run-base-parity.integration.test.ts› AC-1, and theresolvePrBasecases inworktree-manager.test.ts.settings.run.defaultBasebehaves like--base. Covered byrun-base-parity.integration.test.ts› AC-2.batch-executor.test.ts›#1386 AC-3,run-base-parity› AC-3, andresolvePrBasereturningundefinedfor the default.--stackedstill targets the predecessor and wins over--base. The existing feat(cli): --stacked flag — set chain-mode PR base to predecessor branch #605 tests pass, andresolvePrBasechecksstackPrBasefirst.Mutation-verified: AC-1 — removed
baseBranchfrom thecreatePRoptions inrunIssueWithLogging(batch-executor.ts);batch-executor.test.ts > #1386 AC-1: rebaseBeforePR and createPR receive the run's one resolved basefailed (1 of 210 across the three affected files); restored.Runner verification (graph-2026-10-freeze)
batch-executor.tssaid "Last PR keepsmain". Fixed ine19cdbea, since under--basethe last stacked PR now targets the run's base.batch-executor.test.ts,run-base-parity.integration.test.tsandworktree-manager.test.ts: 210 passed.git diff --name-only origin/main...HEAD | grep -E '^(plugin|\.claude/skills|templates/skills)/'is empty.ensureWorktree; graph doc D-5).🤖 Generated with Claude Code