source-control: worktree cleanup Step 4a stops processes before the 4b guards decide the worktree is kept
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
Research direction
Read context/cleanup.md and trace the cleanup steps and their keep/remove guards. Confirm the order of the guards, Step 4a, Workspace down, reap, and removal; the issue is done when a kept worktree has no process-stopping side effects and removal candidates follow the expected order.
Written by the indexing model from the issue text.
Description
Problem
context/cleanup.md orders Step 4 as 4a (release OS file locks: stop build servers, worktree-rooted daemons and MCP servers) → 4b (guards: stranded work, claim/stale-lock proof) → reap → remove. So a candidate's processes are stopped before the guards decide whether it is removed at all. When a guard then keeps the worktree, its live processes are already dead.
Observed
Cross-repo cleanup of 82 candidates (WSL2, source-control 1.0.3). Candidate melodic-software-claude-code-plugins-feat-interview-web-view-review was locked by a live lane; worktree-claim.sh stale exited 1 (transcript active within 120 min), so the row was correctly kept. But Step 4a had already sent SIGTERM to that worktree's planning surface server (plugins/planning/surface/server). The owning session lost its running server with no notice.
Expected
Run every keep/remove guard first (Work verdict, dirty check, lock and worktree-claim.sh stale proof, .worktreeinclude carried-file check), and only on a row that will be removed run 4a, then the Workspace down, reap, and removal. Reorder to: guards → 4a → down → reap → remove. A row any guard keeps must have no side effects.
Related: #6007 / #6363 (reap rewrites tracked .claude/settings.json, blocking plain removal; also hit 11 times in this run) and #7308 (cross-repo cleanup).
- Dominant language
- Shell
- Stars
- 22
- Forks
- 2
- Avg merge
- 8h 24m
- Merged PRs (30d)
- 947
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from melodic-software/claude-code-plugins
-
needs-human needs-triage priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
melodic-software/claude-code-plugins#7455 · 1 comment ·
Maintainers usually reply within 1 day
-
priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
melodic-software/claude-code-plugins#7351 · 2 comments ·
Maintainers usually reply within 1 day
-
priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
melodic-software/claude-code-plugins#7288 · 2 comments ·
Maintainers usually reply within 1 day
-
knowledge: docpage-digest dual verification defines no verdict vocabulary or pass/fail thresholdOpenneeds-human
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
melodic-software/claude-code-plugins#7286 · 2 comments ·
Maintainers usually reply within 1 day
-
priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
melodic-software/claude-code-plugins#7282 · 2 comments ·
Maintainers usually reply within 1 day
All issues in melodic-software/claude-code-plugins
Similar issues
-
bug needs-triage
Difficulty 1/5 Under an hour Newbie friendliness 78/100
mattpocock/skills#1281 ·
Maintainers usually reply within 1 day
-
github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
hiero-ledger/hiero-consensus-node#27621 ·
Maintainers usually reply within 1 day
-
application-issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Installomator/Installomator#3427 ·
Maintainers usually reply within 3 days
-
area:sessions
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
github/copilot-cli#5147 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
software-mansion/argent#1483 ·
Maintainers usually reply within 1 day