Conversation
Doctor previously ran agent-branch-finish from inside the sandbox worktree, so merge cleanup could not prune the active doctor worktree. The fix now lets branch-finish handle the merge without the broader prune side effects, then doctor explicitly verifies and removes its own local and remote sandbox refs. Added regression coverage for worktree removal after successful protected-main doctor auto-finish. Constraint: doctor must preserve later auto-finish sweep behavior for unrelated ready agent branches Rejected: Keep using --cleanup from the doctor finish call | repo-wide prune consumed unrelated ready worktrees before the sweep Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep doctor sandbox cleanup targeted to metadata.branch and metadata.worktreePath; do not reintroduce repo-wide prune here without proving it cannot consume unrelated ready worktrees Tested: node --test test/doctor.test.js Tested: openspec validate --specs Not-tested: Live GitHub PR merge against the real origin for this branch
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
Verification