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

Task 3: Measure and close the line-count tracking issues

Open AkaraChen opened this issue 2 months ago • 1 comments

Summary

Measure every open exceeds the ... line estimate (tracking) issue from phases 1–2 against that task's own commits, then close it as superseded by the shipping PRs (#435, #457) or leave it open with the measurement if it still tracks unshipped work, as required by parent plan #458 Task 3. Do not estimate — count. This is issue hygiene. No production behavior change. No interaction change.

Herdr is the profile authority. sqlite profiles is not source of truth (the table is DROPped). projects / project_groups / checkout_notes stay in 2code sqlite. Local PTY, TWOCODE_RUNTIME, mapping tables, and pty_sessions are already gone on this stack — do not re-add them. Do not start a fourth #458 task (there is none).

Tracker bodies already contain contemporaneous git diff --stat approximations from when they were filed. Those numbers are not the closing evidence. Re-count on this checkout and quote the command plus the resulting added+removed total in a new comment.

This is #458 Task 3, not #394 Task 3 (#404 / tracker #405) and not #436 Task 3 (#441 / tracker #442). Do not implement or close those task tickets here. Do not invent new tracking issues for tasks that never filed one.

Dependencies: Parent plan #458. Prerequisites: #459 (Task 1), #460 (Task 2). Stack on task-2-retire-stale-docs. Leftover gaps (#396, #397, #398, #399, #401) stay out of scope — Task 1 already commented them.

Work to complete

  1. Enumerate the tracker set (not tasks, not gaps) Every open issue whose title contains exceeds the ... line estimate (tracking) from phases 1–2. That set is exactly these 20 (re-search GitHub; do not skip a newly filed twin):

    • Phase 1 / PR #435:
      • #400 Task 1 contract probe (#395 / #394). No surviving task-1-* branch; measure origin/dev... the tip of Task 1, which is the parent of the first Task 2 commit on task-2-runtime-boundary (currently the docs: proceed Linux Task 5/10... commit). Re-resolve that SHA.
      • #405 Task 3 sidecar — task-3-herdr-sidecar vs task-2-runtime-boundary (#404)
      • #408 Task 4 discovery — task-4-server-discovery vs task-3-herdr-sidecar (#406)
      • #410 Task 5 socket client — task-5-socket-client vs task-4-server-discovery (#409)
      • #412 Task 6 runtime sync — task-6-runtime-sync vs task-5-socket-client (#411)
      • #415 Task 7 runtime mapping — task-7-runtime-mapping vs task-6-runtime-sync (#414)
      • #418 Task 8 profile adoption — task-8-profile-adoption vs task-7-runtime-mapping (#417)
      • #420 Task 9 terminal lifecycle — task-9-terminal-lifecycle vs task-8-profile-adoption (#419)
      • #422 Task 10 frame bridge — task-10-frame-bridge vs task-9-terminal-lifecycle (#421)
      • #424 Task 11 xterm transport — task-11-xterm-transport vs task-10-frame-bridge (#423)
      • #426 Task 12 restore-by-reattach — task-12-reattach-restore vs task-11-xterm-transport (#425)
      • #430 Task 15 runtime cleanup — task-15-runtime-cleanup vs task-14-profile-create (#429)
      • #434 Task 17 shell/templates — task-17-shell-templates vs task-16-workspace-paths (#433)
    • Phase 2 / PR #457:
      • #438 Task 1 client-mode contract — task-1-client-mode-contract vs task-17-shell-templates (#437)
      • #440 Task 2 default runtime — task-2-herdr-default-runtime vs task-1-client-mode-contract (#439)
      • #442 Task 3 profile list — task-3-herdr-profile-list vs task-2-herdr-default-runtime (#441)
      • #444 Task 4 create/delete — task-4-herdr-create-delete vs task-3-herdr-profile-list (#443)
      • #450 Task 7 live cwd — task-7-herdr-live-cwd vs task-6-herdr-session-store (#449)
      • #453 Task 9 delete Local PTY — task-9-delete-local-pty vs task-8-drop-profiles (#452)
      • #456 Task 10 launch/adopt — task-10-launch-adopt vs task-9-delete-local-pty (#455) Exclude: parent plans (#394, #436, #458), every Task N: … implementation ticket, leftover gaps (#396/#397/#398/#399/#401), and tasks that never filed a tracker (#402, #427, #428, #432, #445, #448, #451, #459, #460).
  2. Count each task's own commits (do not estimate) For each tracker, git diff --numstat <base>...<task-branch> on this checkout, then sum insertions + deletions. Exclude lockfiles and generated files only:

    • src/generated/
    • src/paraglide/
    • **/Cargo.lock, bun.lock, bun.lockb, package-lock.json
    • binary sidecar artifacts (src-tauri/binaries/, downloaded Herdr binaries) Do not exclude tests, docs, Diesel schema.rs, scripts/, license/NOTICE text, or AGENTS.md. Count the sub-issue's own stacked range (task branch vs its prerequisite branch), not origin/main...HEAD and not the whole #435/#457 squash. Binary files that numstat reports as - do not add to the line total.

    Starting-point hints (must be re-counted, not copied into the closing comment):

    • Tracker bodies already name most ranges and a contemporaneous shortstat (e.g. #405 1168/3, #442 1880/235, #453 1247/6933, #456 742/89). Re-run the command; if the new total matches, say so and still quote the command output.
    • #400 never named a branch. Measure Task 1 only (origin/dev / fa2465a through the last contract-probe commit, not Task 2's runtime-boundary commits).
    • If a named branch is missing locally, fetch it or reconstruct the same parent→task range from git log on this stack. If it still cannot be counted, leave that tracker open with one comment saying why — do not invent a number.
  3. Comment, then close or leave open Every tracker gets one new comment that includes:

    • the exact git diff range and exclude pathspec
    • +insertions / -deletions = total (added+removed)
    • which shipping PR contains the work (#435 for phase 1, #457 for phase 2) Then exactly one of:
    • Shipped: close as superseded by that PR. These trackers are not implementation leftovers; the parent tasks already landed on the stack. Closing as superseded is correct even though #435/#457 are still open PRs.
    • Still tracks open work: leave open with the same measurement, and name the unshipped branch/PR. Do not use this path for work that is already on task-10-launch-adopt / #457 / #435. Do not close a tracker as "fixed" by changing production code. Do not close #394/#436/#458 task tickets. Do not re-comment leftover gaps. Do not push. Do not open a PR.

Likely files and directories

  • Verify / measure only: the stacked task-* branches already on this checkout (see the list above). No production Rust/TS/docs edit is required.
  • Do not change: src-tauri/, src/, docs/, messages/, sidecar pin, Diesel schema, GUI clicks/labels, lib.rs naming HerdrRuntimeSync.
  • Do not add: a docs/ measurements page, a new tracking issue, or a commit whose only purpose is to record counts (GitHub comments are the review surface). The stacked branch task-3-line-count-trackers may have an empty diff versus task-2-retire-stale-docs.

Estimated changes: 0 production lines. GitHub comments only. Material scope growth (rewriting a task, filing new trackers, measuring #394 Tasks 18–23 that were never in phases 1–2) should become a separate issue.

Acceptance criteria

  • [ ] Every in-scope tracking issue has a new comment with a measured +ins / -del = total from that task's own commits, excluding lockfiles and generated files. No estimated or copied-from-body number without a command quote.
  • [ ] Each tracker is either closed as superseded by #435 or #457, or left open with that measurement because it still tracks unshipped work.
  • [ ] #400 is measured as Task 1 only (not including task-2-runtime-boundary). The other 19 use the named task-N-... vs prerequisite range.
  • [ ] No new tracking issues. No comments or closes on leftover gaps #396/#397/#398/#399/#401. No closes of #394/#436 task tickets or of #459/#460.
  • [ ] No production behavior change. No Local / TWOCODE_RUNTIME / sqlite profiles authority. projects still round-trip in sqlite. No second events.subscribe. lib.rs still does not name HerdrRuntimeSync. v0.9.0 pin unchanged.
  • [ ] Tests: none required (no code change). If a file is touched by mistake, cargo test --workspace from src-tauri (or cargo test --workspace --exclude code where GTK is unavailable) and/or frontend lint/typecheck/tests for that scope.
  • [ ] No push. No pull request.

Out of scope

  • Parent-plan Task 1 (gap audit) and Task 2 (docs sweep); already done on this stack.
  • Closing or implementing #394 / #436 task tickets. Re-commenting leftover gaps #396 / #397 / #398 / #399 / #401.
  • Creating trackers for tasks that never exceeded / never filed one (#402, #427, #428, #432, #445, #448, #451, #459, #460).
  • Measuring origin/main...HEAD or the squash-inflated PR shortstat as a substitute for per-task ranges.
  • Reintroducing Local PTY, TWOCODE_RUNTIME, sqlite profiles, or mapping tables.
  • Changing the Herdr-only runtime decision, the v0.9.0 pin, IPC command names, or GUI clicks/labels.
  • Remote Herdr machines. Windows/macOS live probes on this Linux builder.
  • Opening a pull request.

Standing constraints

  • No production behavior change unless a real defect is proven on this tip. This task is counting and issue hygiene.
  • Do not treat sqlite profiles as source of truth. projects stay in 2code sqlite.
  • Never let Local and Herdr own the same worktree (Local is already removed; do not bring it back).
  • Default-runtime switch and deleting Local/PTY/profiles rows already shipped in #436; this task does not re-litigate those decisions and does not change them.
  • Do not change interaction unless the old UX cannot be backed by Herdr. This task has no named interaction exception.
  • One task; stack on task-2-retire-stale-docs. Do not push. Do not open a PR.

Why this is next

#458 has three tasks. Task 1 (#459) and Task 2 (#460) are done on task-2-retire-stale-docs. Task 3 is the remaining line-count sweep. The leftover open gaps (#396/#397/#398/#399/#401) are Linux-unverifiable or upstream-capability leftovers, not in-flight replacements for this work.

AkaraChen avatar Sep 16 '26 19:09 AkaraChen

#458 Task 3 done on task-3-line-count-trackers at f0ac78c0735e2664c5d8f42ca1dd5f0f6324f46c (empty diff vs task-2-retire-stale-docs). Re-searched open exceeds the ... line estimate (tracking) issues: the set is still exactly these 20 (no newly filed twin).

Each tracker got one new comment quoting git diff --numstat <base>...<tip> with lockfile/generated excludes, then +ins / -del = total. All 20 tips are already on task-10-launch-adopt / #435 / #457, so all were closed as superseded (completed). None left open for unshipped work.

Tracker Range +ins / -del = total Closed as
#400 origin/dev...08ae2f6 (Task 1 only; parent of first Task 2 commit 3ab67ed) +3008 / -0 = 3008 superseded by #435
#405 origin/task-2-runtime-boundary...origin/task-3-herdr-sidecar +1167 / -3 = 1170 superseded by #435
#408 origin/task-3-herdr-sidecar...origin/task-4-server-discovery +1463 / -3 = 1466 superseded by #435
#410 origin/task-4-server-discovery...origin/task-5-socket-client +1607 / -6 = 1613 superseded by #435
#412 origin/task-5-socket-client...origin/task-6-runtime-sync +1313 / -9 = 1322 superseded by #435
#415 origin/task-6-runtime-sync...origin/task-7-runtime-mapping +1560 / -0 = 1560 superseded by #435
#418 origin/task-7-runtime-mapping...origin/task-8-profile-adoption +1006 / -3 = 1009 superseded by #435
#420 origin/task-8-profile-adoption...origin/task-9-terminal-lifecycle +1958 / -64 = 2022 superseded by #435
#422 origin/task-9-terminal-lifecycle...origin/task-10-frame-bridge +2183 / -20 = 2203 superseded by #435
#424 origin/task-10-frame-bridge...origin/task-11-xterm-transport +967 / -43 = 1010 superseded by #435
#426 origin/task-11-xterm-transport...origin/task-12-reattach-restore +1113 / -60 = 1173 superseded by #435
#430 origin/task-14-profile-create...origin/task-15-runtime-cleanup +1096 / -7 = 1103 superseded by #435
#434 origin/task-16-workspace-paths...origin/task-17-shell-templates +485 / -28 = 513 superseded by #435
#438 origin/task-17-shell-templates...origin/task-1-client-mode-contract +890 / -47 = 937 superseded by #457
#440 origin/task-1-client-mode-contract...origin/task-2-herdr-default-runtime +633 / -74 = 707 superseded by #457
#442 origin/task-2-herdr-default-runtime...origin/task-3-herdr-profile-list +1880 / -235 = 2115 superseded by #457
#444 origin/task-3-herdr-profile-list...origin/task-4-herdr-create-delete +1329 / -475 = 1804 superseded by #457
#450 origin/task-6-herdr-session-store...origin/task-7-herdr-live-cwd +711 / -159 = 870 superseded by #457
#453 origin/task-8-drop-profiles...origin/task-9-delete-local-pty +1247 / -6933 = 8180 superseded by #457
#456 origin/task-9-delete-local-pty...origin/task-10-launch-adopt +742 / -89 = 831 superseded by #457

Not touched: leftover gaps #396/#397/#398/#399/#401; parent/task tickets #394/#436/#458/#459/#460; no new tracking issues; no production diff; no push; no PR.

AkaraChen avatar Sep 16 '26 19:09 AkaraChen