# Issue 22816 — read-only proof audit pass 2

VERDICT: **SUFFICIENT** for the changed environment propagation behavior, with R8 explicitly excluded as acknowledged **cannot-verify desktop-macos**. No proof gap found in R1–R7. This is not native macOS acceptance or OAuth login verification.

Audited 2026-10-22, within the 60-minute budget. Final head [ba866885d0](https://git.cafe/pingdotgg/t3code/commit/ba866885d0f6ce655cd6ad46bbd382625b029a89) against current base [49e97d48f9](https://git.cafe/pingdotgg/t3code/commit/49e97d48f9742ba4c5ab79efc618fbf9066523ec). No repository edits, checkout/reset, PR, push, comments, browser, server, or delegation. Artifacts and isolated archives only under /tmp. Used pr-audit and ghdrop skills.

## Pinned source and provenance

Complete current-base-to-final diff contains only DesktopShellEnvironment.ts and its test. Production adds the token to login-shell capture and POSIX fill-if-missing; the condition remains `!config.env[name] && shellEnvironment[name]`. Test adds real-bash hydration, inherited precedence, optional real spawner, and bash-availability guard. No rendering path or Windows capture change.

| File | Original base and current base blob | Evidence head and final head blob |
| --- | --- | --- |
| apps/desktop/src/shell/DesktopShellEnvironment.ts | 3fdec7932366b52d4702422808b0dfd08155269f | abca0d3b9f7a537a137c61d3efc2539a4c214c04 |
| apps/desktop/src/shell/DesktopShellEnvironment.test.ts | 9d12ed5a07fe66bffba5ced158a081ca3c1d7718 | fd0e4fec35ab97690898b8b4b182a139255c9e65 |

Original base is 8acbefefc51b4d281dcd04108c82baa1ab902b0e; evidence head is 58ad1b79bf396186f361d00f061682bb3d21fe77. Original-base-to-current-base and evidence-head-to-final each change only docs/user/welcome-wizard.md (import limits). Thus “base unchanged” means relevant source/test bytes, not the entire commit tree. Shared shell helper, DesktopEnvironment and root package.json blobs also match across all four pins; no dependency or lockfile changes occur in either intervening diff.

Downloaded the published [pass-1 matrix](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/51c6cece80af4711/proof-matrix.md), [runtime transcript](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/d81b37cc70a9a302/runtime-transcript.txt), and [runnable probe](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/073f8823c2282f25/evidence-probe.py) with curl. Each is byte-identical to its local copy. Probe SHA256: 7662d78fc4c124d71ea9eb7cb26142f2e388bb539e3f104980a583fb88039d61. Published transcript SHA256: 1a12050b0087d18ca74df0b56071f94d3084defe0c265c66262486fa80f16001.

Inspected runner before executing: it archives explicit git commits, verifies production blobs, links installed third-party dependencies, redirects workspace dependencies into each archive, and uses synthetic tokens with temporary HOME/.bash_profile. It does not read real credentials or replace shared checkout files. Probe runs real DesktopShellEnvironment, real bash command/capture/extraction and installation; no mocked capture for R1–R5.

Created /tmp/triage-22816/pass2-probe.py by changing only its two revision arguments to the full current-base/final SHAs. Ran `python3 /tmp/triage-22816/pass2-probe.py /home/ubuntu/wt/issue-22816`, capturing /tmp/triage-22816/pass2-runtime.txt. Exit 0. Sources were independently rebuilt into /tmp/evidence-22816-6vj4j7__/{base,head}. Confirmed shared shell resolution stays inside each revision archive.

Independently hashed **all 28,104 tracked blobs in each of four archived trees**: original evidence base/head under /tmp/evidence-22816-kt6_d63y and fresh current-base/final archives. Every file matched its pinned git tree, including production and tests. This materially addresses possible contamination from the reported shared-tree incident. It cannot retrospectively prove every historical process action, but the fresh isolated reproduction makes that unnecessary for this verdict.

## Row-by-row proof

All 50 per-fixture observation lines across the two revisions and five fixtures match the published transcript exactly (platform, shell token visibility, PATH result, installed token classification, desired-behavior assertion). Scratch paths and test timing naturally differ.

| Row | Independently observed base → final | Assessment |
| --- | --- | --- |
| R1 absent inherited / exported profile token | Shell sees token in both; installed unset / desired assertion FAIL → synthetic profile token / PASS | Sufficient; fresh red/green |
| R2 inherited / conflicting exported profile token | Shell sees profile value; inherited synthetic token retained in both; PASS → PASS | Sufficient; precedence preserved |
| R3 absent inherited / profile explicitly unsets token | Shell sees no token; installed undefined in both; PASS → PASS | Sufficient; no token fabricated |
| R4 inherited / profile explicitly unsets token | Shell sees no token; inherited synthetic value retained in both; PASS → PASS | Sufficient; shell absence cannot erase inheritance |
| R5 empty inherited / exported profile token | Shell sees token; installed empty / FAIL → synthetic profile token / PASS | Sufficient; empty counts as missing |
| R6 darwin service selector / real bash .bash_profile on Linux | Final focused suite passes real-shell hydration assertion; guard does not skip on this host | Sufficient for dispatch/capture/extraction/install; not native macOS |
| R7 darwin service selector / simulated zsh response | Final focused suite passes conflicting inherited-token assertion | Sufficient for precedence; no real zsh execution claimed |
| R8 native macOS Dock / zsh / provider card | Not executed | Acknowledged cannot-verify desktop-macos |

Fresh final archive command: `./node_modules/.bin/vp test run apps/desktop/src/shell/DesktopShellEnvironment.test.ts`. Result: **14 passed, one file passed, no skips**, exit 0. Reviewed the R6/R7 test bodies and the published named run (2 passed, 12 intentionally filtered); the full fresh suite independently executes both. The real-shell guard checks /bin/bash availability and changes tests only. The runner deliberately accepts expected baseline regressions; exit 0 alone is not the proof—explicit R1/R5 FAIL on base and PASS on final are the proof.

## Sufficiency and limits

No source/evidence discrepancy or new production branch found. Lead-reported final lint/format and two independent MERGE reviews are supporting context, not independently rerun/recreated claims in this pass. Fresh runtime and focused tests are independently reproduced here. No repo-wide checks run.

Visual matrix remains empty (0 rows); no captures or visual diffs needed. Scope is desktop startup environment hydration on existing POSIX paths, shared by downstream children through process environment. No web/mobile UI, contract, RPC permission, provider protocol, or connection mode change needs separate proof here. Windows capture remains PATH/FNM only; other platform dispatch remains unchanged. No new capability entry point or reverse state.

Remaining acceptance gap: actual native macOS Dock launch, actual zsh profile behavior, downstream provider receipt and user-visible card behavior were not verified. Synthetic credentials prove propagation/precedence only, not token validity, OAuth login, authenticated provider operation, or card correctness. Those require separately authorized native acceptance work and do not invalidate this explicitly bounded proof audit.

Shared-tree process limitation: the reported Opus review-r2 temporarily checked base files into the shared tree despite read-only instructions, then restored HEAD. This pass did not reproduce that action. Initial and final checkout status are clean at the requested final HEAD. Verified original evidence archive hashes and independently reconstructed pinned archives isolate this proof from that reported incident. Clean status alone would not have established historical isolation.

## FRICTION category | happened | prevention

| Category | Happened | Prevention |
| --- | --- | --- |
| Shared-tree instruction breach (reported prior review) | Reviewer temporarily installed base files despite read-only scope, then restored them | Never checkout/restore source for audits; archive pinned commits outside shared tree and verify all tracked blob hashes |
| Provenance / moving base | Final merge and current base differ from evidence pins only by unrelated welcome-wizard docs | Pin full revisions and compare both production and test blobs; do not equate whole commit trees |
| Artifact transport | Python urllib download returned HTTP 403; curl fetched all three successfully and byte comparison passed | Use working curl transport; hash downloaded artifacts before trusting local copies |
| Platform boundary | Linux bash and darwin selector cannot establish native Dock/zsh/provider-card acceptance | Retain R8 cannot-verify desktop-macos and require separately authorized native evidence for that claim |

## Local reproduction artifacts

- /tmp/triage-22816/pass2-probe.py (only pinned revision arguments changed)
- /tmp/triage-22816/pass2-runtime.txt; SHA256 111558f579669a3eea4620cc8b466ddffd18632aa04a18fb1c44fb2cfcf051c4
- /tmp/triage-22816/proof-pass2.md (this report)

Public-upload check: report manually inspected; includes only commit/blob hashes, synthetic-fixture descriptions, public artifact links and scratch paths. No credentials, private keys, environment dumps, real tokens or customer conversation data included. Only this report is uploaded.

Final VERDICT: **SUFFICIENT**, within R1–R7 scope and with R8 explicitly unverified.
