# Deterministic synthetic fixture and rerun

Run only from `/home/ubuntu/wt/pr-23751` with its existing installed dependencies. No installed second checkout; no checkout switching; no real T3 database; no browsers or servers; no typecheck invocation. Node v26.12.1, SQLite 3.54.0. All databases belong to this capture under `/tmp/ev-23751/runtime-capture`.

Recorded merge-base is `git merge-base HEAD origin/main`: BEFORE 4eae8ae011e2e56ca20159c13f3fb8a2ac49a991. AFTER 19f654326598cc1f7411a56dbb07e651b6b5f254. Local `main` was stale, so the first local-main capture is INVALID and excluded from comparison. `prepare.mjs` extracts selected files with git show and rewrites relative imports to the one installed checkout. Projection sources get only a timing wrapper around selectShellThreadRows; original/transformed hashes are in sources.json. The remaining dependencies are shared at HEAD; the five-file PR diff changes no other runtime dependency. This is selected-source before/after, not two independently built server binaries.

Before each rerun, execute `df -BG --output=avail /` and inventory ALL of `/tmp/ev-23751`. Require >=6 GiB free, reserve >=5 GiB stop threshold, <=1.5 GiB total synthetic databases. Do not remove another reviewer's files. For a clean rerun remove ONLY these owned filenames and their SQLite -wal/-shm/-journal sidecars: runtime.sqlite, synthetic.sqlite (bootstrap), preview53.sqlite, preview54-no-cleanup.sqlite, preview54-cleanup.sqlite, preview53-fail-retry.sqlite, preview53-unexpected.sqlite. Preserve text and driver files. Each command below is sequential; retain exit status and stdout/stderr.

```
node /tmp/ev-23751/runtime-capture/prepare.mjs
node /tmp/ev-23751/runtime-capture/seed.mjs
node /tmp/ev-23751/runtime-capture/runtime.mjs before
node /tmp/ev-23751/runtime-capture/plans-migrate.mjs
node /tmp/ev-23751/runtime-capture/runtime.mjs after
node /tmp/ev-23751/runtime-capture/augment.mjs
node /tmp/ev-23751/runtime-capture/compare.mjs
node /tmp/ev-23751/runtime-capture/verify.mjs
node /tmp/ev-23751/runtime-capture/preview.mjs
node /tmp/ev-23751/runtime-capture/delta-compare.mjs
node /tmp/ev-23751/runtime-capture/mutation.mjs
```

Only `prepare.mjs` recomputes refs: require the recorded HEAD and merge-base above before accepting a reproduction. Extraction files and original sources are retained in the bundle. Symlink `runtime-capture/node_modules` to `/home/ubuntu/wt/pr-23751/apps/server/node_modules` if reconstructing from the bundle; this reuses the one installed checkout.

Seed schema: real merge-base migration runner through 67, no manually reduced runtime schema. 1,000 deterministic threads; every tenth initially has no runs; all others have 10 runs and 100 assistant items/run. Run 8 is rolled back, run 9 is failed for t%4==1 and otherwise running. Latest interrupts match t%3==0. Every populated thread also gets a runless item, missing-run item, and unrelated interrupt. IDs/dates/padding have no randomness. 20-thread transactions, reserved batch upper-bound checks and actual file/free-space/total checks after each commit. Initial 903,000 items. The fixture payload padding is synthetic count-only assistant history; this does not test history-page decoding.

Augmentation yields 903,003 items and 9,002 runs: runless-only t0000; empty t0010; latest-only t0017; blocking-only t0013; both t0009; neither t0029. Source t0001 is archived in another project and marked v1_import (one inherited runless item). Fork t0002 ends inherited history at r1_3: visible count 1+400+1+901=1303; nested t0004 expected 1704. Missing/deleted sources and a two-thread fork cycle are included. 998 active nondeleted shells; 650 threads have a running run. compare.mjs deliberately toggles only the new index on this same database for before/after; it retains the migration ledger during that controlled comparison. Migration apply-once correctness is measured separately before augmentation.

Snapshot and subscription equality are deepStrictEqual plus empty byte diff; no sorting or field omission in shell results. Grouped count absent rows are normalized to the existing default zero for comparison. SQL full-row comparison omits only the two count fields intentionally moved into the separate count query; those counts are compared independently. No ANALYZE or cache-flush claims. First measurement is first-in-process with OS cache already populated, not cold disk. Three warm repetitions follow. In-process subscription calls the actual ws.subscribeOrchestrationV2Shell handler, real projection read/decode and real event store, with empty synthetic project list and a ThreadManagement bridge. It excludes network, RPC encoding/ACK, real repository enrichment and reader-worker scheduling. Delta test applies and appends an event in a transaction, publishes only after commit, consumes thread.updated, then restores its synthetic state. No sleep or polling determines success.

Five small file-backed preview fixtures cover 53, 54 with/without cleanup, injected rollback/retry, and unexpected-history rejection; each has 1,000 synthetic items. Migration/import ledger, created_at and data are checked. These are not upgrades of real published-user databases.
