# Native range proof driver

Use separate checkouts at base 044c59901a5549f22064dda3eda23e46e1ea0322 and head 65c1c126b4591f7951d2f0fc2e4215dd05cf490b, with dependencies installed by `vp i`.
Copy seed-ranges-proof.ts into scripts/scenarios/ beside the repository's t3.ts helper. Run it from the checkout being tested, passing the fresh home and server port.

For each checkout:
1. Start `T3CODE_DEV_SEED=0 node scripts/scenarios/start-app.ts mobile <fresh-home> <server-port> <metro-port> <device-reachable-host>`. Base used ports 14092/8192; head used 14093/8193. This starts the real server and Metro, with a synthetic environment label and disabled paid providers.
2. When its server-runtime.json exists, run `node scripts/scenarios/seed-ranges-proof.ts <fresh-home> <server-port>`. It creates range-demo/src/a.ts with 30 numbered lines and sends the exact range comparison through Replay (dev).
3. Lease an iPhone 18 Pro through the device-pool flow. Run `vp run mobile:install ios --session <session>` from that checkout. Both commits use the same cached native fingerprint; their JavaScript is served by their own Metro.
4. Open `t3code-dev://expo-development-client/?url=<URL-encoded-Metro-origin>&disableOnboarding=1&disableFab=1&disableAutoLaunch=1` with agent-device. Accept an OS confirmation if present. Wait until the app UI appears.
5. Run `.agents/skills/test-t3-mobile/scripts/pair-client.sh <server-port> <fresh-home> <device-reachable-backend-origin> agent-device --session <session>`.
6. Open the seeded thread, expand the button beginning `Agent: Hash form:`. On head, use the explicit thread deep link `t3code-dev://threads/<environment-id>/<URL-encoded-thread-id>` to disambiguate the two identically named threads.
7. Capture two screenshots at least 500ms apart and compare pixels. Only retain a still when they match. Use light mode and the same device (402x874 logical pixels, iOS 27.2) on both sides.
8. Record the screen, tap the relative hash reference, and stop recording. Base has no link for that reference: its text is at x=218,y=518 in the captured layout, and tapping leaves the thread unchanged. Head exposes a link with accessibility label `a.ts · L10–20, src/a.ts#L10-L20`: tap it. It opens a.ts with the line marker at 10. Capture two matching stills of the opened file.
9. Close the agent-device session and stop the two started server/Metro harnesses.

The screenshots show both relative and spaced Windows hash ranges as plain inline code on base, and both as file chips on head, alongside colon-range and markdown-link controls. The Windows file is synthetic text on a Linux-hosted project: its chip rendering and range label are verified; opening an actual Windows drive path is not covered.
