# Remote editor SSH route proof

Base: [9f24cac6d4](https://github.com/pingdotgg/t3code/commit/9f24cac6d42f99e92569b7cbd97ec07932f232d8)
Head: [bd09323390](https://github.com/pingdotgg/t3code/commit/bd0932339044c3d2aacae47edcc415d8298a751f)

Linux, real Electron T3 Code desktop on Xvfb, real VS Code with the Microsoft Remote SSH extension. Each T3 checkout had its own fresh local server data and desktop profile. The remote server used each corresponding checkout and its own fresh database. No live state or model account was used. A new-thread workspace was sufficient to reach Open in; no agent turn was sent.

## Fixture

A disposable Linux user `t3proof27236` owned a synthetic repository named `demo`. A temporary OpenSSH daemon listened on 127.0.0.1:22236 and authorized one generated Ed25519 key. The client SSH alias was:

```sshconfig
Host proof-remote
  HostName 127.0.0.1
  User t3proof27236
  Port 22236
  IdentityFile <RUN_ROOT>/ssh/client-key
  IdentitiesOnly yes
  StrictHostKeyChecking no
  UserKnownHostsFile <RUN_ROOT>/ssh/known_hosts
```

`ssh proof-remote` successfully authenticated before the comparison. VS Code used a separate SSH config containing the same alias. The advertised Tailscale hostname reached the default SSH port, where this fixture's identity was not authorized. The alias selected the fixture's port and key. No SSH agent key flood was simulated.

Seed each side's synthetic workspace with `seed-project.sh <checkout> <data-home> <workspace>` under the disposable user. Start its remote server on HTTP port 14210 with the same data home, automatic project import disabled, and label `Remote demo`. Start the real desktop from that checkout with an isolated T3 home and desktop profile, renderer debugging port 14202, and a dev renderer. In development, T3's SSH runner was pointed at that checkout's real server entry point, so adding the SSH route genuinely authenticated, paired, and tunneled to the same remote environment.

## UI steps used on both commits

Run `proof-driver.cjs setup` from the checkout with `PAIRING_FILE` pointing to the remote server's locally minted pairing JSON. The file is read locally and is never printed. The driver:

1. Skips importing existing project history.
2. Adds the remote environment through its HTTP pairing route.
3. Leaves HTTP preferred, then adds `proof-remote` as an alternate SSH route through Settings. Both sides reported `Route added` after a real SSH connection.
4. Opens a new-thread workspace for `SSH route demo` and expands its workspace actions.

Run `proof-driver.cjs open` while recording the desktop. This clicks the real `Open in VS Code` button. The OS's vscode URL handler launches the real editor; no URL or SSH transport is mocked. VS Code's remote connection is closed before each repeat. Its one-time onboarding and host-key consent are completed before the final recordings.

## Observed

Base: VS Code attempted the server-advertised hostname and showed `Could not establish connection` and `Permission denied (publickey)`. Its status bar said `Disconnected from SSH`; no remote files loaded.

Head: VS Code connected to `proof-remote`, listed the remote README, and opened it. The status bar said `SSH: proof-remote`. `editor-result.cjs` waits for and opens that real remote file.

Captures use identical 1920x1000 desktop framing: T3 at left, VS Code at right, light T3 theme and dark editor theme. Final stills were taken only after two screenshots 500 ms apart had identical pixels. Each final video is 20 seconds and contains the same Open in interaction. The base hostname and a brief hostname-bearing editor notification are visibly redacted. No application behavior or result text was changed.

Not covered: Zed, a preferred Tailscale HTTPS route, an mDNS-only LAN fallback, and an SSH agent offering too many keys. The exercised preferred route was HTTP, with a real Tailscale SSH hostname advertised by the server.
