Conversation
reclaim() treated the main/canonical worktree exactly like any other lane -- any HealthFlag it happened to pick up (MissingUpstream, Stale, etc.) made it std::fs::remove_dir_all-eligible. Since linked worktrees live nested under it (.worktrees/<name>), deleting the main worktree cascaded and destroyed every linked worktree too, bypassing their own per-lane dirty-check protection entirely. git worktree list always lists the main worktree first; tag that lane and hard-skip it in reclaim(), unconditionally, even under --force -- matching how real git worktree remove already refuses to ever remove the main worktree. Regression test reproduces the exact incident shape: a main worktree flagged MissingUpstream (but clean) plus a dirty linked worktree nested under it; asserts the main worktree, its .git, and the linked worktree all survive reclaim(..., false).
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesMain worktree protection
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Owner
Author
|
Redundant — the real PR (#327) was already created manually and merged. Closing this auto-opened duplicate. |
3 tasks
getappz
added a commit
that referenced
this pull request
Jul 25, 2026
… already merged (#329) push_and_open_pr() unconditionally called pulls::create() for the item's branch. GitHub's API only rejects a duplicate while an existing PR is still open -- once it's merged (or manually closed), a second PR against the same branch is perfectly legal, which is exactly how item done re-running on an already-merged item opened a redundant PR (2026-07-25: PR #328 duplicating already-merged #327). Add pulls::find_existing() to check for any PR (open/merged/closed) matching the branch before creating a new one, and use it in push_and_open_pr -- if found, reuse its url instead of opening a duplicate.
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.
Auto-opened on
item donefor _GzH4smL3DbkwEULLXh5D.Summary by CodeRabbit