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

Task 7 Herdr runtime mapping exceeds the 200–350 line estimate (tracking)

Open AkaraChen opened this issue 2 months ago • 1 comments

Summary

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

Issue #414 estimated 200–350 lines and required material scope growth to become a separate issue. The mapping branch (task-7-runtime-mapping, 1560 insertions versus task-6-runtime-sync) is larger because #414 also required additive migration tests, uniqueness/cascade coverage, explicit Missing/Replaced classify, and session workspace_id integrity later tasks must depend on. Most of the extra is tests in runtime_mapping.rs.

What grew

  • src-tauri/migrations/2026-09-15-000000_add_herdr_runtime_mappings/{up,down}.sql (herdr_namespaces, profile_runtime_mappings, session_runtime_mappings)
  • src-tauri/crates/model/src/runtime_mapping.rs plus diesel-generated schema.rs, RuntimeIdentityState, and RuntimeMapping* errors
  • src-tauri/crates/repo/src/runtime_mapping.rs (bind/replace/unbind, uniqueness, session-vs-profile workspace check, colocated tests)
  • src-tauri/crates/service/src/runtime_mapping.rs (projection classify; explicit replace only; colocated tests)
  • src-tauri/crates/infra/src/db.rs (additive migration / catalog-preservation tests)

The extra is in-scope mapping persistence, including required tests. Frontend, legacy PTY ownership, RuntimeSelector default (Local), and Herdr terminal create/close stay unchanged. No worktree adoption, terminal-session attach, or live ownership transfer was added.

Decision

Keep the extra coverage in Task 7. Splitting it into a later issue would leave Task 8 without the additive 2code↔Herdr identity store #414 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), or #412 (Task 6 sync).

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 7 Herdr runtime mapping: this task's own stacked range, not origin/main...HEAD and not the #435 squash.

This re-count matches the tracker body's contemporaneous 1560 insertions.

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

git diff --numstat origin/task-6-runtime-sync...origin/task-7-runtime-mapping -- . \
  ':(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-6-runtime-sync = f48b90f531cd5e22ef491a1d8f13f871bc40675a (test(service): write subscribe acks with writeln)
  • tip origin/task-7-runtime-mapping = 86b3614e5ce5eef849fd34374917a2e370a09680 (fix(service): treat absent Herdr ids as Missing unless replaced explicitly)
  • 6 commit(s) in origin/task-6-runtime-sync..origin/task-7-runtime-mapping

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

13 files changed, 1560 insertions(+)

+1560 / -0 = 1560

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