# Search settlement runtime proof

Two isolated Linux web dev apps, Chromium preview, light theme, 1280x800.
Before: 5c9e5c1e98d946c5647d4ef23519573fb45f58c9.
After: d1cc03e995fb04222e7e5ebbec02680a4f1de279.
No production database, provider login, or live model. No application source changes.

The scenario runner was intentionally bypassed: its replay provider speaks generic ACP,
while this defect is inside the Codex app-server adapter. The subprocess fixture is the
controlled reproduction specified in the task, not a replacement for the T3 server.
All orchestration, persistence, WebSocket delivery, and UI are real.

## Setup used on each commit

Install with `vp i`. Create a fresh `.t3/userdata/settings.json` before starting:

```json
{
  "defaultModelSelection": {"instanceId":"codex","model":"gpt-5.4"},
  "providerInstances": {
    "codex": {"driver":"codex","enabled":true,"config":{"binaryPath":"<absolute fixture path>"}},
    "claudeAgent": {"driver":"claudeAgent","enabled":false},
    "cursor": {"driver":"cursor","enabled":false},
    "grok": {"driver":"grok","enabled":false},
    "muse": {"driver":"muse","enabled":false},
    "pi": {"driver":"pi","enabled":false},
    "opencode": {"driver":"opencode","enabled":false},
    "antigravity": {"driver":"antigravity","enabled":false}
  }
}
```

`chmod +x codex-fixture.py`; start `T3CODE_DEV_SEED=0 T3CODE_AUTO_BOOTSTRAP_PROJECT_FROM_CWD=0 vp run dev`.
Make an empty synthetic git project and register it:
`node apps/server/src/bin.ts project add "$PROJECT" --title 'Search settlement' --base-dir .t3`.

## Matched turns

For each of completed, failed, interrupted, launch one turn with:

```sh
node apps/server/src/bin.ts thread start "$PROJECT" "$CASE" \
  --title "Evidence - $CASE" --provider codex --model gpt-5.4 \
  --json --wait --base-dir .t3
```

Failed and interrupted naturally exit 1. The fixture emits one started + completed
web search as control, then another started web search without its item/completed,
then the selected turn/completed status. The stop prompt instead waits indefinitely.
Launch it using the same command without --wait, open the returned thread in the
paired web client, wait for 'unfinished search query', and click Stop generation.
Both Stop interactions are recorded. Videos are cropped to the conversation region
(1280x520); this excludes the terminal shell prompt. Full-viewport stills show the
read-only inspector output in the app's own terminal drawer.

On both sides also open the completed thread and send `completed` from the composer;
the JSON exports include this additional normal turn as
runOrdinal 2. The summary stills precede this additional turn and show runOrdinal 1.

## Inspection

Run `python3 inspect-searches.py before "$BEFORE_DB"` or `after "$AFTER_DB"`.
The screenshots use the same script from the app terminal, with a local
`.evidence-databases.json` mapping side names to those databases. Set a neutral shell
prompt and clear before inspection so no host or workspace path enters the capture.
Both stills were captured twice at least 500ms apart and were pixel-identical.

`python3 export-evidence.py before "$BEFORE_DB"` (or after) produces the attached JSON:
actual web search projections, execution nodes, and persisted update histories.
Each control has exactly running -> completed and no further updates; both its full
completed item and full completed node equal their final persisted projection.
No unit tests were used as evidence. No projection rows were inserted or modified.
