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

Task 4 Herdr create/delete exceeds the 400–700 line estimate (tracking)

Open AkaraChen opened this issue 2 months ago • 1 comments

Summary

Parent: #443 / #436. Tracking only — not a follow-up implementation.

Issue #443 estimated 400–700 lines and required material scope growth to become a separate issue. The create/delete branch (task-4-herdr-create-delete, 1327 insertions / 475 deletions versus task-3-herdr-profile-list, excluding generated bindings) is larger because #443 also required JSON workspace.create / workspace.close plus colocated fake-client tests, git vs non-git create/delete paths, Herdr-down fail-closed coverage, Local-flag sqlite fallback, dual-backend refuse, uncertain no-replay, frontend route-by-workspace_id, and contract docs. A review-time snapshot of this branch was 1196 insertions / 472 deletions before the linked-delete git branch -D reuse fix.

What grew

  • src-tauri/crates/infra/src/herdr/transport.rs (JSON workspace.create / workspace.close client + Unix tests)
  • src-tauri/crates/service/src/profile.rs (Herdr create/delete without sqlite INSERT/DELETE; worktree.create / worktree.remove; workspace.create --cwd / workspace.close; git branch -D after linked remove from listed checkout / projects.folder; colocated tests)
  • src-tauri/crates/service/src/runtime/herdr.rs + project.rs (worktree-client trait surface for create/close)
  • src/features/profiles/hooks.ts / CreateProfileDialog.tsx / hooks.test.tsx (navigate by workspace_id)
  • docs/herdr-integration.md (Task 4 done on this branch)

All of that is the Task 4 create/delete rewrite plus tests and docs. It is not Task 5+ scope: mapping tables stay; sqlite profiles is not dropped; no HerdrRuntimeSync / events.subscribe; no launch/adopt; no Local PTY deletion; pin stays v0.9.0.

Decision

Keep the extra coverage in Task 4. Splitting non-git workspace.create/close, Herdr-down fail-closed tests, or the leftover-branch delete into a later issue would leave Delete Profile unable to reuse a branch name and would leave non-git New Profile failing git-only.

No production work belongs on this issue.

AkaraChen avatar Sep 16 '26 05:09 AkaraChen

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

The tracker body named 1327 insertions / 475 deletions contemporaneously (and an earlier review snapshot of 1196 / 472). This re-count is 1329 / 475 on the same named range; no lockfile or generated path was excluded. Closing number is the command below.

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

git diff --numstat origin/task-3-herdr-profile-list...origin/task-4-herdr-create-delete -- . \
  ':(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-3-herdr-profile-list = 4b364b43776183245914d44bae47c35152387164 (fix(profiles): keep live is_default on unmapped Herdr notes)
  • tip origin/task-4-herdr-create-delete = 495ac7539cf70b17e24f176030917af324329a9e (docs: track Task 4 line-count growth in #444)
  • 7 commit(s) in origin/task-3-herdr-profile-list..origin/task-4-herdr-create-delete

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

8 files changed, 1329 insertions(+), 475 deletions(-)

+1329 / -475 = 1804

This work is already on task-10-launch-adopt and PR #457. Closing as superseded by #457. No remaining unshipped work on this tracker.

AkaraChen avatar Sep 16 '26 19:09 AkaraChen