Repository navigation
Give Worktree ownership of safe Issue branch acquisition - #491
Merged
Merged
Conversation
Merged
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
Worktree independently acquires Issue branches without replacing local-only work. Issue branch selection uses Worktree's rule for advisory preflight before the Claim.
Closes #485
Evidence
Before:
continuation_refuses_local_only_work_without_selection_and_preserves_its_headfailed: acquisition replaced the saved local-only SHA with origin's older SHA.After: the regression passes; acquisition refuses and retains the exact local and origin heads without adding a worktree.
Before: a local branch named
origin/issue-7caused acquisition to compare against the wrong head.After: acquisition pins fully qualified remote-tracking refs; the shadowing regression passes for fresh and continued checkouts and retains the shadowing branches.
Real-Git tests cover post-preflight local commits and origin advancement, unchanged reflogs for equal branches, absent branches, occupied paths and branches already used by another worktree. CLI coverage verifies refusal before a session or Delivery and ordinary Claim behavior.
Focused Worktree, Issue branch selection, Continuation, fresh and numbered Run tests and Spec run Ticket/Claim checks passed.
cargo fmt --checkandcargo clippy --all-targets -- -D warningspassed.cargo test -- --test-threads=1passed: 1322 tests passed, 1 ignored across 39 test binaries.Two normal
cargo testattempts stopped in unchanged tests: child-run script startup reportedText file busy, and a Harness catalog interruption assertion failed. Both tests passed in isolation; the complete serial run passed withcargo test -- --test-threads=1.Test seams
create_freshandcontinue_existing) and its shared advisory preflight against real Git, a temporary Launch directory and a bare local origin; observe refusal, exact refs, worktree registration and filesystem preservation.Merge Danger
Door: two-way
The change is reversible and adds no persistent format or migration.
Blast Radius: acquisition
Runs and Spec runs refuse late local mismatches before sessions start. Native Git add failures can leave a newly created local branch; pre-existing refs and occupied paths are preserved.
Unaddressed findings
Standards
None. The parallel review and final follow-up reported no findings.
Spec
None. The parallel review and final follow-up reported no findings.
Built with codex · gpt-6.1-sol · xhigh