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

Task 9 delete Local PTY exceeds the 700–1100 line estimate (tracking)

Open AkaraChen opened this issue 2 months ago • 1 comments

Summary

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

Issue #452 estimated 700–1100 lines and required material scope growth to become a separate issue. The Local-PTY deletion branch (task-9-delete-local-pty, 1247 insertions / 6933 deletions versus task-8-drop-profiles, excluding generated bindings) is larger because #452 also required deleting LocalAdapter / portable-pty / pty_log / Local shell-init, DROPping pty_sessions, collapsing RuntimeRouter to Herdr-only, rewriting Local-flag tests onto Herdr fakes, and dropping the Local byte-stream restore path.

What grew

  • src-tauri/crates/service/src/pty.rs (deleted Local session lifecycle)
  • src-tauri/crates/infra/src/pty.rs / pty_log.rs / shell_init.rs (deleted Local spawn, log files, ZDOTDIR injection)
  • src-tauri/crates/service/src/runtime.rs + runtime/local.rs (Herdr-only router; no TWOCODE_RUNTIME=local)
  • src-tauri/crates/service/src/profile.rs / project.rs (no Local synthetic default-{project_id})
  • src-tauri/crates/repo/src/pty.rs deleted; migration 2026-09-16-120000_drop_pty_sessions
  • src-tauri/tests/integration_pty_db.rs / pty_test.rs (sqlite session-store tests removed or inverted)
  • src/features/terminal/ transport, Terminal.tsx, restoration.ts (Herdr frame stream only)
  • docs/herdr-integration.md (Task 9 done on this branch)

All of that is the Task 9 Local PTY deletion plus tests and docs. It is not Task 10+ scope: no launch/adopt of the project-folder default; no second events.subscribe; lib.rs still does not name HerdrRuntimeSync; pin stays v0.9.0.

Decision

Keep the extra coverage in Task 9. Splitting Local adapter deletion, the pty_sessions DROP, or Local-flag test inversion into a later issue would leave a dual-runtime path. Do not fold Task 10 (launch/adopt) into this branch.

No production work belongs on this issue.

AkaraChen avatar Sep 16 '26 11:09 AkaraChen

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

This re-count matches the tracker body's contemporaneous 1247 insertions / 6933 deletions (excluding generated bindings).

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

git diff --numstat origin/task-8-drop-profiles...origin/task-9-delete-local-pty -- . \
  ':(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-8-drop-profiles = 83a08daa238a76ed1a0f5c6d1d5b625324d126eb (docs: record Task 8 drop sqlite profiles)
  • tip origin/task-9-delete-local-pty = d5ae53e169799f9ddd4287f35b99640b25ede6aa (docs: record Task 9 delete Local PTY)
  • 3 commit(s) in origin/task-8-drop-profiles..origin/task-9-delete-local-pty

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

53 files changed, 1247 insertions(+), 6933 deletions(-)

+1247 / -6933 = 8180

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