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

Task 4 Herdr server discovery exceeds the 250–450 line estimate (tracking)

Open AkaraChen opened this issue 2 months ago • 1 comments

Summary

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

Issue #406 estimated 250–450 lines and required material scope growth to become a separate issue. The discovery branch (task-4-server-discovery, 1464 insertions / 3 deletions versus task-3-herdr-sidecar) is larger because #406 also required isolated namespace/socket tests, serialized start, incompatible-vs-absent cases, and GUI-exit helper cleanup later tasks must depend on. Most of the extra is tests.

What grew

  • src-tauri/crates/infra/src/herdr/process.rs (namespace, probe, detached start, colocated tests)
  • src-tauri/crates/infra/src/herdr/mod.rs (split from herdr.rs)
  • src-tauri/crates/model/src/error.rs (HerdrServerAbsent / HerdrServerIncompatible)
  • src-tauri/crates/service/src/runtime.rs (ensure_herdr_listener, release_herdr_client_helpers, routing tests)
  • src-tauri/src/lib.rs (GUI-exit helper drop)

The extra is in-scope discovery/startup, including required tests. Frontend, legacy PTY ownership, RuntimeSelector default (Local), and the Herdr stub are unchanged. No NDJSON client, terminal-session attach, or worktree ownership was added.

Decision

Keep the extra coverage in Task 4. Splitting it into a later issue would leave Task 5 without the discovery/startup #406 asked it to depend on. This is not #400 (Task 1 tests/docs) or #405 (Task 3 packaging).

No further production work belongs on this issue.

AkaraChen avatar Sep 15 '26 05:09 AkaraChen

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

The tracker body named 1464 insertions / 3 deletions contemporaneously. That unfiltered count includes src-tauri/Cargo.lock (+1). This re-count excludes lockfiles as required.

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

git diff --numstat origin/task-3-herdr-sidecar...origin/task-4-server-discovery -- . \
  ':(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-sidecar = 212509d2ac9fded1a9067dc33b18ec5f07e91c99 (fix(scripts): do not delete an existing sidecar on fetch failure)
  • tip origin/task-4-server-discovery = 3e8fc4316b7abf986c3a39246fbf79bf27b04eb8 (feat(app): drop Herdr client helpers on GUI exit without stopping the server)
  • 4 commit(s) in origin/task-3-herdr-sidecar..origin/task-4-server-discovery

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

6 files changed, 1463 insertions(+), 3 deletions(-)

+1463 / -3 = 1466

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