# Proof audit pass 1 — issue 24302

Issue: [#24302](https://git.cafe/pingdotgg/t3code/issues/24302). Read issue and all comments through cafe (one comment: “same here”). Read worktree AGENTS.md and full three-file diff. Read-only source audit; no tests, browser, captures, servers, edits to checkout, or delegation performed.

Compared base [27e0c684c5](https://git.cafe/pingdotgg/t3code/commit/27e0c684c5) to head [14d89dd239](https://git.cafe/pingdotgg/t3code/commit/14d89dd239); checkout HEAD matches head and working tree clean. No PR exists for this audit.

## Finding and evidence provenance

Backend auth adapter change has visible terminal interaction. Untyped valid `_meta["terminal-auth"]` now normalizes as terminal and launches its complete command/args; typed terminal continues launching resolved agent command plus resolved args plus method args. Both use base environment < resolved environment < method/legacy environment, then the same PTY input/output/resize/cancel and fresh ACP session verification paths.

Lead-supplied reproduction, NOT independently executed by this auditor: Linux Kimi 1.52.0, registry provider acpRegistry_kimi_cli installed in isolated worktree state; main hangs at Starting sign-in… beyond 30 seconds. Direct ACP initialize advertises absolute binary + login in legacy metadata. Existing before screenshot and local transcript remain with lead; neither has been read or publicly uploaded here. Screenshot alone does not establish elapsed time, cancellation, retry, or terminal input.

## Minimum operational capture matrix

All rows below involving interaction/time require BEFORE AND AFTER NARRATED RECORDINGS. A single continuous recording can cover multiple row IDs if timestamps index every step. Narration may be voice or synchronized captions; include actions and expected/observed outcomes. Static or zero/threshold image diffs supplement recordings; they never replace them.

Variants V = 1440px light, 1440px dark, 390px light, 390px dark. Record exact viewport height, device scale, browser version and theme for matched before/after; width alone is insufficient. 390px is responsive web, not native mobile.

| ID | Fixture / path / variants | Narrated steps and expected evidence | Proof status / recording requirement |
|---|---|---|---|
| K1 | Real Linux Kimi 1.52.0; Add provider wizard authentication step; V | Begin from installed, unauthenticated provider and visible method. Click Sign in; show starting state then actual Kimi sign-in prompt on after. Before preserve >=35 seconds after click to demonstrate reported >30-second hang; after retain same observation window and show prompt persistence. Include readable safe terminal output without opening external login or displaying one-time codes. | PENDING: 4 matched recording pairs. Lead has only static before evidence reported. |
| K2 | Same wizard / same V; continue K1 clips | At actual prompt send only a safe, noncredential response that the real prompt accepts, if available; narrate response and output. Show usable keyboard focus and narrow-width terminal. Cancel; show inactive/cancelled state and Retry sign-in; retry and show fresh prompt. Before perform same available actions, explicitly narrating absence of a terminal/input if hung. Show wizard footer blocked while active and usable after cancellation. | PENDING; RECORDING REQUIRED, consolidated into K1's 4 pairs, not extra clips. If no safe response exists, mark real input unverified and use T1 for input transport proof. |
| K3 | Real Linux Kimi 1.52.0; saved Provider settings; V | Begin at saved provider, show readiness/auth explanation, selected method and Sign in. Same starting -> actual prompt -> safe input if possible -> Cancel -> Retry -> fresh prompt lifecycle. Preserve >=35-second matched observation window. Include changed terminal-specific auth explanation if authentication_failed probe produces it. | PENDING: 4 matched recording pairs; separate entry path required even though inner renderer shared. |
| T1 | Deterministic ACP typed-terminal fixture; saved Provider settings; 1440 light | Clearly label SYNTHETIC, not Kimi. Advertise typed terminal with resolved args, login args and nonsecret env precedence. Prompt -> safe input/Enter -> appended output; trigger resize and observe dimensions; Cancel -> reject stale input -> Retry fresh terminal. Then controlled exit 0 -> verifying -> held verification -> success; separately controlled verification failure and nonzero terminal exit -> failure -> retry. Use event barriers, no timing assertions in backend tests. | PENDING: 1 matched recording pair covering all interaction/time branches. Identical expected before/after is valid regression evidence, still requires recordings. Source tests already exercise typed spawn/env/input/resize, cancel and verification failure; this audit did not run them. |
| K4 | Real Kimi authenticated completion, either app entry | Complete login -> fresh ACP verification -> signed-in account -> Done/usable saved state. | UNVERIFIED: no Kimi account available. RECORDING REQUIRED if later claimed. Synthetic T1 success cannot verify a real Kimi account. Do not claim issue fixed end-to-end through account verification. |
| P1 | Windows real Kimi | Same legacy command launch, PTY prompt, cancel/retry, and eventual account verification. | UNVERIFIED: Windows cannot execute on this Linux host. RECORDING REQUIRED if later claimed. No Windows executable/path correctness claim. |
| C1 | Native mobile saved Provider account screen, connected to same server | Same legacy start -> prompt -> Terminal response/Send response -> cancel -> retry. Native mobile strips ANSI and sends line input rather than using web Ghostty. | UNVERIFIED native behavior; RECORDING REQUIRED if later claimed. No browser/device use authorized for this auditor. |
| C2 | Desktop shell, same server | Same web terminal lifecycle, including link handoff only if exercised. | Shared web renderer/source coverage only; native runtime UNVERIFIED. RECORDING REQUIRED if later claimed. No extra desktop theme/width cross-product required for backend-only diff. |

Minimum available Linux web package: 9 matched before/after recording pairs = 18 files (wizard 4 + saved settings 4 + typed regression 1). K2 is indexed within K1, not multiplied. Capture one safe prompt/starting still per side for K1 and K3 in each V = 8 pairs / 16 stills; these are review thumbnails supplemental to the recordings. Consolidate lifecycle clips, not distinct entry wrappers. T1 need not repeat V: it exercises the unchanged same web terminal renderer already covered by K1/K3; it does not establish other native surfaces.

Before and after must match Kimi version/binary, provider configuration, selected auth method, unauthenticated credential state, isolated data snapshot, target environment, viewport/theme and narrative action sequence. Preserve original snapshots; never wipe or mutate live user credentials to manufacture “before.” For wizard replay, use equivalent isolated unauthenticated fixtures and describe any changed generated IDs. Avoid accidental already-signed-in runs. Use base/head commit labels; the current running lead-owned server is not automatically both builds. Lead owns ports 14789/6749; this auditor has not touched them.

## Minimal backend fixture matrix derived from changed branches

These are source-level proof requirements, not demands for unrelated-provider UI captures. They can fit existing auth/probe/driver test files. No tests were executed in this audit.

| Fixture | Required assertion | Current source coverage at audited head |
|---|---|---|
| Valid real-shaped legacy metadata | Discover terminal without spawn context; initialize then launch metadata absolute command and login args without --acp; never authenticate RPC | New auth test covers terminal classification + absolute command/args + no authenticate; does not complete lifecycle. |
| Legacy defaults and env | Missing args/env become []/{}; metadata env overrides resolved/base env; complete command replaces resolved ACP command | Defaults/legacy env override not directly covered by added test; typed env precedence covered by existing test. |
| Typed terminal plus competing legacy metadata | Typed command remains resolved command + resolved args + method args; typed env wins; legacy ignored | Existing typed test covers standard launch/env, not competing metadata. |
| Explicit agent/env_var plus terminal metadata | Explicit type wins; agent uses authenticate; env_var does not authenticate | Existing browser test covers agent behavior; conflicting metadata not covered by added test. |
| Untyped missing/malformed metadata | Missing command, blank/control/too-long command, non-string command, wrong args/env types -> legacy rejected and ordinary untyped-agent behavior retained | No added decoder boundary tests. Group cases in one table-driven normalizer test rather than many lifecycle fixtures. |
| Probe display / readiness | Spawn-aware legacy command string reflects complete command, quotes whitespace/apostrophes, omits oversized display; auth-failed snapshot gets terminal-specific explanation. Without spawn still classifies terminal | Changed probe helper has no focused new normalization/driver test in this diff. This is a second affected observable branch, not only PTY launch. |
| PTY unavailable | Legacy terminal method filtered from discovery like typed; no impossible in-app sign-in offer | No added test for newly recognized legacy shape without PTY. |
| Shared terminal lifecycle | Output/input/resize, cancel cleanup/stale rejection, nonzero exit, retry, fresh ACP verification; success only after verification; failure never authenticates | Existing typed tests cover output/input/resize, cancellation, success, verification failure. Added legacy test stops at waiting; no direct legacy completion/retry proof. Reuse shared lifecycle proof; do not require duplicating every typed test for legacy. |

## Surface scope / consolidation

Web Add provider wizard (ProviderWizardAuthenticationStep), saved ProviderSettingsPanel, and ProviderSetupSection embed ProviderAuthenticationSection, whose terminal branch loads ProviderAuthTerminal. Wizard footer is separate and thus explicitly included. Desktop wraps the same web UI. Mobile SettingsProviderAccountsRouteScreen consumes the same client-runtime providerAuth state/start/respond/cancel RPC commands but renders its own terminal response field. Backend launch therefore applies to all connected clients and local/remote/relay/tunnel environments: PTY runs on selected server, never in browser. No wire schema, callback transport, relay routing, or UI implementation changes exist in the diff; no full connection-mode cross-product is justified. Remote native behavior is not thereby verified.

Only ACP registry auth normalization/launch changes. Codex/Claude/Cursor/Grok/OpenCode/Antigravity standalone adapters are out of scope; do not demand their captures. A typed ACP fixture is the relevant regression control. Command palette/keybinding/chat do not implement a separate terminal-auth entry flow in the examined callers; no new controls or reverse action were added. Sign out is unchanged and real-account verification remains unavailable. No documentation edit is necessary to prove this adapter fix.

## FRICTION / handoff

1. PROOF GAP: actual after Kimi prompt, cancellation/retry, matched before recordings and all requested V variants are not yet supplied. No claim of completed operational proof.
2. BASELINE GAP: supplied static screenshot establishes visible state only. Re-record before on the exact baseline (or label any different current-main SHA); cannot infer matched baseline recordings from it.
3. ACCOUNT/PLATFORM GAP: real Kimi success and Windows remain explicitly unverified; native mobile and desktop runtime also unverified. Responsive web does not substitute for native mobile.
4. SOURCE PROOF GAP: new decoder/normalizer/display/no-PTY branches lack focused regression assertions in this diff. Added integration test correctly covers the central legacy launch regression but stops at waiting. Prefer a compact fixture table and one shared lifecycle proof; avoid test proliferation.
5. PUBLICATION: this file contains only source-derived requirements and sanitized lead-provided facts, no credentials, login codes, transcript contents, pairing URLs, or customer data. Keep this /tmp file available for evidence agent and audit pass 2. Nothing committed; no PR created; no server touched.
