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

Task 10 Herdr frame bridge exceeds the 350–600 line estimate (tracking)

Open AkaraChen opened this issue 2 months ago • 1 comments

Summary

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

Issue #421 estimated 350–600 lines and required material scope growth to become a separate issue. The frame-bridge branch (task-10-frame-bridge, 2183 insertions / 20 deletions versus task-9-terminal-lifecycle) is larger because #421 also required incremental NDJSON, bounded buffering, controller-conflict without --takeover, helper Drop/reap, selector dual-ownership, and adapter attach/write/resize tests later tasks must depend on. Most of the extra is terminal.rs plus colocated adapter tests in runtime/herdr.rs.

What grew

  • src-tauri/crates/infra/src/herdr/terminal.rs (CLI terminal session control spawn, incremental NDJSON, full/seq decode, stdin input/resize/release, bounded buffer, Drop/reap, fake-CLI + optional live tests)
  • src-tauri/crates/service/src/runtime/herdr.rs (write/resize via attached helper; attach/release without pane.close; mapping fail-closed; colocated tests)
  • src-tauri/crates/service/src/runtime.rs (selector attach/detach/release; dual-ownership tests)
  • src-tauri/crates/model/src/error.rs and runtime.rs (conflict / unsupported-platform / oversize errors; HerdrTerminalFrame)
  • src-tauri/src/handler/pty.rs (stream_herdr_output; attach/detach routed by backend)
  • src-tauri/src/bridge.rs and src-tauri/src/lib.rs (Local default; GUI-exit helper Drop)

The extra is in-scope Herdr CLI frame bridging, including required tests. Frontend xterm, RuntimeSelector default (Local), and Herdr history/restore/flush/clear stay fail-closed. No Terminal.tsx, docs/herdr-integration.md, pane.send_*, pane.split, worktree, server.stop, or --takeover was added.

Decision

Keep the extra coverage in Task 10. Splitting it into a later issue would leave Task 11 without the CLI frame bridge #421 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), #418 (Task 8 adoption), or #420 (Task 9 lifecycle).

No further production work belongs on this issue.

AkaraChen avatar Sep 15 '26 13:09 AkaraChen

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

This re-count matches the tracker body's contemporaneous 2183 insertions / 20 deletions (that body already excluded generated files).

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

git diff --numstat origin/task-9-terminal-lifecycle...origin/task-10-frame-bridge -- . \
  ':(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-9-terminal-lifecycle = 5a6bce314a584aed49ffcf37b0c6f071cc8312c6 (fix(service): reconcile Herdr lifecycle without replaying mutations)
  • tip origin/task-10-frame-bridge = 50d6788e4e7ffcfaff13de45c4c1e38facd9c918 (feat(service): stream Herdr frames through the CLI helper)
  • 2 commit(s) in origin/task-9-terminal-lifecycle..origin/task-10-frame-bridge

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

11 files changed, 2183 insertions(+), 20 deletions(-)

+2183 / -20 = 2203

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