# Login-shell marker PATH proof

Linux x86_64; Bash login shell; real OpenCode 2.4.2 executable. Fresh HOME and T3 data per run. No copied database, provider stub, or modified production code.

Build each checkout with `vp i` followed by `vp run --filter @t3tools/desktop build`. Install Electron with `node node_modules/electron/install.js` from apps/desktop if necessary.

Run the desktop driver on each checkout:

```sh
headless-desktop node capture-desktop.cjs CHECKOUT before SCRATCH REAL_OPENCODE_EXECUTABLE
headless-desktop node capture-desktop.cjs CHECKOUT after SCRATCH REAL_OPENCODE_EXECUTABLE
```

The driver links the actual executable into `SCRATCH/login-bin/__T3CODE_ENV_PATH_END__/bin/opencode`. Each HOME's `.bash_profile` exports `PATH='SCRATCH/login-bin/__T3CODE_ENV_PATH_END__/bin:/usr/bin:/bin'`. The Electron inherited PATH is `/usr/bin:/bin`, so only login-shell discovery can find OpenCode. It verifies `bash -ilc 'command -v opencode'` first. It launches the unmodified app with `--no-sandbox --disable-gpu`, sets a 1440x1000 window at 0,0 on headless-desktop's X display, and uses Playwright Electron support to drive Settings → Providers → Add provider → OpenCode → Next → Next → Add instance. Binary path stays `opencode`; URL and password stay empty. Video records the interaction. A still is saved after two screenshots 500 ms apart match. It reads the running Electron main process PATH after discovery and writes a sanitized result.

For the standalone server path:

```sh
node start-server.cjs BASE_CHECKOUT before SCRATCH 19141
node start-server.cjs HEAD_CHECKOUT after SCRATCH 19142
```

This uses the built real server and its built web client, the same login profile, fresh isolated state, `T3CODE_DEV_SEED=0`, and an inherited PATH containing only Node's directory plus `/usr/bin:/bin` (no OpenCode). Pair in the browser using each server's private startup URL. Navigate to `/settings/providers` and run the same Add provider steps using `web-driver.js`. Browser viewport is 1440x1000 CSS pixels, light theme, device scale 2. Record from Add provider until status settles, blur the focused element, and verify two stills taken more than 500 ms apart have zero pixel differences before retaining the still.

Both surfaces on base: `Not found · OpenCode CLI (opencode) is not installed or not on PATH.`
Both surfaces on head: `v2.4.2 Authenticated · OpenCode 2.4.2 lists 18 models.`

Desktop main-process PATH on base: `<scratch>/login-bin/:/usr/bin:/bin`.
Desktop main-process PATH on head: `<scratch>/login-bin/__T3CODE_ENV_PATH_END__/bin:/usr/bin:/bin`.

The scenario runner cannot exercise the Electron main-process extractor; the manual comparison covers both changed production extractors and uses the real OpenCode CLI for provider detection. No agent turn is needed.
