Task 15 Herdr runtime cleanup exceeds the 300–500 line estimate (tracking)
Summary
Parent: #429 / #394. Tracking only — not a follow-up implementation.
Issue #429 estimated 300–500 lines and required material scope growth to become a separate issue. The cleanup branch (task-15-runtime-cleanup, 1096 insertions / 7 deletions versus task-14-profile-create) is larger because #429 also required mapping-based worktree.remove, dirty fail-closed, uncertain no-replay, primary/linked-worktree refuse, release_herdr_session vs pane.close, and project forget/retain later tasks must depend on. Most of the extra is colocated tests in profile.rs.
What grew
src-tauri/crates/infra/src/herdr/transport.rs(typedworktree.removewithworkspace_id/force/trust_repository: true; absent workspace success; no auto-replay; dirty-then-force coverage)src-tauri/crates/service/src/runtime/herdr.rs(HerdrWorktreeClient::worktree_remove)src-tauri/crates/service/src/runtime.rs(release_herdr_session,forget_project_session)src-tauri/crates/service/src/profile.rs(mapping-based Herdr delete, Local unmapped git path, colocated tests)src-tauri/crates/service/src/project.rs(catalog forget/retain; noworktree.remove/workspace.close/pane.close)
The extra is in-scope Task 15 runtime cleanup, including required tests. Frontend, RuntimeSelector default (Local), and docs/herdr-integration.md stay unchanged. No server.stop, --takeover, pane.send_input, herdr-client.sock, or Local git worktree remove on the Herdr-mapped path was added.
Decision
Keep the extra coverage in Task 15. Splitting it into a later issue would leave Task 16 without the mapping-based worktree.remove / forget-retain #429 asked it to depend on. This is not #400 (Task 1 tests/docs), #405 (Task 3 packaging), #408 (Task 4 discovery), #410 (Task 5 transport), #412 (Task 6 sync), #415 (Task 7 mapping), #418 (Task 8 adoption), #420 (Task 9 lifecycle), #422 (Task 10 frame bridge), #424 (Task 11 xterm transport), or #426 (Task 12 restore).
No further production work belongs on this issue.
Measured on checkout task-3-line-count-trackers at f0ac78c0735e2664c5d8f42ca1dd5f0f6324f46c (#458 Task 3 / #461). Task 15 Herdr runtime cleanup: this task's own stacked range, not origin/main...HEAD and not the #435 squash.
This re-count matches the tracker body's contemporaneous 1096 insertions / 7 deletions.
Command (exclude lockfiles + generated files; binary numstat - rows are not summed):
git diff --numstat origin/task-14-profile-create...origin/task-15-runtime-cleanup -- . \
':(exclude)src/generated/' \
':(exclude)src/paraglide/' \
':(exclude)**/Cargo.lock' \
':(exclude)bun.lock' \
':(exclude)**/bun.lock' \
':(exclude)bun.lockb' \
':(exclude)**/bun.lockb' \
':(exclude)package-lock.json' \
':(exclude)**/package-lock.json' \
':(exclude)src-tauri/binaries/'
Resolved SHAs:
- base
origin/task-14-profile-create=13b625c58e760139fe7c212ee05fb670b5e05b69(fix(service): reconcile Herdr create retries at the intended checkout) - tip
origin/task-15-runtime-cleanup=be9926ec8508412878874ce9c8d5cd34df893491(feat(service): forget projects without Herdr runtime teardown) 4commit(s) inorigin/task-14-profile-create..origin/task-15-runtime-cleanup
git diff --shortstat with the same range and pathspec:
5 files changed, 1096 insertions(+), 7 deletions(-)
+1096 / -7 = 1103
This work is already on task-17-shell-templates / task-10-launch-adopt and PR #435. Closing as superseded by #435. No remaining unshipped work on this tracker.