# Rebuild the synthetic capture state

The accepted recordings and their source drivers are pinned in evidence-index.md. No credentials or copied database are included. Generated setup/thread scripts record the exact synthetic IDs used in this run; a fresh server generates new IDs.

1. Create the two requested sibling worktrees at the commits linked in the index. In each run `vp install` and `vp run --filter=@t3tools/desktop build:bundle`. Fetch Electron once from apps/desktop with `node node_modules/electron/install.js`.
2. Put the uploaded scripts in this scratch directory. Run `python3 seed-project.py` once against a fresh synthetic project path. Before every dev server set T3CODE_DEV_SEED=0 and T3CODE_TELEMETRY_ENABLED=false. Do not seed from live data. Start each `vp run dev:web --dev-url http://127.0.0.1:16331` (16332 for after) and read its actual Vite port. This run used localhost:7284 and localhost:6225; adjust start-desktop.py/capture-web.mjs if necessary.
3. The uploaded initial start-desktop.py records profile reuse after the first capture restart. For a completely fresh replay, use `XDG_CONFIG_HOME=str(run/'config')` and `XDG_DATA_HOME=str(run/'data')` on the first start; keep that profile for subsequent restarts. Start desktop using the Electron binary, isolated .t3 home, stub PATH, VITE_DEV_SERVER_URL, headless-desktop, and desktop-observer.cjs as shown by that script. Do not include main-harness.cjs for Tier 1. The uploaded headless-desktop-1440.sh is the stock wrapper with only its Xvfb geometry changed.
4. `rebuild-seed.mjs before` then `rebuild-seed.mjs after` is a convenience reconstruction driver: it registers new root/nested projects via the real CLI, installs the free Replay dev adapter using Vite-plus Node, regenerates thread sources, issues an actual scoped read-only bearer into a private local file, and runs the original Replay seed drivers. It is provided for reconstruction and was not itself used as the original seed command. The original individual drivers were used. Read the resulting rebuild-ids-side.json and substitute the new environment ID in goto-root/goto-subdir/capture-web (the IDs in this evidence are synthetic). Do not upload the newly issued bearer. No paid turn is required.
5. prepare-capture.mjs then capture-a01-full.mjs through capture-a05.mjs drive Tier 1. goto-subdir then capture-subdir.mjs side A04/A05 cover nested workspaces. capture-readonly.mjs side A09/A10/A11 uses the real scoped bearer via CDP HTTP header. restore-session.mjs restores the normal desktop bearer. capture-h03.mjs invokes the actual registered IPC. Each recording is stored in a new timestamped capture directory.
6. A06 uses capture-web.mjs: issue a fresh one-time credential via `auth pairing create --base-dir .t3 --json` into the corresponding private web-pair-side-private.json, then run the web driver. It records a real browser with no bridge. Never publish the credential. Run one capture at a time so launcher logs cannot mix.
7. Renderer-only harnesses are separate: enable-renderer-harness.py saves each original compiled preload privately and prepends preload-harness-prefix.cjs; main-harness.cjs supplies explicitly synthetic bridge outcomes while preserving platform and the rest of the bridge. Reload via switch-renderer-mode.mjs; run capture-renderer-harness.mjs side A07/A08/H01/H02. These are not Windows or OS-selection recordings. Restore the original preload before any further real IPC capture.
8. Open the chronological inspection-contact-sheet.png for every accepted clip. Unsuitable attempts are kept privately and excluded. No screenshots are published as static before/after evidence. Use upload-reviewed.py only after review; its artifact selection is a convenience and does not judge validity. Never upload private token files, raw app logs, or a draft composer containing private operational model identifiers.

AI-assisted; verified with the tests and tools listed above.
