Add opt-in ccusage fallback for incomplete Codex history - #2817
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 9, 2026, 9:34 PM ET / August 10, 2026, 01:34 UTC. ClawSweeper reviewWhat this changesThis draft adds an opt-in, locally supplied or package-bundled ccusage executable as a Codex-only fallback when the built-in local-history scan remains incomplete. Merge readinessKeep this draft open for maintainer product sign-off. The prior coverage-state and packaged-helper provenance findings are addressed, and the PR now includes redacted real-archive output; current main still has no Codex-history ccusage fallback. Priority: P2 Review scores
Verification
How this fits togetherCodexBar scans local Codex archives into token and cost snapshots consumed by the dashboard and CLI. This change conditionally runs a local helper after native scan incompleteness, then publishes separate native and fallback coverage state to those consumers. flowchart LR
A[Codex local archive] --> B[Native history scan]
B --> C{Native coverage complete?}
C -->|Yes| D[Native cost snapshot]
C -->|No| E[Optional ccusage helper]
E --> F{Valid non-regressive report?}
F -->|Yes| G[Fallback cost snapshot]
F -->|No| D
D --> H[Dashboard and CLI]
G --> H
Decision needed
Why: This adds feature, configuration, package, and executable-processing surface that the repository vision explicitly reserves for sign-off; code review cannot choose that supported product boundary. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: If sponsored, retain the explicit helper path, selected CODEX_HOME forwarding, bounded subprocess execution, checksum-before-signing packaging, and separate coverage flags; document whether bundled helpers are enabled automatically or require a visible user opt-in. Do we have a high-confidence way to reproduce the issue? Yes, at source level: the linked report identifies incomplete native coverage, and the submitted focused test creates an incomplete Codex scan then verifies the fallback snapshot and independent coverage flags. Is this the best way to solve the issue? Unclear: the implementation is bounded and preserves native coverage truth, but whether an executable fallback is preferable to native catch-up recovery requires maintainer direction. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c94fe8d86585. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
|
@clawsweeper re-review Updated the PR body with redacted real-archive smoke evidence and pushed the follow-up fixes for native coverage separation and version/SHA-256 helper provenance. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
Changes after review
historyCoverageIsEstablished=falsewhile exposinghistoryFallbackCoverageIsEstablished=true.Validation
Design notes
Related to #2815.