# Native reproduction

Run the same flow once from the base checkout, then from the head checkout:

- Base: [7a00a2bc73](https://github.com/pingdotgg/t3code/commit/7a00a2bc735a2f00eeb5ba1e9f495edd92a72e86)
- Head: [a1e6323501](https://github.com/pingdotgg/t3code/commit/a1e6323501d31e1c3fab02ef014e669ea47097f3)

The captures use a pooled iPhone 18 Pro on iOS 27.2, portrait 402×874, light appearance. Both checkouts resolve native fingerprint `7a5e38dcd9b0b2bb08ffea78e448258ccc116497`. Install through `vp run mobile:install ios --session "$session"` before Metro. The pool's current CLI worked; the scenario mobile engine's older agent-device dependency did not.

Use a fresh run directory on each side. Copy `seed-pressure-manual.ts` into `scripts/scenarios/` so its relative import finds the repository's `t3.ts`. Set these variables to your own paths and device session:

```bash
export T3CODE_DEV_SEED=0
export T3_PROOF_PRESSURE=overload
export NODE_OPTIONS="--require=$(realpath psi-preload.cjs)"
host=$(tailscale ip -4 | head -n 1)
```

1. Start with a freshly leased device, or clear both its app data and its simulator Keychain. `settings clear-app-state` alone preserves the saved connections in Keychain.

   ```bash
   agent-device settings reset-keychain clear --session "$session"
   agent-device settings clear-app-state com.t3tools.t3code.dev --session "$session"
   agent-device settings appearance light --session "$session"
   ```

2. Start the real backend and Metro from the checkout under test, retaining the terminal:

   ```bash
   node scripts/scenarios/start-app.ts mobile "$run/home-a" 13990 8190 "$host"
   ```

3. In another terminal in that checkout, create the same synthetic project and recorded Replay thread:

   ```bash
   node scripts/scenarios/seed-pressure-manual.ts "$run/home-a"
   ```

4. Open `com.t3tools.t3code.dev` against `http://$host:8190` using its Expo development-client deep link, with `disableOnboarding=1`, `disableFab=1`, and `disableAutoLaunch=1`. Accept the iOS deep-link confirmation if present. Confirm “No environments connected”, then pair A using the existing application route:

   ```bash
   .agents/skills/test-t3-mobile/scripts/pair-client.sh \
     13990 "$run/home-a" "http://$host:13990" agent-device --session "$session"
   ```

5. On Chats, expand the “Machine overloaded” pill with its “Details” button. Capture it with the supplied helper, which requires two pixel-identical screenshots at least 500 ms apart:

   ```bash
   python3 capture-stable.py "$run/captures" single-machine-details "$session"
   ```

6. Start a second real server from the same checkout, using a separate fresh home and the memory fixture:

   ```bash
   T3_PROOF_PRESSURE=memory node apps/server/src/bin.ts serve \
     --host 0.0.0.0 --port 13997 --base-dir "$run/home-b"
   ```

7. Collapse the first pill. Pair B through the same route:

   ```bash
   .agents/skills/test-t3-mobile/scripts/pair-client.sh \
     13997 "$run/home-b" "http://$host:13997" agent-device --session "$session"
   ```

8. Wait for “2 machines need attention”. Expand Details if it is collapsed. Capture the multi-machine headings and summaries:

   ```bash
   python3 capture-stable.py "$run/captures" two-machine-details "$session"
   ```

Base shows two overload headings and the repeated overload summary for Environment A. Head shows one overload heading, keeps both explanations, and lists the overload summary once. Environment B retains its memory explanation and summary. Stop both servers and Metro, clear client state before the other side, and close the device lease after both captures.

The fixture supplies PSI and low-memory readings to the unmodified server resource telemetry code; it does not replace the application, its RPC, a provider, or a service. Environment labels are synthetic before rendering. CPU usage of the idle Replay process is real and can vary independently of these pressure readings.
