# Proof audit pass 2

## Findings first

No blocking missing or contradicted proof row for the accepted server-only Linux scope. The published index, accepted matrix, raw public transcripts, committed fixtures and current draft PR body agree. R1–R6 have accepted runtime/scoped evidence; R7 is an explicit unverified exclusion. This is a proof verdict, not merge authorization or a fresh full code review.

- **R1 timing caveat is preserved correctly.** E1 samples old PIDs at 11:42:15.873739 and 11:42:28.455429; local selected recovery line is 11:42:22.329. These observations bracket recovery and do not measure exact pre-recovery CLI exit. The production-layer subprocess fixture and server dependency wiring supply that ordering proof. The public E1 excerpt is truncated before recovery; neither the current body nor index presents it as a precise exit trace.
- **R6 remains scoped-only.** Adapter fixtures demonstrate completion and Stop/exit semantics with protocol fixtures; the SDK/fake-CLI fixture demonstrates launch ownership and record removal on close. No actual-Claude normal completion/cancel PID/ledger transcript exists. Crash continuation is not substituted for that missing observation. A completed turn can retain an idle CLI.
- **R7 remains unverified.** macOS, Windows, desktop-bundled Linux and every-provider launch compatibility have no integrated runtime proof. No-systemd arbitrary grandchildren and unrecorded pre-upgrade survivors are outside the cleanup claim. The remaining identity-read-to-signal race without pidfds is disclosed.
- No overclaim was found in “what else changed.” The complete pinned diff is four server files, 547 insertions / 32 deletions. There are no UI, client contract, rendering, navigation or origin changes. No screenshots or pixel comparison apply under the explicit override.

## Revision binding and source checks

Audited draft [#22833](https://git.cafe/pingdotgg/t3code/pull/22833), branch `fix/issue-15357`, target `main`. Its mirror [#22834](https://github.com/pingdotgg/t3code/pull/22834) was not queried. Origin is GitCafe; all forge reads used cafe after reading cafe-cli/cafe-pr skills. No gh was used.

- **B:** [1688f96568](https://git.cafe/pingdotgg/t3code/commit/1688f965682d331da16a8c39f049592361f69c8d), full SHA `1688f965682d331da16a8c39f049592361f69c8d`.
- **H:** [bc74467048](https://git.cafe/pingdotgg/t3code/commit/bc7446704898fbdd19e25542f0924e0472e9f655), full SHA `bc7446704898fbdd19e25542f0924e0472e9f655`.

Local HEAD and GitCafe sourceOid equal H. Checkout was clean before and after the fixture rerun. The baseline abbreviation resolves exactly to B locally, and B is an ancestor of H. Both after transcripts contain the full H SHA. The audit uses the user-pinned B-to-H diff: current local main has a different merge-base, `07d38b8d17167c8d17fba1184dbe13a307fada74`, and GitCafe currently observes base tip `96f09c6558b098f05ad0c027afa3846209c03d4f`. Neither is substituted for B; this is not a claim that B remains the current main tip or current merge-base.

GitCafe `cafe pr view 22833 --repo pingdotgg/t3code --json` confirmed draft state, branch, target and H. Its description equals `/tmp/issue-15357/pr-body.md` after trimming outer whitespace.

Downloaded all six public artifacts with curl and compared bytes to local evidence: index, matrix, baseline narrative, E0, E1 and E2 are all identical. Thus the local raw evidence examined is the evidence actually published, not an unpublished replacement.

- [Evidence index](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/088d4eb81794ac4d/evidence-index.md)
- [Accepted matrix / pass 1](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/f172d571e3c50874/proof-matrix.md)
- [Baseline narrative](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/7dc988f8c7ec9126/baseline.md)
- [E0 before transcript](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/c0b087d22e41cd37/runtime.txt)
- [E1 no-systemd after transcript](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/7395aef4b9aa4d6d/after-runtime.txt)
- [E2 systemd after transcript](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/734ccf5c6ce91a0c/systemd-runtime.txt)

## Row status

**R1 — SUFFICIENT, runtime B/H plus scoped startup barrier.** E0 backend 20934 has Claude 22811/23324 alive after crash and after restart. E1 backend 51528 has Claude 53331/53871 alive after crash, then absent after restart. Both original runs cancel and continuation runs start. Bash/sleep 54343/54344 and 54627/54628 remain at the after sample; no later exit was observed. The independently rerun committed fixture acquires the production AgentScope layer, removes two recorded survivors before acquisition returns and preserves an unrecorded sibling. `server.ts` provides this layer into server runtime services. That supplies the barrier; PID sample times alone do not.

**R2 — SUFFICIENT, runtime B/H plus scoped systemd acquisition order.** E0/narrative backend 13717, Claude 15367/16413: old CLIs survive crash, recovery at 11:14:29.335 precedes lazy cleanup at 11:14:29.813, then old PIDs are absent at 11:14:33. E2 backend 59868, Claude 64721/65109 and recorded shell/sleep members: survive crash, absent after restart. Cleanup call at 11:46:22.587 precedes recovery at 11:46:23.986. Code awaits the systemctl stop operation during acquisition; committed fake-systemd fixture asserts stop has already occurred before first launch and is not repeated. This establishes the accepted acquisition barrier, not individual exit timestamps or a guarantee about failed systemctl stop commands.

**R3 — SUFFICIENT within captured systemd compatibility scope.** E0 wrapper 17036/CLI 17063 disappear before restart; there is no active-tool baseline capture. E2 wrapper 65489/CLI 65536, codex-code-mode 66709 and sleep 66717 are present before crash and absent before restart. Original Codex run cancels and continuation completes. Committed shared-Codex scope fixture covers scope/OOM policy. No Codex adapter diff or new Codex ledgering. No no-systemd active-tool Codex runtime proof.

**R4 — SUFFICIENT scoped identity/preservation proof.** Committed real Node subprocess fixtures seed immutable records and use only retained spawned PIDs. They assert matching dead-owner orphans are removed; live-owner providers, an unrecorded sibling and mismatched provider identity survive; a mismatched owner identity does not protect an orphan. Fake-systemd live-owner fixture asserts no shared owned-slice stop. Reuse is simulated by start-time mismatch, not actual OS PID recycling. Boot/hostname/state-dir/schema/self/zombie guards are code-inspected, not separately runtime-proven. Identity-read-to-signal race remains.

**R5 — SUFFICIENT production-path scoped proof.** Committed `records the production SDK child before it executes and forgets it after exit` uses the production SDK and default spawn callback with a credential-free fake executable. The executable reads its own PID record at entry; assertions check owner PID, process PID and boot prefix, and await removal on SDK close. Code gates exec on fd 3 until synchronous register completes. Real-Claude E1 demonstrates launch/recovery but does not prove the gate boundary by itself. Gate/write failure injection is not covered by a dedicated runtime fixture.

**R6 — SUFFICIENT accepted scoped compatibility; real-Claude lifecycle UNVERIFIED.** Inspected adapter fixture `stops background work after the turn settled`: waits for completion, interrupts, checks one close and no pending background work/continuation. Parameterized `settles a plain background subagent and its open call on %s after the root turn completes` checks completed root followed by exit/Stop and resulting failed/cancelled subagent plus failed/interrupted tool state. R5 independently covers real SDK subprocess close/ledger removal. These complementary fixtures are not a real-Claude end-to-end completion/cancel reproduction. Pass 2 did not rerun those suites.

**R7 — UNVERIFIED, accepted exclusion.** No macOS, Windows, bundled Linux or every-provider integrated capture. Platform branches and representative Codex/terminal policy are inspected/scoped evidence only. Linux source-dev captures cannot establish packaging or cross-platform behavior. Shared eager AgentScope initialization can affect other providers; no universal launch claim is made.

## Independently rebuilt committed fixture at H

Worktree: `/home/ubuntu/wt/issue-15357`. Exact command:

```sh
node_modules/.bin/vp test run apps/server/src/process/agentScope.test.ts -t 'stops both recorded survivors before startup completes and leaves an unrecorded process alone'
```

Result: **exit 0; 1 test passed, 9 skipped by name filter; 1 file passed**, 2026-10-21 11:59:56 UTC, duration 8.60s. Transcript: `/tmp/issue-15357/pass2-fixture.txt`. This is the requested rebuilt affected fixture in place of pixel comparison, not a new app-server runtime capture.

The existing fixture launches four temporary Node processes through `ownedProcessFixture`, retains each PID, awaits IPC readiness and exit Deferreds, seeds two orphan records, stops its own owner, acquires the real production layer and checks cleanup/preservation. Finalizers stop and await only those retained child processes. No provider credentials, dev server or browser are required or launched. No tests were added or changed.

Historical counts remain separate reported runs: implementation 226, code reviewer 229 across five files, pass-1 auditor 213 across two files. Pass 2 adds only the single filtered pass above; it does not independently certify or sum those historical counts.

## Complete change scope / actual gaps

Pinned diff changes only:

- [ClaudeAdapterV2.ts at H](https://git.cafe/pingdotgg/t3code/blob/bc7446704898fbdd19e25542f0924e0472e9f655/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts): Linux launch gate, ownership registration before exec and record removal on exit; retains direct non-Linux/SDK Windows branches.
- [providerProcesses.ts at H](https://git.cafe/pingdotgg/t3code/blob/bc7446704898fbdd19e25542f0924e0472e9f655/apps/server/src/process/providerProcesses.ts): Linux immutable per-owner/per-launch ledger, boot/start identity, live-owner preservation and recorded orphan reconciliation.
- [agentScope.ts at H](https://git.cafe/pingdotgg/t3code/blob/bc7446704898fbdd19e25542f0924e0472e9f655/apps/server/src/process/agentScope.ts): provides ownership service, preserves slice for another live recorded owner, eagerly awaits systemd initialization at acquisition.
- [agentScope.test.ts at H](https://git.cafe/pingdotgg/t3code/blob/bc7446704898fbdd19e25542f0924e0472e9f655/apps/server/src/process/agentScope.test.ts): acquisition-order fixture and committed ownership/gate subprocess fixtures. Existing adapter compatibility tests are evidence, not additional changed files.

No implementation changes or new committed fixture data were needed. App fixture seeding is documented as a UI procedure; existing committed deterministic fixtures cover scoped rows. Host-side startup applies across clients, but mobile/remote connection flows were not separately tested. Evidence is sufficient for recorded Linux Claude CLIs, not arbitrary process trees, old unrecorded processes, exact runtime death timestamps, actual-Claude completion/cancel or excluded platforms/artifacts.

## Friction and execution constraints

- **tool:** native thread linking rejected singular `/pull/`; retry with explicit GitCafe host/repository/number succeeded. Final linked-PR listing confirms this PR. Python urllib received HTTP 403 for the public artifact; curl succeeded and all six byte comparisons passed.
- **brief:** preserve pinned B despite moving main; separate runtime, scoped and unverified rows; do not conflate three historical test counts with this rerun.
- **policy:** explicit server-only override and read-only subagent scope; no server/browser launch, no screenshots, no implementation edits, no forge comments/push/merge. Raw dev logs with pairing credentials were not uploaded; only a selected recovery line was read.
- **runbook:** no additional blocker; repeat procedure and deterministic seeds already exist.
- **infra:** root disk remained 9.2 GB free at step checks, above 2 GB stop threshold. No install/new worktree needed.
- **forge:** cafe reads succeeded; current body and H match supplied evidence.
- **model:** no blocker; audit by GPT-6.1-Sol through Codex in T3 Code.
- **other:** no blocker. Completed within the 60-minute budget on 2026-10-21 around 12:00 UTC. Original runtime capture cleanup is the primary's supplied account; this audit did not attempt to signal/revisit old runtime PIDs.

Report is written outside the worktree and uploaded using ghdrop; no public forge write is performed. This pass inspected/rebuilt proof and did not witness or replay the primary's browser/provider sessions.

VERDICT: SUFFICIENT
