2code icon indicating copy to clipboard operation
2code copied to clipboard

Task 9 Herdr terminal lifecycle exceeds the 250–450 line estimate (tracking)

Open AkaraChen opened this issue 2 months ago • 1 comments

Summary

Parent: #419 / #394. Tracking only — not a follow-up implementation.

Issue #419 estimated 250–450 lines and required material scope growth to become a separate issue. The lifecycle branch (task-9-terminal-lifecycle, 1958 insertions / 64 deletions versus task-8-profile-adoption) is larger because #419 also required adopted-root reuse, extra tab.create, uncertain-outcome reconcile, last-pane workspace unbind, bind-failure rollback, and #403 router teardown later tasks must depend on. Most of the extra is colocated tests in runtime/herdr.rs.

What grew

  • src-tauri/crates/service/src/runtime/herdr.rs (create/list/close by pane_id, unbound adopted-root reuse, uncertain-outcome reconcile, last-pane workspace unbind, colocated tests)
  • src-tauri/crates/infra/src/herdr/transport.rs (typed tab.create / pane.list / pane.get / pane.close; outcome_uncertain for tab.* / pane.*)
  • src-tauri/crates/service/src/runtime.rs (teardown_session #403, selector unbind on confirmed close, colocated tests)
  • src-tauri/crates/service/src/runtime/local.rs (Local teardown helper)
  • src-tauri/crates/service/src/profile.rs and project.rs (delete_with_runtime)
  • src-tauri/src/handler/profile.rs and project.rs (RuntimeHandle session teardown)
  • src-tauri/tests/integration_pty_db.rs (#403 profile/project delete)

The extra is in-scope Herdr create/list/close, including required tests and #403 router teardown. Frontend, live frame attach, RuntimeSelector default (Local), and Herdr write/resize/restore stay fail-closed. No live create/list/close against ensure_server, pane.split, worktree create/remove, or #413 event-apply was added.

Decision

Keep the extra coverage in Task 9. Splitting it into a later issue would leave Task 10 without the pane_id create/list/close #419 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), or #418 (Task 8 adoption).

No further production work belongs on this issue.

AkaraChen avatar Sep 15 '26 12:09 AkaraChen

Measured on checkout task-3-line-count-trackers at f0ac78c0735e2664c5d8f42ca1dd5f0f6324f46c (#458 Task 3 / #461). Task 9 Herdr terminal lifecycle: this task's own stacked range, not origin/main...HEAD and not the #435 squash.

This re-count matches the tracker body's contemporaneous 1958 insertions / 64 deletions.

Command (exclude lockfiles + generated files; binary numstat - rows are not summed):

git diff --numstat origin/task-8-profile-adoption...origin/task-9-terminal-lifecycle -- . \
  ':(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-8-profile-adoption = 3e54d8836d125d4f12fbb2d3997180909bc307af (style(service): rustfmt the profile-replace session mapping assertion)
  • tip origin/task-9-terminal-lifecycle = 5a6bce314a584aed49ffcf37b0c6f071cc8312c6 (fix(service): reconcile Herdr lifecycle without replaying mutations)
  • 4 commit(s) in origin/task-8-profile-adoption..origin/task-9-terminal-lifecycle

git diff --shortstat with the same range and pathspec:

11 files changed, 1958 insertions(+), 64 deletions(-)

+1958 / -64 = 2022

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.

AkaraChen avatar Sep 16 '26 19:09 AkaraChen