Skip to content

Implementation plan for the diff walker#20

Open
mostlydev wants to merge 3 commits into
masterfrom
diff-walker-implementation
Open

Implementation plan for the diff walker#20
mostlydev wants to merge 3 commits into
masterfrom
diff-walker-implementation

Conversation

@mostlydev
Copy link
Copy Markdown
Owner

Summary

  • File-by-file build plan for the live diff walker, six independently mergeable stages following the design merged in Design live diff walker #18.
  • Locks 10 implementation-time decisions (D1–D10), 5 of them revised through adversarial review.
  • Surfaces a related identity-divergence bug (#19) that gates stage 5 routing.

Stage shape

  1. Watch store and reset substrate (registry sqlite + per-workspace session sqlite + lease heartbeat + atomic reset).
  2. Scanner and classifier (path discovery, classification, CAS, baseline bootstrap).
  3. Batch journal and reconciliation (chokidar dirty-set, adaptive quiet window, attribution sampling, IPC).
  4. Projection and diff rendering (projection.git baseline + per-batch commit, diff serving, tt walk --print).
  5. Annotation delivery (durable-first writes, routing chain, reset preflight flushing).
  6. TUI walker (blessed feed/diff/status panes, follow/review/hold/compose state machine, back-step anchor).

Each stage has its own commit chain, its own test file (tests/watch-substrate.test.ts, tests/watch-scanner.test.ts, …, tests/walk-state.test.ts), and a green npm test + npm run typecheck gate before merge.

Review history

  • 4b4e8c7 — claude:45688d4d initial draft.
  • 35ca18c — codex:d4bc2492 adversarial review and revisions: real lease heartbeat (was an exit-with-stale-lease skeleton), explicit manifest validation, tar-fs archive, scanner/path-heads transactional boundaries, baseline bootstrap promoted to a stage-2 deliverable, narrow read-only rooms.sqlite adapter for attribution (replaces the side-effecting TalkingStickService.getRoomState() import), projection commit ids cached on change_batches, rename detection blocking subscriber notification, blessed instead of neo-blessed.
  • 8516bee — claude:45688d4d re-review: lock D5/D9/D10, link issue CLI and MCP resolve different agent_ids for same harness session, breaking msg recv --target self #19 as a stage-5 gate.

Verification

  • git diff --check
  • Design-only (no source code or test changes); no npm test run because there is nothing to test yet.

mostlydev added 3 commits May 4, 2026 21:58
Six-stage build sequence per the merged design (PR #18, commit 5cf6339):
substrate, scanner/classifier, batch journal, projection/diff, annotation
delivery, TUI walker. File-by-file shape, schema migrations, CLI grammar,
test plan, plus 10 implementation-time decisions flagged for adversarial
review and 5 risks called out for codex specifically.
D5: ship polling-only IPC on Windows for v1; named pipe deferred.
D9: one PR per stage default, but stages 1+2 may share a PR with two
focused commits if review is in-flight together.
D10: concrete --print flag spec for stage 4 acceptance + CI smoke.
Add identity consistency section: watcher must use MCP ancestry-walk
agent_id, not the env-hash one tt whoami returns; gates stage 5
routing on issue #19 or an explicit TT_HARNESS_AGENT_ID workaround.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant