Skip to content

fix(usage): report incomplete transcript scans - #11321

Open
shivamhwp wants to merge 1 commit into
fix/client-device-ticket-http-groupfrom
fix/server-usage-scan-coverage
Open

fix(usage): report incomplete transcript scans#11321
shivamhwp wants to merge 1 commit into
fix/client-device-ticket-http-groupfrom
fix/server-usage-scan-coverage

Conversation

@shivamhwp

Copy link
Copy Markdown
Collaborator

Usage summaries could omit unreadable transcripts while claiming complete coverage. Scans now keep readable records and report partial for entry or file failures, failed for an unreadable root, and missing for an absent root. Diagnostics contain bounded counts rather than raw filesystem errors.

Failed reads retain their previous parse cache for recovery, and incomplete directory walks cannot evict unseen cache entries. The shared client merge prefers a complete copy of the same source over a partial one and excludes failed sources from ownership.

Fixes #5798. Stacked on #11298. Codex cumulative-counter validation in #5800 remains separate; this change reports filesystem coverage failures.

Validation: 39 focused reader, service and merge tests pass, plus server/shared typechecks and scoped lint. Six service/merge regression scenarios fail on the original code. A separate Node replay with real Linux permission failures retained a readable file beside an inaccessible directory, reported an inaccessible root as failed, and recovered the original usage after permissions were restored. Directory rotation, file stat errors, retrying unchanged bytes and cache preservation are covered. Windows and macOS filesystem behavior remains unverified.

Internal refinement remains pending after the final authorized Fable retry failed. No merge requested.

Implemented and tested with GPT-6 through Codex in T3 Code.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Sep 11, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 89f0222

Macroscope's review found this PR approvable — This is a focused usage-scanning bug fix that reports incomplete filesystem reads without discarding readable or cached transcript data. Normal successful scans remain unchanged, and targeted tests cover retry, partial walks, root failures, and duplicate-source selection.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ No successful main baseline artifact is available yet. This run establishes the initial measurement.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.6 KiB 15.1 KiB
Codex Thread snapshot wire 7.0 KiB 7.3 KiB
Codex Live turn WebSocket wire 6.6 KiB 7.8 KiB
Codex Live turn WebSocket decoded 57.1 KiB 66.4 KiB
Codex Live turn messages 10 21
Claude Total thread wire 13.6 KiB 15.1 KiB
Claude Thread snapshot wire 7.1 KiB 7.3 KiB
Claude Live turn WebSocket wire 6.6 KiB 7.8 KiB
Claude Live turn WebSocket decoded 57.9 KiB 66.4 KiB
Claude Live turn messages 10 21

Baseline: unavailable · PR result: 89f0222 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 113.9 KiB
  • Claude decoded thread snapshot: 114.6 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant