Repository navigation
Description
Raised by the architect on #238. Filed because the thing currently protecting a day of evidence
is a defect, and a defect is not a plan.
The situation
Spec 146 Phase 10 (#235 / #238) started the 24-hour gate run whose elapsed result Phase 14
consumes. That run is:
- a
nodeprocess started from.builders/air-235/, plus a t3code server on port 3805, - writing its evidence to
.builders/air-235/tools/t3-server/.runtime-runs/gate-24h.json, - started
2026-08-30T08:28:53Z, completing roughly2026-08-31T08:36Z.
The normal completion path for a builder is afx cleanup, which removes the worktree. That would
take the process, the server's state directory, and the evidence with it — and the run cannot be
restarted without losing another day.
Why it survives today, which is the problem
It survives because afx cleanup currently refuses on this worktree: porch's post-merge state
commits are stranded on the completed builder branch and cleanup declines to remove a worktree
with unmerged commits (#233).
So a day of evidence that a later phase depends on is being protected by an unrelated bug, in a
command whose whole purpose is to remove that directory. The moment #233 is fixed, the protection
disappears — and it disappears silently, because nothing connects the two.
What should own the run instead
Some options, roughly in order of how much they change:
- Run long-lived evidence outside any worktree.
T3_HARNESS_DIRand the output path are
already configurable; pointing them at a workspace-level directory (or~/.agent-farm/) makes
the run independent of any builder's lifecycle. Smallest change, and it removes the coupling
entirely rather than guarding it. - Have
afx cleanupknow about live runs. A worktree with a running long-gate process
refuses cleanup by NAME — "a 24-hour evidence run started at ... is still going" — rather than
by accident. Honest, but it puts knowledge of spec 146's harness into a general command. - Record the dependency where the consumer looks. Phase 14's inputs list the run, and the
run's evidence path is recorded incodev/research/146-long-gate-evidence.md(it is). This is
documentation, not enforcement, and would not have stopped a cleanup.
(1) looks right: the run is workspace evidence, not builder scratch, and it should not have been
inside a worktree in the first place.
Until then
.builders/air-235 must not be cleaned up and the run must not be restarted. That is recorded in
#238 and in codev/research/146-long-gate-evidence.md, which also states that 08:28:53Z is the
start Phase 14 should read — four earlier starts were abandoned and produced no evidence.
Activity
[Spec 146][Phase: 10] The long gate is protected by a bug, and that i…
pseudoseed commentedon Aug 31, 2026
The run completed. Evidence preserved here before the worktree is cleaned up.
This is what this issue exists to protect: the 24-hour gate finished at
2026-08-31T08:35:10Zand its only copy was.builders/air-235/tools/t3-server/.runtime-runs/gate-24h.json, inside a worktree the completion path deletes.Spec 146 criterion 11 is MET. 11 of 11 criteria,
failure: null.{ "spec": "146", "phase": "10", "harness": "claude", "model": "claude-haiku-4-5", "driverKind": "claudeAgent", "gateSeconds": 86400, "startedAt": "2026-08-30T08:29:07.311Z", "finishedAt": "2026-08-31T08:35:10.023Z", "criteria": { "investigate-produced-root-cause": { "outcome": "met", "detail": "The `add` function in sum.js performs subtraction (a - b) instead of addition (a + b), causing the test assertion add(2, 3) === 5 to fail with the actual result of -1.\n" }, "check-fails-before-the-fix": { "outcome": "met", "detail": "node --test exited 1 in bash" }, "restart-loses-no-completion": { "outcome": "met", "detail": "a process sharing nothing with this one read cursor 36 off disk (file contained \"36\"), resubscribed with afterSequence=36, and the turn's completion event — sequence 54, emitted while nothing was subscribed — came back in the CATCH-UP replay rather than live" }, "check-passes-after-the-fix": { "outcome": "met", "detail": "node --test exited 0" }, "pr-branch-reached-origin": { "outcome": "met", "detail": "origin has builder/bugfix-air235 at 9a6a5bb89d6f890ea557a1a03ba913110baa621c" }, "gate-resumes-with-context": { "outcome": "met", "detail": "after 86400s idle — measured monotonically — the thread returned the codeword established before the gate, which was verified to exist in no file in the tree" }, "gate-dispatched-nothing": { "outcome": "met", "detail": "0 commands were journalled during the gate" }, "gate-elapsed-at-least-its-target": { "outcome": "met", "detail": "86400005ms elapsed against a 86400000ms target, measured with a monotonic clock" }, "merge-lands-the-fix-on-main": { "outcome": "met", "detail": "node --test on merged main exited 0" }, "no-pty-code-path-ran": { "outcome": "met", "detail": "38 ESM modules recorded, none matching /node-pty|pty-session|shellper|@xterm/; no terminal.* RPC among 2 distinct methods" }, "pty-witness-can-see-a-pty": { "outcome": "met", "detail": "deliberately importing node-pty after the assertion made the witness report it, so the clean result above is a measurement and not a blind spot" } }, "observations": { "codeword": "MERIDIAN-07C24FBB", "worktree": "/Users/chris/dev/codev-1455/.builders/air-235/tools/t3-server/.runtime-runs/work-gate-24h/worktree", "threadId": "4ff4f84a-53b7-47ca-a46b-a8cff0277fe6", "preFixCheck": { "exitCode": 1, "passed": false, "timedOut": false, "shell": "bash" }, "restart": { "activeAtDeath": true, "cursorAtDeath": "35", "freshProcessRecovery": { "cursorReadFromDisk": 36, "afterSequenceSent": 36, "synchronized": true, "catchUpSequences": [ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56 ], "sawSettleInCatchUp": true, "sawRunningInCatchUp": true, "settleSequence": 54, "error": null, "rawCursorFile": "36", "turnWasInFlight": true }, "parentResumedFrom": 36, "parentAfterSequenceSent": 36, "parentResumeOutcome": { "kind": "replayed", "lastSequence": 56, "attempt": 1, "resumed": true }, "settleSeen": true }, "postFixCheck": { "exitCode": 0, "passed": true, "timedOut": false }, "codewordOnDiskBeforeGate": false, "gateOpenedAt": "2026-08-30T08:29:57.469Z", "gate": { "elapsedMs": 86400005, "measuredWith": "process.hrtime.bigint (monotonic)", "wallClockElapsedMs": 86400769, "journalRecordsDuringGate": 0 }, "pty": { "esmModulesRecorded": 38, "esmHits": [], "cjsHits": [], "distinctRpcMethods": [ "orchestration.dispatchCommand", "orchestration.subscribeThread" ], "terminalRpcs": [] } }, "rpcMethods": [ "orchestration.dispatchCommand", "orchestration.dispatchCommand", "orchestration.subscribeThread", "orchestration.dispatchCommand", "orchestration.dispatchCommand", "orchestration.subscribeThread", "orchestration.dispatchCommand", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.subscribeThread", "orchestration.dispatchCommand" ], "failure": null }The two that carry the criterion:
afterSequence=36, and the completion event at sequence 54 — emitted while nothing was subscribed — arrived in catch-up replay rather than live.It also drove a full BUGFIX protocol end to end on a thread with no PTY: root cause found, check failing before the fix and passing after, PR branch reaching origin at
9a6a5bb89d6f.With this recorded,
air-235is safe to clean up.