Real-app proof: status-filtered turn-item reads

Base: 90fc3e900b3d839d0be2fc5b49e60b71a52b9c61 (merge-base of origin/main and head)
Head: 1afd5cb2123eda0364897765ff8391d8aadc613f
Environment: Linux x86_64, Node v26.13.1; both commits measured sequentially on the same machine.

Files:
 driver.mjs: seeds synthetic data through production ProjectionStore.apply and measures the exact status-only service call.
 compare.py: standalone production-service comparison (15 warm, seven fresh-process cold samples).
 trace.cjs: observes the production SQLite worker's actual statement execution without changing its SQL or parameters.
 stop.mjs: calls the real running server over MCP using the app's normal CLI authentication/session helper.
 app-compare.py: runs actual servers and the same MCP Stop action on both commits, with 15 warm and seven cold samples.

Reproduction from clean checkouts and fresh synthetic state:
 1. Install dependencies with vp i in both checkouts. Set BASE_CHECKOUT and HEAD_CHECKOUT to those absolute paths.
 2. Put these scripts in a new scratch ROOT. Create separate BASE_HOME/userdata and HEAD_HOME/userdata directories and an empty synthetic WORKSPACE directory.
 3. Seed each side using its own commit:
    node driver.mjs "$BASE_CHECKOUT" seed "$BASE_HOME/userdata/statev2.sqlite" "$ROOT/base-seed.json"
    node driver.mjs "$HEAD_CHECKOUT" seed "$HEAD_HOME/userdata/statev2.sqlite" "$ROOT/head-seed.json"
 4. Run each checkout's official CLI to create a project in its own state:
    T3CODE_DEV_SEED=0 node <checkout>/apps/server/src/bin.ts project add "$WORKSPACE" --base-dir <side-home> --title 'Synthetic proof'
    Record the synthetic project ID printed for each side as BASE_PROJECT and HEAD_PROJECT.
 5. Run:
    python3 app-compare.py "$ROOT" "$BASE_CHECKOUT" "$HEAD_CHECKOUT" "$BASE_HOME" "$HEAD_HOME" "$BASE_PROJECT" "$HEAD_PROJECT"

Seed and actual server action:
 The child thread has 31,000 reasoning items with 3,300 text bytes each (~97.6 MiB text); nine items at ordinals 3100,6200,9300,12400,15500,18600,21700,24800,27900 cycle pending/running/waiting, and all other items are completed.
 A second synthetic thread has 31,000 ~106 KB items. Alternating writes scatter target pages through a ~3.33 GiB database.
 The app comparison starts the actual source server with its own --base-dir, localhost port, --dev-url, and T3CODE_DEV_SEED=0. No real user's database is read or copied.
 After startup recovery, driver.mjs parents creates 32 completed parent runs with stale native-task records pointing to the long child thread, through production projection events. This must happen after startup, because recovery correctly cancels stale tasks at boot.
 stop.mjs calls t3_thread_interrupt(threadId=parent, stop=true) over MCP. This is the server's normal Stop action, not a substituted query endpoint.
 Orchestrator.endNativeSubagentTrees inspects the child's live, runless items. That production query has the reported status predicate plus a run_id IS NULL selection; it returns the same nine rows on both sides. The additional run filter and captured query are in real-app-results.json.
 Stop must also mark the parent task interrupted; the driver verifies that persisted outcome after each action. There are no real provider calls in this synthetic recovery-state flow.

Measurements:
 Warm: one discarded action followed by 15 measured actions, each on a distinct identically seeded parent task, against one running server per side.
 Cold: seven fresh servers per commit, with commit order alternating. After startup and fixture preparation, POSIX_FADV_DONTNEED requests file-cache eviction on only that side's synthetic database before the MCP action. There is no OS-wide cache flush.
 The query duration is captured inside the actual server's SQLite worker from statement execution through completion of result iteration, before hashing or writing the capture.
 The MCP action duration includes the full tools.call request/response, but excludes CLI module loading, authentication, and session setup.
 Every measured query must return exactly the nine synthetic child records. Their full ordered payload SHA256 must agree across every run and commit. The task must end interrupted.
 The raw samples, actual SQL parameters, EXPLAIN plans and MCP results are included in real-app-results.json.

Scope:
 The direct service comparison additionally measures the exact status-only read from the report (no run filter), including reader routing, transaction and decoding. The real-app Stop action adds a runless-item filter.
 The author's 24-30 GB personal database and absolute 35 ms / 33 ms results are not reproduced; this is synthetic data at the triage reproduction's approximately 3.3 GB scale.
