# SSH ownership runtime proof

This is a manual desktop IPC reproduction, not a unit test or a web scenario.
Each commit was installed and built in its own checkout. A real Electron 44.10.1 desktop ran under Xvfb with D-Bus and unlocked secret storage. The driver called the production `window.desktopBridge.ensureSshEnvironment` API through CDP. It used real OpenSSH, a loopback sshd with a disposable key, and the checkout's built `t3 serve` CLI, on fresh, separate desktop and remote homes. No production database was seeded or used.

Both recordings show the live terminal transcript of those calls and process observations, at 1920×1080 with the same dark terminal theme. The desktop runs on a second virtual display so development tools cannot expose private paths in the recording. These are runtime transcript captures, not screenshots of the Settings UI. Final stills were unchanged across two captures 500 ms apart.

Steps on each side:

1. Connect to the isolated SSH endpoint under alias `127.0.0.1`, using `previous-runner.mjs`, a symlink to the real built CLI. Record the returned ownership kind and runtime PID.
2. Connect to the identical endpoint as `localhost`, with the same SSH user and port. Record ownership kind and PID again.
3. Abruptly stop the desktop and its local child processes, preserving the remote server. This deliberately gives the next desktop a running server from the prior launch. Restart with the same desktop home, including the fix's persisted launcher ID.
4. Select `updated-runner.mjs`, another symlink to the real built CLI, through the existing development remote-runner configuration. Reconnect under the edited alias. Record ownership kind, runtime PID, whether the prior PID remains alive, and the CLI entry in `/proc/<pid>/cmdline`. Fetch the server through the real SSH forward and record its HTTP status.

Base observed `managed → external → external`; the same PID still ran the previous entry. Head observed `managed → managed → managed`; the previous PID exited and a new PID ran the updated entry. Both final forwarded HTTP requests returned 200.

The update trigger is the changed development CLI entry path, matching the runner change in the reported reproduction; this does not exercise downloading or installing a packaged desktop release. Both symlinks execute the same side's real CLI build. No first-party provider or agent turn is needed for SSH ownership.

To repeat: install and build both checkouts, place `setup.py` and `driver.mjs` together in a disposable directory, install `playwright-core` under its `tools` subdirectory, run `python3 setup.py`, then run the driver under `headless-desktop` once per checkout. The driver needs passwordless sudo for the isolated sshd, plus OpenSSH, Xvfb, Ghostty, xdotool and ffmpeg. It temporarily adds its disposable host key to known_hosts and removes those exact lines on exit. Generated keys, homes and private process logs must never be uploaded.

Not covered: editing the saved connection through Settings controls, SSH username/port variants, packaged updater installation, and the downstream bearer-session pairing failure. The production desktop IPC launch path and real remote process replacement are covered.
