# Proof audit pass 1 — issue 21755

Issue: [#21755](https://git.cafe/pingdotgg/t3code/issues/21755)
Scope: `/home/ubuntu/wt/issue-21755`, HEAD `1b9d71afe4` versus base `70e5e384da`.
Read-only source/proof audit; no edits to checkout, tests rerun, server, browser, push, or public comments. Report upload was explicitly requested.

## Decision

The server-only proof exception applies. Complete diff comprises only `apps/server/src/project/AgentSessionScanner.ts` and its test file. No changed component or rendering surface exists. Existing UI receives additional valid data through unchanged contracts and unchanged render paths; that does not constitute a UI implementation change. Visual fixture matrix: **empty (0 rows)**. Viewport × theme capture set: **empty**. Required recordings: **none**. Do not multiply proof by themes, responsive sizes, platforms, or onboarding states for this change.

The following is a bounded server behavior coverage inventory, not a visual capture matrix. “Affected” identifies changed behavior or a shared reader regression path. It does not request screenshots.

| Path / branch | Affected | Caller and observable outcome | Minimum evidence / current status |
| --- | --- | --- | --- |
| Codex `rollout-*.jsonl.zst` discovery | Yes | `scan` → WebSocket `agentSessionsScan` → `useProjectScans` → existing WelcomeWizard import candidate list; cwd, source, count and activity metadata populated | New discovery test red on base / green on head; reported, not independently rerun |
| Compressed recent history import | Yes | `recentThreads` → AgentSessionImporter → WebSocket `agentSessionsImport` → existing WelcomeWizard selection/import → existing thread history | New import test proves session ID and user/assistant contents; reported red/green. After-fix runtime transcript pending primary |
| Plain `.jsonl` Codex / Claude reader | Yes, shared helper refactor | Existing scan/import callers retain plain-file behavior | Existing focused suite green reported (55 total including two new tests); runtime plain fixture is control |
| Compressed EOF and decompressed byte limits | Yes | Metadata scan stops within limits; import charges expanded bytes and rejects overflow rather than importing partial history | Source reviewed; two new tests cover successful small streams, not compressed boundary/error cases. Explicit residual test coverage gap; no visual proof needed |
| Metadata chunk/record/operation limits | Yes, shared reader | Existing scan budget/truncation behavior retained; compressed reads use expanded bytes | Existing boundary/malformed tests apply to plain files; compressed limits not separately demonstrated |
| Compressed errors, identity checks, discarded/skipped outcomes | Yes, compressed input reaches existing guards | Reader errors are mapped to null/skipped; file identity checked around import | Source reviewed; dedicated corrupt/truncated zstd fixture not present in new tests |
| Import per-file/global byte budget and record budget | Yes | Serialized import reader; plain files charged upfront, compressed charged while decoding | Existing regression suite reported green; compressed limit behavior lacks direct new test |
| Fallback session ID suffix removal | Yes | Strip `.zst` then `.jsonl` before existing parsing | Source reviewed; new import fixture supplies explicit session ID, so fallback is not directly covered |
| Provider homes / ownership / duplicate and completed imports | Indirect shared path | Existing custom-home, provider ownership, duplicate/session and identity handling | Existing suite reported green; no new rendering branch |
| Selection, import progress, refresh, settled-thread expansion | Data outcome only | Existing WelcomeWizard and history interactions; implementation unchanged | Runtime transcript may describe interactions; no recording required because timing/motion is not changed |
| Web / Electron / mobile rendering, transport schema | No code changes | Existing consumers of server data | No separate visual rows; do not infer platform verification |

## Exact minimum proof set

1. Preserve the two focused red test outputs on base with only regression tests applied: discovery expects candidate but receives `[]`; import expects session/history but receives `[]`. Record actual SHA and command/exit status. The supplied reproduction identifies red-test SHA `23ab0127fd`; primary should explain that it is the base-plus-tests state if so, rather than label it pristine base.
2. Preserve green output for the same focused scanner suite at audited head: 55 passing tests, command and exit status. This is reported by the brief; this auditor has not rerun it or inspected a standalone green log.
3. One sanitized before/after runtime transcript using the same isolated fixture setup. Before: plain project visible/importable, compressed-only project absent. After: compressed-only project visible and selected import produces expected user and assistant history; plain control remains discoverable/importable. Include revision, runtime/platform, fixture paths/content construction, fresh timestamps within import window, and results. Do not leave an uncompressed workaround beside the compressed fixture during after verification. Existing screenshots may be retained as supplemental evidence; no additional captures or recording are required.

The existing [before reproduction](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/e42f45385fa41c21/reproduction.md) supplies the baseline and workaround, not the after-fix result. Primary says a real app before/after pass is complete and will provide logs. Until the after log is attached and tied to audited head, runtime proof remains pending, not failed.

## Seed and platform accounting

Read reproduction states: isolated worktree `.t3` state seeded read-only by the dev runner; `CODEX_HOME=/tmp/issue-21755/codex`; dated `sessions/2026/10/21` contains distinct existing plain and compressed workspace fixtures. Each has session metadata/cwd, a user event and an assistant response. Fixtures freshly written at 2026-10-21 22:39 UTC, compressed through `node:zlib.zstdCompressSync`. Plain decompression workaround was removed before after-fix verification. No provider account or live provider turn required. The report does not specify the underlying database snapshot contents; do not claim a particular real-data migration.

Observed baseline platform: Linux x86_64, Node, local web dev server, Chrome, 1280×800, no emulation. Theme unspecified and irrelevant to the changed server behavior. Auditor performed no app capture. Desktop/Electron, macOS, Windows, iOS/Android, other browsers, remote/relay/tunnel and multi-environment scenarios are unverified here. No platform-specific code changed; these are declared limits rather than required visual matrix rows.

## Findings

No visual-proof scope blocker. Do not request redesign, viewport/theme sweeps, recordings, or new UI fixtures. Runtime after-log attachment and source-aligned red/green logs are the only proof-completion items identified. Happy-path zstd discovery and import are explicitly covered by the two added tests; compressed corruption, expanded-size boundaries and fallback ID coverage remain limitations, not evidence of a demonstrated defect in this proof-only audit.

FRICTION brief | Green output and after-fix runtime logs were stated but not supplied to this audit; runtime completion remains conditional. | Attach immutable red/green and before/after transcript links with exact revisions to the review brief.
End of proof audit pass 1.
