# Proof audit pass 2 — POSIX CLI PATH fallback

Evidence sufficient for the bounded fallback claim in [#9232](https://git.cafe/pingdotgg/t3code/pulls/9232) ([GitHub #9232](https://github.com/pingdotgg/t3code/pull/9232)). This is an evidence audit, not permission to merge. No missing required rows or recaptures remain. Native M1/W1 retain the explicitly accepted exceptions below.

## Revision identity

Original proposal: [CyberStefNef/t3code](https://github.com/CyberStefNef/t3code), fix/posix-cli-path-fallback, [d328c42283](https://github.com/CyberStefNef/t3code/commit/d328c42283683b5d1461ef4b52b711b0f968607c).

Captures compare base [5a969c17e7](https://github.com/pingdotgg/t3code/commit/5a969c17e76301e45e53e1fd9aad2f5b4599d865) with replacement [7217838f9d](https://github.com/pingdotgg/t3code/commit/7217838f9df38b550b19a554bb5d3a57197d851b), takeover/pr-9232. They do not depict the original fork or the later merge.

Verified final merge [d8646e3df4](https://github.com/pingdotgg/t3code/commit/d8646e3df43d350fc827b07efc8f0ecc3a398d47) has parents replacement and updated main [91ea0e18eb](https://github.com/pingdotgg/t3code/commit/91ea0e18ebe2db81752bad7f0d4fa70a66d7562b). All five takeover files are byte-identical to the capture revision; diff against updated main is those same five files, +150/-2. This establishes source equivalence for the change, not a runtime capture of the merge or verification of unrelated incoming main changes. Parent owns final-merge checks.

Both retained snapshots match all 28,262 tracked blobs at their respective pinned commits. Every listed build artifact hash and all 54 upload artifact hashes match the retained files. Twenty runtime environments carry the correct revision SHA and private HOME. No moving HEAD was substituted for the captured SHA.

## Inspection and claim results

I visually inspected every supplied PNG: 48 total, comprising 20 final Settings/terminal stills, six extracted final video frames, 20 difference/mask images, and two diagnostic images. The diagnostics are excluded from acceptance. I decoded each of the six full MP4 containers and inspected six distributed frames per recording, from initial screen through Settings and completed terminal output. Durations are 4.20–5.67 seconds. This is sampled visual inspection, not a claim to have inspected every encoded frame. Exact output was also checked against retained websocket/RPC transcripts, preflight filesystem types, refresh results, and marker invocation logs for all 20 runs. Re-executing the artifact checker into this audit directory passes 20/20.

| Row | Standalone server and real Electron, both revisions | Disposition |
| --- | --- | --- |
| L1 | All login-shell probes fail with exit 17. Before: CLI absent, command-v exit 1. After: ordered B/U/H additions, H-only stub 2.1.0 detected, command-v exit 0, H-local marker. | PASS; before/after desktop recordings and settled stills agree. |
| L2 | Exit-zero empty PATH; brew absent, /usr/local/bin a regular file, H a directory. Only H is appended after inherited entries; nonexistent inherited entry survives. Before absent, after stub detected. | PASS; private mount fixture plus exact PATH and refresh results. |
| L3 | JAVA_HOME-only output activates fallback. Inherited toolchain version 2.1.1 wins on both revisions; after appends only missing brew and removes repeated inherited entries. | PASS; recordings, PATH, refresh and marker agree. |
| L4 | Successful nonempty PATH probe chooses version 2.1.2 before inherited toolchain on both revisions. No fallback directories added. | PASS; successful-probe control recordings and exact PATH. |
| L5 | Parent PATH unset; all fallback directories absent; provider absent both. | PASS with qualification: standalone terminal adds its existing managed Node directory; interactive desktop Bash supplies its existing default PATH. Neither observation means the fallback invented directories. No empty/current-directory segment. |
| H1 | Real filesystem helper script covers 27 directory/file/absent combinations for each Linux/darwin selector, HOME edge cases and merge checks; retained counter reports 326 checks. Caller/shared suite: 61 pass, 2 existing skips. | PASS; Linux-hosted darwin selection is not native macOS. |
| M1 | Native macOS launchctl unavailable on this Linux host. Invocation/API/timeout/parser remain unchanged. | Accepted explicit UNVERIFIED native exception. |
| W1 | Native Windows unavailable. Windows branches are unchanged; existing focused tests remain in passing suite. | Accepted explicit UNVERIFIED native exception. |

Source inspection confirms one shared candidate helper, synchronous directory-only stat filtering, exact ordered bounded list (platform brew bin, /usr/local/bin, HOME/.local/bin), inherited-first merge/deduplication on fallback, and no additions after a successful PATH probe. There is no new parser or launchctl API change. Windows returns through existing handling. No frontend, wire, or client-runtime change requires a separate mobile/remote capture: destination environment startup is the changed boundary. This proof does not cover every provider install location.

The Settings UI after discovery still warns about unsupported stub version/account status. The actual stub implements --version; provider refresh and terminal resolution prove executable discovery only. There is no provider login, authenticated turn, or real-provider functionality claim.

## Independent fresh capture and tests

Fresh output: /tmp/ev-9232-proof2. I reconstructed L1 standalone from retained scripts with all writable roots redirected there, using the retained hash-verified replacement server build. This reruns a capture through a complete real server; it does not claim a new binary build. Port 19481, private HOME/T3/XDG, user/mount namespace and controlled shell-profile fixture. Normal pairing/browser-session creation, server.refreshProviders and real terminal RPCs; no status/UI monkeypatches.

Result: refreshed claudeAgent installed=true, version=2.1.0, warning status; checkedAt 2026-10-25T00:41:30.630Z. Exact terminal PATH: private managed Node, /usr/bin, /bin, Linuxbrew bin, /usr/local/bin, private HOME/.local/bin. command-v exit 0 resolves private H/claude; --version reports 2.1.0; H-local marker and EVIDENCE_DONE observed. Delta from retained after-L1-S: only scratch-root paths and timestamps; no behavioral delta. Preflight shell exit remains 17.

I independently ran the same three focused files in a fresh scratch copy. With the three changed production files restored to pinned base bytes and the new tests retained: 3 failed, 58 passed, 2 skipped. Failures are the server regression and desktop Linux/darwin regression cases, each missing H. Restoring the three production files to captured replacement bytes: 61 passed, 2 skipped across three files. This validates both the new behavior and the baseline-failure claim. These runs are not whole-repository checks.

Captured supervisor/child PIDs for my server were stopped through its own captured supervisor; all three recorded PIDs are gone. No desktop, Xvfb, other server/worktree, orphan ACP, live userdata, source/index/ref, push, watch, or forge comment was touched by this audit. Worktree status remains clean. Scratch tests may use normal dependency caches; all implementation/test substitutions were confined to this audit's scratch copy.

## Isolation validity

The earlier helper inherited host HOME, and host keyring mtime changed; this cannot be described as an entirely side-effect-free evidence session. The ledger correctly discloses that incident and supersedes all ten affected desktop runs. I checked final launch argv for every before/after L1–L5 desktop capture: env -i and private HOME/XDG are applied before headless-desktop. Final artifacts and hashes refer to those corrected runs.

Six retained snapshots show private helper environments. Four lost full helper snapshots during concurrent teardown; they still have exact corrected launch argv and generated private keyring file existence. The report states this limitation accurately. Its host-mtime comparison supports no further observed modification during corrected recapture; it cannot prove contents never changed. No keyring contents were inspected or restored in this audit. This history does not invalidate the corrected runtime proof, but retain the caveat whenever asserting isolation.

## Proposed compact PR text

When login-shell discovery and macOS launchctl return no PATH, startup can miss user-installed CLIs. Share one existing-directory fallback between standalone and desktop startup: append platform Homebrew bin, /usr/local/bin and HOME/.local/bin after inherited entries, preserving priority and deduplicating. Successful PATH probes and Windows handling stay unchanged.

| Verification | Result |
| --- | --- |
| Linux standalone + real Electron, before/after | 20/20 captures: failed/empty/partial probe recovery, inherited priority, successful-probe suppression, unset-PATH/absent-directory control. |
| Focused filesystem/caller checks | 326 helper checks; 61 tests pass, 2 existing skips. Base production code with the new tests fails 3 regressions. |
| Native macOS / Windows | Not run on Linux; unchanged platform plumbing. |

Captures are pinned to the base and replacement commits linked above. The five takeover files are identical in the subsequent main merge. CLI version stubs prove discovery and command resolution, not authentication or agent turns. Earlier wrapper isolation was corrected and all desktop rows recaptured; see the evidence ledger's disclosed keyring-mtime caveat. Link the complete capture ledger and audit report; use final L1 before/after Settings and terminal evidence, not diagnostic PNGs. End the actual PR body with the implementing model/harness attribution supplied by the parent.

Evidence: [complete capture ledger](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/5f456bfc9897f35f/capture-ledger.md), [all 54 artifact links](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/36ef200c74906637/upload-links.md), [scripts/logs/manifests archive](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/534b1e27e8c00fe6/scripts-stubs-logs-manifests.tar.gz).

Friction category | happened | prevention
--- | --- | ---
Baseline evidence | No baseline-failure log in supplied capture bundle. Reproduced the three expected failures independently, then restored head and got 61 passes. | Bundle baseline and head logs together, naming production SHA and test revision separately.
Audit command | First scratch test invocation used the audit root instead of the copied repo and exited without running tests. Corrected cwd; only subsequent named baseline/head logs count. | Set explicit repo cwd for each test command.
Snapshot inspection | First blob checker followed a tracked directory symlink and stopped. Corrected checker hashes symlink text; complete checks passed. | Handle Git mode 120000 explicitly.
Wrapper isolation | Historical helper HOME leak; all desktop captures corrected; four helper snapshots incomplete. | Private HOME/XDG before wrapper; preserve one immutable process snapshot per live run.
PATH interpretation | PTY managed Node and Bash default PATH could be mistaken for fallback additions. | Keep environment-startup and interactive-shell behavior distinct; compare exact ordered entries and markers.
Native coverage | No native macOS/Windows runtime available. | Preserve named M1/W1 exceptions; require native recapture if those boundaries change.

Audit model/harness: GPT-6.1 Sol through Codex in T3 Code. Read-only worktree audit; report and reproduction artifacts only in scratch.

VERDICT: SUFFICIENT
