# Existing clone destination proof

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

## Setup

Install dependencies independently in checkouts of base [b3fdf2b](https://git.cafe/pingdotgg/t3code/commit/b3fdf2b10fb92e5dbc71a83381c602a8a464bbca) and head [17d3cde](https://git.cafe/pingdotgg/t3code/commit/17d3cde38cd324f39c3c104229c884da41b49e02). Use a fresh synthetic fixture root. Run `node seed.mjs` once. Do not reset occupied or mobile-occupied between base and head: both rejected base operations and head Cancel leave these folders unchanged.

Run `node manual-server.mjs base <base-checkout>`; after stopping it, run `node manual-server.mjs head <head-checkout>`. Each launch creates fresh isolated server homes, source server on 15731, web on 15733, destination on 15732. T3CODE_DEV_SEED=0 disables live-data copying. Private pairing URLs are written locally to the run's connection.json and must never be published. Pair the browser with sourceUrl and add destinationUrl through Connections. Labels are Source and Destination. Use a fresh browser profile for each side, light theme, 1280x800.

The source has a synthetic HTTPS origin. The destination rewrites only that URL to the local source Git repository, so clone uses real Git without an external service. README conflicts, local-only.txt, and .env are synthetic. The source's ignored .env can be copied by Add to another machine.

## Web steps

1. Open a new draft in Clone demo; Run context → Add to another machine → Destination.
2. Enter `/tmp/factory-pr-31106-a1794362421-evidence-2/fixtures/occupied`; leave .env selected; click Clone to Destination.
3. Base displays the non-empty destination error; head displays Combine, Replace, Cancel. Record through the response, not just the click.
4. Head: click Cancel. In the app terminal run `cd` to occupied, `pwd`, `ls -a`, and `cat README.md local-only.txt .env`. All original contents remain; no .git or missing.txt.
5. Repeat on combine, click Combine. Read the named folder in the terminal: original three contents remain and missing.txt is added. Remove only its project registration before the next case.
6. Repeat on replace, click Replace. Repository README and missing.txt replace old contents; local-only.txt is absent; the selected source .env is copied. Read replace explicitly.
7. Register checkout-source on Source. Its origin and checkout's origin are identically `git://127.0.0.1:19418/checkout-demo`. No service runs there: successful adoption must avoid cloning. Record checkout's branch, HEAD, status, README, local-only.txt, .env before adoption. Add it to Destination → checkout → Combine. Read the same values afterward; local-work, HEAD and edits remain unchanged.
8. Register unavailable-source on Source. Add it to Destination → failed → Replace. The origin on port 1 refuses the real clone. Record the error, then explicitly read failed: original three files remain and neither .git nor missing.txt exists.

Supplemental repeated dialogs were opened through the app's exported openAddProjectToMachine function with the real project reference; all clone and resolution buttons were clicked in the UI. No server responses or file outcomes were mocked.

## iOS steps

Use the same leased iPhone simulator for both checkouts. Run `vp run mobile:install ios --prepare`, then `vp run mobile:install ios --session <lease>` in each checkout (the native fingerprints match). Start `PROOF_HOST=<reachable-IP> node mobile-server.mjs base|head <checkout>`. It creates its own fresh backend on 15741 and Metro on 8190. Clear the app's state between sides, load Metro with the dev-client URL, then run `node pair-mobile.mjs base|head` after the app loads. The helper generates private pairing credentials locally and uses the official pairing deep link.

New chat → Add project → Git URL → `https://example.invalid/scenario/clone-demo.git` → Continue → enter `/tmp/factory-pr-31106-a1794362421-evidence-2/fixtures/mobile-occupied` → Clone project. Base errors; head offers the three choices. Dismiss the keyboard for a clean capture, then head Cancel. Use separate mobile-combine and mobile-replace fixtures for Combine and Replace and record the actual clicks through the resulting new-project screen. Inspect those exact folders in the real app terminal afterward. Git URL clone does not copy source ignored files: Combine preserves destination .env; Replace removes it.

Native input fields scroll horizontally; the video shows both the path suffix while editing and its prefix after keyboard dismissal. No path was masked. Full paths and folder names also remain visible in the terminal captures and seed script. All final stills were compared across two captures at least 500 ms apart, including a repeated base native run whose two final images matched exactly.

## Captures

All videos are real continuous app recordings, with no response stills spliced in. before-mobile-repeat.mp4 and after-mobile.mp4 include both keyboard-visible and dismissed states. File stills keep cd/pwd and the read commands visible. Checkout adoption was repeated after removing only the registration, with before/after terminal captures of the unregistered checkout and adopted checkout. The before snapshot JSON also records its original SHA; these are observed fixture records, not test verdicts. The initial scenario runner was attempted twice but failed during setup before the clone interaction; manual independent app runs provide the verdict.
