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

Task 8 Herdr profile adoption exceeds the 300–500 line estimate (tracking)

Open AkaraChen opened this issue 2 months ago • 1 comments

Summary

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

Issue #417 estimated 300–500 lines and required material scope growth to become a separate issue. The adoption branch (task-8-profile-adoption, 1006 insertions / 3 deletions versus task-7-runtime-mapping) is larger because #417 also required interrupt/retry, dirty primary + linked worktree, canonical-path, Bound skip, Missing replace, and #416 unbind coverage later tasks must depend on. Most of the extra is colocated tests in runtime_adoption.rs.

What grew

  • src-tauri/crates/service/src/runtime_adoption.rs (adopt_existing_profiles, canonical cwd/path, per-profile bind/replace checkpoints, already_open reuse, colocated tests)
  • src-tauri/crates/infra/src/herdr/transport.rs (typed worktree.open; unit + live already_open coverage)
  • src-tauri/crates/repo/src/runtime_mapping.rs (replace_profile_workspace unbinds session mappings; colocated #416 test)
  • src-tauri/crates/service/src/runtime_mapping.rs (profile-replace session assertion)
  • src-tauri/crates/service/src/lib.rs (export runtime_adoption)

The extra is in-scope resumable worktree.open adoption, including required tests. Frontend, legacy PTY ownership, RuntimeSelector default (Local), and Herdr terminal create/close stay unchanged. No session→pane bind, live catalog-adoption against ensure_server, or Local-startup adoption was added.

Decision

Keep the extra coverage in Task 8. Splitting it into a later issue would leave Task 9 without the resumable profile→workspace adoption #417 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), or #415 (Task 7 mapping).

No further production work belongs on this issue.

AkaraChen avatar Sep 15 '26 10:09 AkaraChen

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

This re-count matches the tracker body's contemporaneous 1006 insertions / 3 deletions.

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

git diff --numstat origin/task-7-runtime-mapping...origin/task-8-profile-adoption -- . \
  ':(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-7-runtime-mapping = 86b3614e5ce5eef849fd34374917a2e370a09680 (fix(service): treat absent Herdr ids as Missing unless replaced explicitly)
  • tip origin/task-8-profile-adoption = 3e54d8836d125d4f12fbb2d3997180909bc307af (style(service): rustfmt the profile-replace session mapping assertion)
  • 4 commit(s) in origin/task-7-runtime-mapping..origin/task-8-profile-adoption

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

5 files changed, 1006 insertions(+), 3 deletions(-)

+1006 / -3 = 1009

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