# Independent reproduction of one state

The captures belong to before [3cc31ed27c](https://git.cafe/pingdotgg/t3code/commit/3cc31ed27c8956b36cee35a50509fb7c6869592b) and after [589c61891b](https://git.cafe/pingdotgg/t3code/commit/589c61891b4d781cb14e0243e3e666370b994245). They do not claim to run a later merged commit. `metadata.json` gives the exact mixed before provenance and blob hashes. Do not switch commits or restore files while another writer is using the checkout.

## Preconditions

Use `/home/ubuntu/wt/pr-13351` only. Existing dependencies include Playwright 1.60.0 in apps/web. Cached Chromium path is in capture.cjs. glab must be genuinely authenticated. The fixture is a real public nested-group GitLab Express template and a real small GitHub repository; no mocks of provider lookup, RPC, Git, network, or UI. No live T3 state is needed or allowed. A fresh server creates its own default workspace project; all clone fixtures live below the isolated home.

On this machine, system gh 2.45 is too old for auth discovery. The evidence server used a temporary gh 2.83.2 binary under `/tmp/ev-13351-bin`; it did not replace the system binary. Download from the official CLI release if reproducing on a machine without a compatible version. That binary uses existing authentication; credentials are not in these artifacts. Do not use gh to read this PR's state.

## Server and recording setup

Choose unused ports/display, and a NEW output/home/run name to avoid existing clones. Defaults used for this run: origin http://localhost:7684, server 15724, display :133, output /tmp/ev-13351-captures, home /tmp/ev-13351, run final. The driver accepts EVIDENCE_ORIGIN, EVIDENCE_DISPLAY, EVIDENCE_OUTPUT, EVIDENCE_HOME, EVIDENCE_BROWSER_STATE. Its Playwright import, Chromium path, and provenance file path refer to this authorized checkout. For a different machine, adjust these three paths first.

1. Verify the desired definition hash against metadata.json. For AFTER, no restore is necessary when the checkout already contains that blob. For BEFORE, copy definition.before.ts over packages/source-control-gitlab/src/shared/definition.ts, and restore definition.after.ts in a finally/trap after testing. The only other replacement change is a test file; it has no runtime effect.
2. Create the new output directory. Put git-wrapper.py on a temporary PATH as an executable named git. Export EVIDENCE_OUTPUT to that directory for BOTH the server and capture driver. The wrapper logs only real clone commands/errors/exits and executes /usr/bin/git unchanged. Do not put it on the global PATH.
3. Copy known-hosts.txt to /tmp/ev-13351-known-hosts (or update ssh-config.txt to a task-specific path). These are public GitLab host keys captured when connecting to its official alternate SSH endpoint. Use GIT_SSH_COMMAND='ssh -F /tmp/ev-13351-ssh-config', with ssh-config.txt copied to that path. No agent/identity is used. Normal GitLab port 22 timed out on this host; port 443 genuinely rejects the no-key login and lets the app exercise its existing HTTPS fallback. This is an explicit environment fixture, not a product change. The HTTPS GitLab and GitHub clones use the normal network.
4. Start Xvfb with a 1280x1000x24 screen, retaining its PID/session. The app viewport remains 1280x900 DPR 1; the extra 100 pixels accommodate Chrome's toolbar, so x11grab includes the entire client. Example: `Xvfb :133 -screen 0 1280x1000x24 -nolisten tcp`. Retain the spawned PID. Do not kill another X server.
5. In the checkout start `T3CODE_DEV_SEED=0 vp run dev --home-dir <NEW_ISOLATED_HOME> --no-seed`, with the temporary PATH and GIT_SSH_COMMAND above. Retain the terminal session or spawned process PID. Never use ~/.t3/userdata, migrate-dev-db, VITE_HTTP_URL, or VITE_WS_URL. Read actual ports from the dev-runner line and set EVIDENCE_ORIGIN accordingly. Wait until Listening and Vite ready; warm-cache restarts can temporarily interrupt pairing.
6. Pair privately. Set EVIDENCE_PAIRING_URL in the process environment to this NEW server's own startup pairing URL, then run `node bootstrap-browser.cjs`. Set EVIDENCE_BROWSER_STATE to a private path. This state contains an authentication cookie: do not upload it. No reusable credential or startup pairing URL is included in this artifact set. Alternatively pair manually and save equivalent Playwright storageState. The capture driver never needs a public token.
7. Run `node capture.cjs after G1-G2` to independently rebuild the affected after state. Omit G1-G2 to run all three interactions. The driver actually looks up the repository through the selected provider, fills a destination, submits it, records with ffmpeg x11grab, and logs actual RPC/Git evidence. Browser errors are retained in steps and an error screenshot. Do not count interrupted rows as completed. For fresh output, capture.cjs creates steps.jsonl and rpc-after.jsonl; the server wrapper creates git-trace.jsonl in the same output. Use a fresh EVIDENCE_HOME for an independent rerun; paired before/after share that sandbox home and reset it between states.
8. Inspect the actual submitted projectClone.start remoteUrl and Git clone argv. AFTER G1-G2 must start with `https://gitlab.com/gitlab-org/project-templates/express` (the actual GitLab web_url, without .git), exit 0, and produce that origin. BEFORE sends SSH, receives real Permission denied(publickey), then falls back to HTTPS with .git. GitHub stays HTTPS. C2 submits the pasted SSH unchanged on both revisions, then the unchanged server fallback succeeds over HTTPS; these captures do not claim authenticated SSH success.
9. Stop everything you started, using retained sessions/PIDs. Restore the after definition, check its SHA256, `git status --porcelain`, and HEAD. Never kill by name/path/pattern. Do not merge, push, comment, or watch.

## Capture and fixture drivers

capture.cjs is the final raw capture driver; git-wrapper.py is its server-side trace companion. bootstrap-browser.cjs creates only a private paired browser state. helper-fixtures.mjs executes the real shared helper for G3/G4/C3/C4/S2, including both explicit SSH forms and the self-hosted HTTP edge. Run the helper with node; the two captured outputs are helpers-before.jsonl and helpers-after.jsonl. focused-tests.txt records 7 passing existing/changed project-helper tests.

build-evidence.py produces 3 before/after sheets and 18 unamplified RGB diffs (9 pairs at thresholds 0 and 16). It intentionally does not mask dynamic content. caption-recordings.py creates supplemental videos that replace only Chrome's 87px toolbar with summaries of genuine RPC/Git trace events; raw videos are also provided. Approximate overlay timing is relative to ffmpeg spawn; raw UTC timestamps remain authoritative. These two postprocessors use the task's final artifact names and 'matched-' destinations; adjust root/run selectors when rebuilding a separate audit output. Pillow and NumPy are available on this host.

Every final screenshot waited for network idle, fonts, two animation frames and two byte-identical screenshots 500ms apart. Screenshots hide the caret and disable animations; browser reduced-motion is enabled. Scripted steps use the same input and keyboard Enter submission on both states. Final absolute destinations are identical between states; sandbox-only reset and archived before clones keep real clones isolated.

## What else changed in images

No component, CSS, theme or layout was changed by this patch. Unmasked image differences also include before/after destination and project labels, elapsed-time labels, current repository/branch, loaded title versus local directory name, and existing asynchronous Commit/Push/sidebar metadata. Those are test-state/timing differences, not claimed visual changes. Pixels are evidence of the full observed surface, not a zero-diff promise. The UI repository description uses HTTPS on both revisions; only public RPC/Git traces establish first-attempt transport.

## Limits

G1/G2/C1/C2 and tracked web P1 are live browser/Git verified. G3/G4/C3/C4/S2 are real helper execution. P2 (older blocking server), remaining E1 gates/launchers, and direct S1 service/protocol branches retain the matrix's source-only verification. No private repository, authenticated SSH success, native iOS/Android, Electron shell, relay, tunnel, or multi-environment runtime is claimed. iOS is expressly allowed unverified; Android is optional. Self-hosted HTTP web_url is selected verbatim after the change, not upgraded to HTTPS.

## Matched-state correction

The final evidence reuses the exact same visible clone destinations on both revisions: `/tmp/ev-13351/clones/matched-G1-G2`, `matched-C1`, `matched-C2`. The browser clock is fixed at 2026-10-24T23:30:00Z on both states; timers/network remain live. The same paired browser seed and an offline backup of this sandbox's SQLite state are restored before the after pass. Before-cloned directories are moved to an archive outside those destinations while the server is stopped. The final after projectClone.start requests use the same paths as before. This prevents an existing target from changing after behavior. Only sandbox data is reset. No live state is read or copied. The paired cookie/database seeds are deliberately not uploaded because they contain auth/local state; independent reproduction creates its own private seed via bootstrap-browser.cjs. For exact local paired reconstruction, make an offline SQLite backup with Python sqlite3.Connection.backup, retain the same private browser state, stop your server between phases, move only your fixture clones out of the way, restore the snapshot, and restore the browser seed. The capture driver uses identical destination labels and fixed time. The driver attempts to close the optional right panel through its UI control when available; the floating repository details card remains visible. Its preference and initial data are the same on both states. There is no pixel masking, screenshot DOM rewriting, or pixel amplification.

## Observed network/capture limits in this final run

Five of six input/confirmation pairs are byte-identical. C2 input has 1427 changed pixels (0.1239%), confined to the blurred background branch label (x=1003..1090, y=223..248), maximum channel difference 9/255. All six pairs have zero pixels over threshold 16. No image was masked or edited to suppress this difference. The original G1 recordings contain stale master/diff metadata. They are historical transport recordings, not comparable settled outcomes. Replaced outcome screenshots and supplementary settled recordings reopen the same existing sandbox draft and project record with the actual before and after clone directories swapped into the identical path while the server is stopped. clone-state-proof.json proves both real clones have identical HEAD, main and clean status. settled-outcome.cjs uses the local private draft/browser state; independent fresh reconstruction uses capture.cjs and must wait for main / +0 / -0 in addition to pixel stability. The private draft identifier is local fixture state, not an authentication credential. No DOM or screenshot pixels were rewritten.

C2 after preserved explicit SSH and got real publickey rejection, then HTTPS failed resolving gitlab.com. Its failure screenshot/video is retained. Clicking the real Retry button later produced another real SSH rejection, an HTTPS fallback, and Git exit 0; the final origin was verified independently. The recovery recording is separate, and the retry driver eventually timed out waiting for a repository-identity label after the successful Git exit. The app navigated back to the existing default thread during recovery, so the supplemental video does not claim a matched final project screenshot. These are disclosed environment/capture limitations, not a claimed transport regression. No authenticated SSH success is claimed.
