Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

10.8 KB
Raw Blame

Complete exact transcript lookup

An explicit resume id used a full readdir for Pi and Claude, and a synchronous first-match walk for Codex. A failed later home or truncated walk could be reported as absence; a first match could hide a conflicting transcript. Resume after a crash, Stop capture and Pi Close read these facts in core.

The former-main golden is committed separately in 2cb987e24. Its 18 observations cover default and moved homes, explicit Codex profiles, missing/unsupported ids, Pi custom ids and colliding workspace encodings. Linux, UTC, fixed time, private homes and abstract workspace realpaths are pinned. Host binaries and optional reader loading are forbidden. The initial recording exposed a random temporary-directory name inside Pi's encoded workspace; the corrected fixture uses a fixed abstract workspace and passed before production edits. The JSON artifact is not re-recorded for the move.

engines/kit/exactTranscript.ts streams a complete pool under a shared 4,096-operation/entry budget, at most 64 roots and 64 existing candidate files, and a depth bound. A shared two-second work deadline is checked between operations. Native calls themselves are not cancellable: these are work bounds and change detection, not a hard elapsed-time guarantee. Directory aliases are traversed once but each path's evidence is retained. File aliases count once. Missing locations, directory listings, selected and rejected candidates are revalidated; the final bounded metadata check has no native await and checks a selected file last. The check is not an atomic multi-file snapshot.

Claude retains exact filename authority and requires a readable regular file. Codex checks its declared first record's id before accepting a filename match. Pi keeps the existing id and workspace header checks, including the distinction between unwritten and unreadable conversations. Ambiguous, unreadable, oversized or changing pools hold the lookup. Subsequent calls gather fresh evidence. The optional history APIs and the registry's legacy synchronous repair remain separate work; the saved-home catalog still requires its own freshness and failure audit. This change does not claim that those remaining paths are complete.

Validation selects typecheck, architecture, unchanged exact-resume/session-store/repair/native goldens, affected repair/capture/Stop/binding specs, core/services and harnessd coverage, and serial resume coverage. Private bundled missing/stalled Pi lanes verify Close retains a live session on conflicting files and succeeds after evidence recovers. The touched machine crash-resume lanes and moved-home lane run privately. Assertion-failing wiring mutations and matched CPU/latency/RSS measurements precede independent review and automatic CI. No release.

The first focused run found that an older golden pins asynchronous stat timestamps for process-age tests, while the new final metadata check reads actual filesystem timestamps. Lookup now obtains actual inode metadata with lstat, resolving a final symlink explicitly; the golden and its artifact remain unchanged. Typecheck and all 210 focused assertions then passed. Routine final receipts, failures, review, CI waiting and merge timing are recorded in the PR. Work began with former-code recording at 16:02 UTC on October 9; implementation followed the committed golden at 16:04 UTC. The original request began October 8 at 23:26:41 UTC; publication remains zero.

Independent review of the first implementation found five control gaps: homes adopted during a read, unavailable or changing Pi workspace aliases treated as exclusions, Pi errors losing the retry code through Close/checkpoint, a header read from a different inode while an ancestor alias changed back, and a matching-name Codex child record with no conclusive id. The correction revalidates current homes and canonical workspace proofs, ties an opened header descriptor to its inspected version, preserves typed holds through checkpointing, and gathers Pi identity before writing the screen. Composed queued Close tests use real native files through capture and checkpoint, retain the same waiting plan for partial and duplicate records, preserve all existing checkpoint bytes, and finish without a new request when evidence recovers. These are safety corrections, not golden re-recordings. The golden fixtures map abstract workspaces to private real directories for canonical identity; the JSON artifacts and healthy answers remain unchanged.

The corrective focused run passed all 369 tests; typecheck independently rejected an inferred test fixture array type. That annotation was fixed before final acceptance. No failed or partial run is represented as a passing gate.

The next independent review caught a separate directory-listing alias race: a root or ancestor could point at another directory only while opendir opened it, then return before target metadata was checked. The lookup now retains symlink metadata throughout each directory/candidate path and through chained relative or absolute targets, under the same operation/deadline budget and an alias-depth bound. Final synchronous revalidation checks those links before accepting the pool. Three directory-redirection regressions cover root, ancestor and chained-target aliases. The ordinary shared ancestors do not use directory-content stamps, so unrelated activity in the temporary directory is not evidence about this lookup.

The alias correction passed typecheck and 371 of 372 focused tests; the remaining test had assumed enumeration alone consumed every budget slot. Its assertion now checks that the shared bound is respected and the iterator closes, including the slots spent inspecting this private path. Final acceptance follows the main integration containing #1120; no healthy golden artifact changed.

Final review found that lexical normalization of bridge/../home could skip a symlink that the filesystem follows before consuming the parent component. The proof now follows link components in filesystem order, with a fourth directory-redirection regression and a successful retry for each alias shape. The earlier integrated head passed all local acceptance (1,942 core, 265 harnessd plus one existing skip, 374 focused tests and 28 private e2e cases); that evidence is limited to its source. The mutation run stopped when the old inspection-error mutation no longer broke the new outer alias guard; it was updated to break the current alias-inspection admission, and the new relative-target regression has its own mutation. Final corrected-source verification follows.

Independent review approved production fb3e02387 against main a847441e5 with no remaining blockers. The final production run passed 1,942 core tests, 375 focused tests, 28 private bundled e2e cases and 57 private tmux tests (15 installed-vendor rows excluded). The harnessd gate failed one existing test because its polling reader parsed an incomplete appended JSON line; it now uses that suite's established complete-line reader. This was a test fixture race, not a passing gate. The selected final gates are rerun after that test-only correction.

All 26 fault variants subsequently assertion-failed after a green baseline. The added descriptor test replaces and restores an ordinary ancestor directory around both opens: it proves the descriptor check independently of the alias check, which had also caught the earlier fixture. The production source remains exactly the independently approved implementation; these final changes add regression coverage and fix the observed JSONL fixture race. E2e/tmux evidence still covers identical production source and test lanes.

Matched runtime cost and final local acceptance

The raw comparison records three interleaved fresh processes per source/workload, ten lookups each, on Node 22.23.2 and macOS x64. Former main is a847441e566cf9c34c960bbd43a5ec8b3ff83e10; current source is fa431e3586a7fce896c3a5f8d3f3c6c67d69e6ea. The former checkout's complete CLI/Store trees were verified identical to that main. Private fixture setup and imports are excluded from lookup CPU/latency; process peak RSS includes them. The embedded driver reproduces all cases. Measurements ran without other local validation from 17:03:05 to 17:03:28 UTC. They are reference measurements, not Linux measurements or numerical performance gates.

Workload Median lookup, former → current (ms) Median CPU per 10 lookups (ms) Median process peak RSS (MiB) Current result
One Claude transcript 0.17 → 0.89 2.56 → 11.84 96.46 → 96.18 exact
One Codex transcript 0.12 → 1.08 1.82 → 15.13 93.68 → 95.11 exact
One Pi transcript 0.40 → 1.05 5.30 → 14.04 93.02 → 95.54 exact
Codex plus 1,000 unrelated files 1.03 → 5.79 10.96 → 113.03 93.48 → 105.40 exact
Two conflicting Codex transcripts 0.12 → 1.79 1.85 → 23.85 95.79 → 94.07 held
Unreadable later Claude home 0.14 → 0.91 2.04 → 14.04 94.55 → 96.20 held
Codex plus 4,200 unrelated files 4.10 → 12.29 43.08 → 199.83 92.88 → 104.07 held

Every healthy lookup returned the exact transcript. Every current ambiguous, unavailable or over-limit lookup held; former code returned an unsafe exact result in those cases. The complete-pool checks add measured work: about 0.7–1.0 ms for these single-transcript cases and 4.8 ms with 1,000 unrelated files. This is an explicit cost of fresh complete evidence, not a claim of faster lookup or constant cost.

Final local evidence: typecheck, 377 focused tests, 1,942 core/services tests and 265 harnessd tests with one existing skip passed (20261009T165856.912427Z-45762); core/services and harnessd retained required 100% coverage. The unchanged production and lane source passed all 28 private e2e and 57 private tmux cases, excluding 15 installed-vendor rows (20261009T165253.657816Z-98926). That receipt also records the subsequently corrected harnessd JSONL failure; it is not described as an all-green receipt. The first serial run passed 356 assertions but missed the already-landed composed Hermes Stop tests in its scope and reached 99.78% branches. Including those existing tests produced 413 passes and 100% statements, branches, functions and lines (20261009T170140.831767Z-64765), run alone. All 26 broken-wiring variants assertion-failed.

Independent read-only review approved production fb3e02387 and final test-only head fa431e358 against a847441e5, with no remaining blockers. Final report review and CI/merge timing are recorded in the PR. Implementation ran after the 16:04 golden through the last production correction at 16:50; test-only work ended at 16:58. Validation and review overlapped that work; final deterministic gates ran 16:58–16:59, complete serial resume 17:01–17:02, and cost 17:03. The original request began October 8 at 23:26:41 UTC. Publication remains zero.