# Bitbucket Cloud remote evidence

Base: [f39ecd3df8](https://github.com/pingdotgg/t3code/commit/f39ecd3df8f01171c190350fe93e1a9cfb3a017d)
Head: [3e77d4bcdb](https://github.com/pingdotgg/t3code/commit/3e77d4bcdb79a2c317df3a1c6608428d7e3e9a8b)

Each side ran its own checkout, isolated fresh server homes and Vite web client on Linux. The preview browser used 1280 x 800 CSS pixels, DPR 2, light theme. The second environment was named Clone target. T3CODE_DEV_SEED=0; all data was synthetic. evidence-seed.ts uses the repository scenario t3.project/t3.thread commands and the free Replay provider; it does not copy live data.

## UI sequence on both sides

1. Seed Cloud SSH with origin git@ssh.bitbucket.org:workspace/repo.git, Cloud alternate SSH with origin ssh://git@altssh.bitbucket.org:443/workspace/repo.git, and Cloud HTTPS with origin https://bitbucket.org/workspace/repo.git.
2. Open Cloud SSH, create a draft through its breadcrumb, open Version Control branch selector, type #1 and choose Checkout pull request. Capture the provider description after lookup settles. The synthetic PR has no account access, so the lookup error is expected.
3. Cancel. Run context > Add to another machine > Clone target. Click HTTPS. Capture the clone URL. Cancel.
4. Repeat the checkout dialog for Cloud alternate SSH.
5. Open Cloud HTTPS, create a draft, Run context > Add to another machine > Clone target. Click SSH. Capture the clone URL. Cancel.
6. Inject manual-driver.js in the app page. providerInfo() calls the real server status RPC for the three projects. retry(targetEnvironmentId, freshDestinationPath) calls the real sourceControl.cloneRepository RPC with protocol=auto.
7. Save the actual returned provider metadata and full clone RPC response to runtime.json. Display a readable summary in the app file viewer. This file is a transcript, not a built-in product status screen.

All stills were taken after two screenshots 500 ms apart were pixel-identical, then visually inspected. Only synthetic source folder labels were redacted. The paired videos contain excerpts of the same two protocol-switch interactions; idle time and unrelated steps were removed. No URL or provider result was changed.

## Server transport setup (identical on both sides)

Run proxy.cjs before the clone target server. Set:

```
T3CODE_DEV_SEED=0
GIT_SSH_COMMAND='ssh -o HostName=altssh.bitbucket.org -p 443 -o BatchMode=yes -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/dev/null -o ConnectTimeout=10'
GIT_SSH_VARIANT=ssh
GIT_TRACE=1
GIT_CONFIG_COUNT=1
GIT_CONFIG_KEY_0=http.proxy
GIT_CONFIG_VALUE_0=http://127.0.0.1:13420
```

The SSH transport contacts real Bitbucket over port 443 and rejects its unknown host key. The real server then invokes its HTTPS fallback. The local HTTP CONNECT proxy records that destination and returns 502. This isolates the host selection without credentials, a successful clone, or reliance on a timeout at the wrong host. Both the returned Git trace and proxy capture agree: ssh.bitbucket.org:443 on base, bitbucket.org:443 on head.

Start each server with scripts/scenarios/start-app.ts web <fresh-home> 127.0.0.1 <web-port>. For the target, a copy changes only the synthetic hostname label from Scenario to Clone target. Pair both environments in the browser. Do not publish pairing URLs.

## Attempted scenario

attempted-bitbucket-cloud-hosts.e2e.ts was run through scenarios:prove on current main. After three setup corrections it still stopped before the assertions while opening the runtime transcript. It is supplied for reproducibility, not claimed as a successful scenario proof. The accepted evidence here is the manual comparison above.
