# Evidence index: issue 17548

Scope: [#17548](https://git.cafe/pingdotgg/t3code/issues/17548). Independently executed tests in `/tmp/triage-17548/evidence-checkout`, detached at [95cddc290c](https://git.cafe/pingdotgg/t3code/commit/95cddc290c), against baseline [70e5e384da](https://git.cafe/pingdotgg/t3code/commit/70e5e384da). No server/browser started or implementation edited in the target checkout by this test agent. No push, PR, or watcher.

Visual matrix: empty, server-only exception. No visual rows fabricated.

[Original proof matrix](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/9ae76fdd534d1fa5/proof-matrix.md)

[Before runtime transcript](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/65c7317b132b04fc/runtime-before.txt)

## Captured artifacts

[test-red.txt](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/1c6463f95ea6e305/test-red.txt)
[test-green.txt](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/c83514e19b465f30/test-green.txt)
[test-isolated-child.txt](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/2259ed94289628a9/test-isolated-child.txt)
[red-reversal.patch](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/87605710f6224519/red-reversal.patch)
[isolated-fixture.patch](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/dae646a621f47d53/isolated-fixture.patch)
[runtime-after.txt](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/8c8683431870513d/runtime-after.txt)
[test-isolated-child-fixture-error.txt](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/94513adae75d6807/test-isolated-child-fixture-error.txt)

## Exact execution and results

All three runs used:

```sh
./node_modules/.bin/vp test run apps/server/src/orchestration-v2/ThreadSettlementService.test.ts --reporter=verbose
```

Dependencies installed locally in disposable checkout with `vp install --offline --ignore-scripts`; workspace links therefore remain inside the disposable checkout. No tests ran in the active target checkout.

- Red: HEAD remained 95cddc290cfffc94927c7f3f55fa253d213ee131, with only `ThreadSettlementService.ts` replaced by its exact blob from [1518140257](https://git.cafe/pingdotgg/t3code/commit/1518140257). This is a dirty reversal run, not a checkout/run of that commit. Saved `red-reversal.patch` records the complete distinction. Exit 1; 22 pass, 1 fail. Exact failure: expected `parent-thread`, received `delegated-child-thread`.
- Green: restored exact tracked HEAD, no fixture/source changes. Exit 0; all 23 tests pass.
- Isolation: same production HEAD plus ONLY saved ephemeral `isolated-fixture.patch`. Exit 0; all 24 tests pass. Child `/worktrees/child` runs settle hook; parent `/worktrees/parent` stays active in mock projection; no settlement commands dispatched; child's idle-terminal cleanup observed. Fixture restored after run, never committed. The parent remains an in-memory fixture: actual provider running-state proof comes from the primary runtime, not this unit test.
- Initial isolation fixture attempt failed because its test body requested a dependency hidden by the harness layer. This was a fixture-only error after the child hook had already been received, not a product defect. Its exact output is preserved separately. Final fixture uses the harness's supplied parent state and records dispatched commands instead.

## Matrix branch disposition

| Branch | Direct proof | Result / qualification |
| --- | --- | --- |
| Shared-worktree subagent settles while parent runs | Red failure; green owner regression; primary after transcript A | Before runtime shows erroneous hook with running/unsettled parent. After A shows settled/completed child, running/unsettled parent with equal paths, successful cleanup span and empty cleared hook log. PASS |
| Owner later settles | Green owner regression; once-only/re-emitted test; primary after transcript B | Owner settled after completed turn; exactly one hook line after empty child-stage log. PASS |
| Isolated-worktree subagent | Ephemeral fixture diff and 24-pass output including `ISOLATION PROOF` JSON | Unequal paths, child-specific hook, active parent fixture, no dispatch commands. PASS, unit proof only |
| Root checkout / missing worktree | Green `runs the settle script in the thread's own worktree` | Null and absent paths precede valid-path event; first received hook belongs to valid worktree. PASS |
| Re-engaged thread | Green tests before event and during asynchronous shell closure | Marker event provides deterministic queue milestone; no sleeps. PASS |
| Child terminal cleanup | Service source calls closeIdle before new guard; ephemeral isolated test awaits child's closeIdle queue | Shared-path cleanup ordering source-inspected; isolated child cleanup directly asserted. No separate shared-child terminal runtime capture. Source qualification retained from matrix |

The visual exception and required behavioral evidence are satisfied within these qualifications. Runtime transcripts were produced by the primary and inspected/uploaded here; this test agent did not independently drive that app. Cleanup span in A has no thread ID attribute, so its attribution rests on the stable reproduction sequence and timing. Hook lines identify cwd, not thread ID; cleared log boundary and owner action sequence provide attribution.

During evidence collection primary merged main: target checkout became [0466db81b9](https://git.cafe/pingdotgg/t3code/commit/0466db81b9). Both settlement service and test are byte-identical between that head and tested 95cddc290c; other merged files differ. These artifacts prove the requested head and must not be described as full post-merge test execution. Target status and disposable status were clean at final inspection. Disposable worktree retained for inspection; no process remains from these completed test commands.

## FRICTION

Environment | vp absent from ambient PATH in disposable checkout | Used target's explicit vp path only for offline dependency installation, then disposable checkout's own vp.

Isolation | Active-checkout test compilation can trigger its dev watcher | Installed dependencies and executed every test in a separate disposable worktree.

Fixture | ProjectionStore dependency hidden by harness output layer | Removed unsupported direct dependency access; asserted supplied parent state and empty dispatch log; preserved initial fixture error output.

Evidence | Red run at dirty HEAD could be confused with red commit checkout | Recorded exact HEAD, substituted source blob commit, command, exit code, and reversal patch.

Coordination | Primary merged main during capture | Recorded new target head and byte-identical settlement files; did not relabel earlier runs as post-merge execution.

Attribution | Runtime cleanup span and hook log omit thread IDs | Retained explicit limitation and tied evidence to cleared log, stable child sequence, state IDs, paths, and owner action boundary.
