BuildNoChanges transitions directly to merged without a PR, bypassing the only production worktree cleanup path and leaking a full clone.
Confirmed still present on main. closeNoChangesIssue (internal/domain/workflow/steps.go:67-77) sets Outcome{Status: store.StatusMerged} directly, with no worktree removal. The only two production callers of worktree.Manager.Cleanup are internal/daemon/daemon.go:769 and :788, both inside the PR-state polling loop that transitions out of StatusPROpen. A task that reaches merged without ever opening a PR never enters that loop, so its clone is never removed.
Steps to Reproduce
Dispatch a task whose builder stage completes with StatusPassed but produces no diff, so implement.go:166 sets tc.BuildNoChanges = true.
Let StageCommitPush run: it takes the BuildNoChanges branch, closes the issue, and sets the outcome to merged.
Observe the task row reaches merged with no PR number, so the daemon's PRState polling loop never sees it.
Inspect the workspace root: <work_dir>/<base64(owner)>/<base64(repo)>/issue-<n>/ still contains the full clone.
Repeat for further no-change tasks and watch the directory count grow unbounded — nothing else removes them.
Acceptance Criteria
Both direct and container no-change completion remove the identity-correct worktree while parked worktrees remain available; lifecycle regression tests cover the terminal path.
Acceptance criteria
Both direct and container no-change completion remove the identity-correct worktree while parked worktrees remain available; lifecycle regression tests cover the terminal path.
Close reason
Closed
Imported from beads archie-core-1ysw.7 · GitHub #598 · type bug · priority P2 · created 2026-08-22 · closed 2026-08-24
BuildNoChanges transitions directly to merged without a PR, bypassing the only production worktree cleanup path and leaking a full clone.
Confirmed still present on main. `closeNoChangesIssue` (internal/domain/workflow/steps.go:67-77) sets `Outcome{Status: store.StatusMerged}` directly, with no worktree removal. The only two production callers of `worktree.Manager.Cleanup` are internal/daemon/daemon.go:769 and :788, both inside the PR-state polling loop that transitions out of `StatusPROpen`. A task that reaches `merged` without ever opening a PR never enters that loop, so its clone is never removed.
## Steps to Reproduce
1. Dispatch a task whose builder stage completes with `StatusPassed` but produces no diff, so `implement.go:166` sets `tc.BuildNoChanges = true`.
2. Let `StageCommitPush` run: it takes the `BuildNoChanges` branch, closes the issue, and sets the outcome to `merged`.
3. Observe the task row reaches `merged` with no PR number, so the daemon's `PRState` polling loop never sees it.
4. Inspect the workspace root: `<work_dir>/<base64(owner)>/<base64(repo)>/issue-<n>/` still contains the full clone.
5. Repeat for further no-change tasks and watch the directory count grow unbounded — nothing else removes them.
## Acceptance Criteria
Both direct and container no-change completion remove the identity-correct worktree while parked worktrees remain available; lifecycle regression tests cover the terminal path.
### Acceptance criteria
Both direct and container no-change completion remove the identity-correct worktree while parked worktrees remain available; lifecycle regression tests cover the terminal path.
### Close reason
Closed
---
_Imported from beads `archie-core-1ysw.7` · GitHub #598 · type bug · priority P2 · created 2026-08-22 · closed 2026-08-24_
sam
added the mediumbug labels 2026-10-27 13:34:40 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
BuildNoChanges transitions directly to merged without a PR, bypassing the only production worktree cleanup path and leaking a full clone.
Confirmed still present on main.
closeNoChangesIssue(internal/domain/workflow/steps.go:67-77) setsOutcome{Status: store.StatusMerged}directly, with no worktree removal. The only two production callers ofworktree.Manager.Cleanupare internal/daemon/daemon.go:769 and :788, both inside the PR-state polling loop that transitions out ofStatusPROpen. A task that reachesmergedwithout ever opening a PR never enters that loop, so its clone is never removed.Steps to Reproduce
StatusPassedbut produces no diff, soimplement.go:166setstc.BuildNoChanges = true.StageCommitPushrun: it takes theBuildNoChangesbranch, closes the issue, and sets the outcome tomerged.mergedwith no PR number, so the daemon'sPRStatepolling loop never sees it.<work_dir>/<base64(owner)>/<base64(repo)>/issue-<n>/still contains the full clone.Acceptance Criteria
Both direct and container no-change completion remove the identity-correct worktree while parked worktrees remain available; lifecycle regression tests cover the terminal path.
Acceptance criteria
Both direct and container no-change completion remove the identity-correct worktree while parked worktrees remain available; lifecycle regression tests cover the terminal path.
Close reason
Closed
Imported from beads
archie-core-1ysw.7· GitHub #598 · type bug · priority P2 · created 2026-08-22 · closed 2026-08-24