# Proof audit, pass 1

Findings: **no affected fixture row is missing or contradicted by the supplied tests and runtime evidence.** The six requested runtime rows are present in both the report and the raw archive. The background slash-provider row is adequately covered by the focused text-generation regression; an additional real models.json capture is optional, for the reasons below. This is an evidence audit, not a new execution or a general merge-readiness review.

PR [#32585](https://git.cafe/pingdotgg/t3code/pull/32585), also mirrored as [#32585](https://github.com/pingdotgg/t3code/pull/32585), branch `fix/issue-32575`, requested head [bf2902176c](https://git.cafe/pingdotgg/t3code/commit/bf2902176ccbe799639e46f3834935a0e5328f22). The current GitCafe metadata names this same head and base [d313b2aff3](https://git.cafe/pingdotgg/t3code/commit/d313b2aff31991ab94c8ac80cdc38a54dd575604).

## Revision and evidence checks

- Reviewed the five-file PR diff against that observed base, both production callers, the resolver, the two new regression cases, adjacent default/thinking/context tests, inventory parsing, and extension-disabling launch construction. No UI render path changes. No additional client, provider, transport, or background-operation cross-product is warranted: the shared runner owns the changed selection behavior.
- `git diff --exit-code 0e41937e52 bf2902176ccbe799639e46f3834935a0e5328f22 -- packages/provider-pi` exited 0 with no output. Thus the Pi package in the supplied after capture equals the requested head. The merges did not change it.
- Opened the [runtime report](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/fb2b82d871d22322/runtime-evidence-report.md) and downloaded/extracted the [raw redacted archive](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/9b09abb46bfee46c/redacted-runtime-logs.zip). Inspected the supervisor, launch arguments, per-process RPC order, model inventories, selection ACKs, persisted run projections, and background format errors. These support the report, rather than merely repeating its summary.
- The supervisor records real `vp run dev` processes in separate checkouts, with `T3CODE_DEV_SEED=0` and fresh revision-owned databases: before [0a9abddaee](https://git.cafe/pingdotgg/t3code/commit/0a9abddaee00ff1495e77a03dd4fafa73c3cd4cb), after [0e41937e52](https://git.cafe/pingdotgg/t3code/commit/0e41937e52a50a42a84d5c20ac493a2c41354eb4), Pi 1.5.1. Per-process logs record the real Pi subprocess. The driver uses server HTTP/WebSocket RPC; projections substantiate chat outcomes. F11 is explicitly an inventory-only injected protocol error, not a simulated provider reply.
- Read the uploaded [driver](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/d9558b9d1cbb0e23/driver.mjs), [fixtures](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/5199d35e2507cd96/fixtures.ts), [interposer](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/84f0d9ea9d2c2c15/pi-interposer.mjs), and [supervisor script](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/9b59080b40a17bd4/run-matrix.mjs). The local alias forwarder changes the upstream request model; the synthetic Pi selection identities and real turn outcomes remain observable. No private runtime model identifiers are reproduced here.
- The PR body reports failing-first regressions and 141 passing tests/check:changed. I inspected the assertions and the pre-fix split that makes the slash-provider assertions fail; I did not rerun tests or reproduce those test-run logs. Independent before/after runtime failures and successes substantiate the central defect and refresh fix. No claim here upgrades a reported check run into a newly executed one.

## Fixture matrix

`Affected` means this diff changes selection, introduces discovery before selection, or replaces the discovery/cache path. `No` rows are relevant unchanged boundaries. `Test` means an assertion in the committed tests proves the behavior; `Runtime` means the supplied raw transcripts and outcomes prove it. Cases sharing a resolver branch or the same inventory-error continuation are collapsed rather than multiplied across clients and background operations.

| Row | Fixture and code path | Affected | Automated proof in PR | Existing runtime proof / status |
|---|---|---|---|---|
| F01 | Ordinary reported provider/model; adapter inventory hit and ordinary background selection | Yes: both callers now use inventory identity lookup; helper adds discovery | Adapter ordinary-pair/default-restore assertions; text-generation default and rejection controls | **Covered, test + runtime.** F10/F11/F12 ordinary controls complete on both sides. F11 background chooses the ordinary models.json pair and generates a title on both sides. F12 additionally proves real successful helper inventory discovery under extension-disabled launch flags; F03 tests exact helper selection from a successful inventory. No separate ordinary-only paid capture is needed. |
| F02 | Reported slash provider; adapter initial discovery hit | Yes: exact reported provider replaces the first-slash prefix | New adapter regression asserts exact slash-provider pair after a refresh (initial hit established separately at runtime) | **Covered, test + runtime.** `base/pi-833399.jsonl` before sends the wrong split and Pi rejects; `base/pi-833398.jsonl` after sends `audit/slash` + `haiku-fixture`, ACKs and replies `pong`. F02 projections fail before, complete after. |
| F03 | Background non-default slash provider defined in models.json; shared `runPiJson` | Yes: helper now requests inventory and resolves the pair before `set_model` | New text-generation regression `selects the provider and id Pi reported when the provider contains a slash` asserts exact outgoing provider/model through commit generation | **Covered by test; no direct slash-models.json runtime.** The assertion targets the changed caller, which launches the same extension-disabled helper. Real helper config loading is separately observed with an ordinary models.json provider. See the explicit adequacy decision below. |
| F04 | Plain provider with slash-containing model ID | Yes: resolver must preserve complete ID, including `/` | First turn of the new adapter regression selects the reported slash-containing model ID and asserts the exact pair | **Covered by test.** This guards against a last-slash split; no duplicate helper capture is needed for the same resolver branch. |
| F05 | Unique reported pair with slashes in both provider and model ID | Yes: both portions must remain exactly as reported | Separate slash-on-either-side assertions are useful, but do not supply this joint fixture | **Covered by runtime.** Before `base/pi-833544.jsonl` sends `audit` + `hub/family/model` and rejects; after `base/pi-833651.jsonl` sends `audit/hub` + `family/model`, ACKs, prompts and completes. |
| F06 | Two reported pairs concatenate to one slug; first-match selection agrees with picker | Yes: exact lookup changes which structured pair wins | No new collision assertion; status code already deduplicates slugs by first occurrence | **Covered by runtime.** Both collision inventories order `audit/hub` + `family/model` before `audit` + `hub/family/model`; picker snapshot advertises subProvider `audit/hub`. Before `collision/pi-834143.jsonl` selects the second pair; after `collision/pi-834173.jsonl` selects the first. Both complete, so ACK alone is not the proof: outgoing pair and picker identity are decisive. |
| F07 | Inventory has no exact match or no usable payload; well-formed custom slug falls back to first slash; unavailable pair rejects explicitly | Yes: miss triggers refresh before the existing fallback; helper introduces best-effort discovery | Adapter default-restore test asserts an ordinary outgoing pair with empty fake inventory; text-generation rejection case gets successful discovery without a models payload, asserts actionable rejection, and forbids prompt | **Covered, test + runtime.** F11 exercises no inventory after a failed request and ordinary fallback. The text-generation test specifically covers absent successful payload. Custom settings alone do not register a model in real Pi. |
| F08 | Default selection and reverse transition: explicit → default, restore failure/retry, baseline thinking | No: default branches bypass the new resolver and helper discovery | Existing adapter default-restore/retry and explicit-thinking tests; helper `runs Pi offline, since the process is stopped as soon as it answers` succeeds using default | **Covered by tests, unaffected boundary.** Baseline restoration already uses structured provider/model, so slash spelling does not require another fixture. The default helper test asserts success/offline launch, not an explicit discovery-call count; the unchanged default conditional establishes the bypass. |
| F09 | Successful discovery retains identities/context windows; later reported hit reuses the refreshed cache; same applied model and downstream options | Yes for cache/identity reuse; no change to same-model bypass, thinking/tier application or context response handling | New adapter regression starts from discovered slash-ID pair; existing legacy context-budget, explicit-thinking and service-tier cases cover adjacent retained behavior | **Covered, test + runtime.** After F10, one refresh returns both late providers; the following ordinary late selection uses that list without another discovery. `late/pi-834322.jsonl` records the order. No separate case for every unchanged option is needed. |
| F10 | Successful initial inventory misses a provider added later; refresh succeeds; slash and ordinary late providers | Yes: adapter now refreshes before fallback | Second turn of the extended adapter regression queues a newly added slash provider and asserts its exact pair | **Covered, test + runtime.** Supported extension command calls `ctx.reload()` after the control turn. Same native session/process: before `late/pi-834337.jsonl` performs no second inventory and slash selection fails; after `late/pi-834322.jsonl` refreshes, selects the full slash provider and completes. Ordinary late selection completes on both sides. |
| F11 | Inventory protocol failure → ordinary fallback; adapter retry/recovery; background inventory catch | Yes: adapter retries on miss, and helper adds a fallible request | Text-generation missing success payload is F07, not proof of an RPC failure. Status-probe failure tests exercise a different caller | **Covered by runtime.** Before `fault/pi-834647.jsonl` fails initial discovery; after `fault/pi-834631.jsonl` fails initial and selection-miss discovery, but ordinary chat completes. After disabling the fault, that same after process refreshes and completes slash selection; before still splits incorrectly. Helper `fault/pi-835114.jsonl` after records inventory error → ordinary `set_model` success → prompt → assistant text, and persisted title changes. Before helper `pi-835070.jsonl` succeeds without discovery. |
| F12 | Unreported malformed slugs: no slash, leading slash, trailing slash; adapter and background | Yes: new discovery precedes existing format guard | No focused malformed-slug assertion in the added tests | **Covered by runtime.** All six malformed selections reject before/after. After adapter PIDs 835658/835793/835921 request inventory twice; helper PIDs 835700/835857/835958 request once with `--no-extensions`. None sends `set_model` or prompt. Server logs contain each format error; failed title regeneration retains the original title rather than pretending the unchanged chat run is a helper success. |
| F13 | Extension-only model unavailable in background; helper strips extension args and reports guidance | No to extension availability restriction; yes to new pre-selection inventory lookup | Existing text-generation rejection test checks model error, `--no-extensions` guidance and no prompt; launch tests cover extension stripping | **Covered by tests, boundary preserved.** Real helper launch records also show no explicit extension args and `--no-extensions`. Extension-backed chat captures cannot prove successful background selection of the same extension. |

## Decision on F03 and remaining scope

There is **no** real background transcript selecting a slash-named provider from models.json. All ten archived models.json fixtures define only the ordinary synthetic provider. This absence is real, but it is **not a missing required proof row**: the lowest changed layer is the background caller consuming a reported pair. Its regression supplies that pair through the fake RPC connection and asserts the exact `set_model` request. The production helper launches with extensions disabled in this test, as in production. The separate real F12 helper inventory records demonstrate that a models.json provider is available under those launch flags; F11 demonstrates a real ordinary models.json selection and completion. Loading models.json is existing Pi behavior, unchanged by this PR.

Accordingly, the unit assertion proves the changed behavior; the runtime evidence proves the unchanged launch/config boundary independently. It would be misleading to label F03 as runtime-captured, but requiring another paid end-to-end turn would duplicate evidence rather than resolve an untested T3 branch. All background text operations share this runner, so commit generation is sufficient at this layer.

**Affected rows with neither test nor transcript: none.** The six runtime rows requested by the prior matrix are all covered. That earlier matrix predates the refresh fix: its description of F10 as an unchanged-inventory test/no-refresh limitation is superseded by the current test and runtime. Reverse collision order, inventory timeout rather than protocol-error injection, unsuccessful refresh after an already successful cache, corrupt/non-string inventory entries, and the actual pi-llama-cpp extension were not separately captured. These are additional input combinations or third-party behavior, not additional changed selection branches required for this scoped proof; no claim of exhaustive protocol fuzzing or all Pi plugins is made.

## Reproduction method if an extra capture is desired

No missing row requires production. For an optional direct F03 capture, use real `T3CODE_DEV_SEED=0 vp run dev` from each side's own checkout, with its own fresh state and real `pi` on PATH using the CLIProxyAPI hub. Put a synthetic provider such as `audit/slash` with synthetic ID `haiku-fixture` into an isolated `PI_CODING_AGENT_DIR/models.json`. Route its upstream traffic through the same private alias forwarder so public logs contain only synthetic identities. Do not rely on extension registration: the helper disables it.

Use the existing driver's server settings RPC to select `audit/slash/haiku-fixture` for text generation, then dispatch title regeneration on a thread with a prior ordinary control turn. Capture helper launch flags, inventory pair, outgoing selection pair, ACK, prompt/assistant text and persisted title outcome. Before should split the provider and reject; after should preserve the reported pair and complete. Redact hub URL/authentication and all private runtime model metadata before uploading. The same method supports both-ID fixtures. The supplied extension reload and explicitly labelled real-Pi interposer remain the appropriate mechanisms for late registry changes and inventory-only fault injection, respectively; models.json alone cannot make real Pi return a failed inventory RPC.

## Source anchors

- [Resolver](https://git.cafe/pingdotgg/t3code/blob/bf2902176ccbe799639e46f3834935a0e5328f22/packages/provider-pi/src/server/rpc.ts#L63), [adapter discovery](https://git.cafe/pingdotgg/t3code/blob/bf2902176ccbe799639e46f3834935a0e5328f22/packages/provider-pi/src/server/adapter.ts#L2424), [adapter selection](https://git.cafe/pingdotgg/t3code/blob/bf2902176ccbe799639e46f3834935a0e5328f22/packages/provider-pi/src/server/adapter.ts#L2579).
- [Background caller](https://git.cafe/pingdotgg/t3code/blob/bf2902176ccbe799639e46f3834935a0e5328f22/packages/provider-pi/src/server/textGeneration.ts#L62), [background regression](https://git.cafe/pingdotgg/t3code/blob/bf2902176ccbe799639e46f3834935a0e5328f22/packages/provider-pi/src/server/textGeneration.test.ts#L130), [adapter regression](https://git.cafe/pingdotgg/t3code/blob/bf2902176ccbe799639e46f3834935a0e5328f22/packages/provider-pi/src/server/adapter.test.ts#L2277).
- [Picker first-occurrence deduplication](https://git.cafe/pingdotgg/t3code/blob/bf2902176ccbe799639e46f3834935a0e5328f22/packages/provider-pi/src/server/status.ts#L116), [helper launch restrictions](https://git.cafe/pingdotgg/t3code/blob/bf2902176ccbe799639e46f3834935a0e5328f22/packages/provider-pi/src/server/mcpInjection.ts#L269).

Read-only scope honored: no source edits, tests/checks, servers, provider turns, pushes, comments or PR mutations. Scratch downloads and this matrix are confined to the assigned scratch directory; no deletions. Worktree clean at inspection and final status check. Completed within the 45-minute budget.

AI-assisted; verified with the tests and tools listed above.

FRICTION:
tool | Python urllib artifact downloads returned HTTP 403; curl with a browser user agent succeeded | Use curl for these artifact downloads.

VERDICT: SUFFICIENT
