Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 21, 2026, 4:02 AM ET / 08:02 UTC. ClawSweeper reviewWhat this changesEnable Linux to read existing Codex Priority/Fast trace evidence and apply the correct cost estimates while preserving cached history, with regression tests and documentation. Merge readiness✅ Ready for maintainer review Keep open: this fixes a source-confirmed Linux pricing defect still present on main and in v0.63.0. The focused patch and reported CLI/cache-upgrade results support landing; no blocking correctness or security finding was identified. Priority: P2 Review scores
Verification
How this fits togetherCodexBar combines local Codex session usage with SQLite trace evidence to distinguish Standard from Priority pricing. Its cached cost snapshots feed native reports and the existing CLI host-summary output. flowchart LR
A[Local session history] --> C[Usage scanner]
B[SQLite Priority traces] --> D[Platform SQLite reader]
D --> C
E[Existing history cache] --> C
C --> F[Priced cost snapshot]
F --> G[CLI and host summaries]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Use the existing platform SQLite dependency for the shared Priority reader while preserving native history through the established cache-adoption path. Do we have a high-confidence way to reproduce the issue? Yes: current main's SQLite3-only guard excludes the existing Linux CSQLite3 dependency and returns empty Priority evidence. The contributor also reports a matching baseline CLI failure; this review did not execute it. Is this the best way to solve the issue? Yes: extending the established reader's import guards avoids a second implementation, and compatible cache adoption preserves existing history while ordinary refresh corrects pricing. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6f59667e12c2. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Problem
On Linux,
CodexBarCorelinks the existingCSQLite3module, but the native Codex Priority trace reader was compiled only undercanImport(SQLite3). The resolver consequently returned an empty, apparently validated result even when the host had readable Priority/Fast evidence. Supported Priority usage could then receive Standard API-equivalent prices. This also affects a Linux host serving the existing SSH cost-summary command.With two synthetic gpt-5.4 sessions (110 tokens each, one Priority) and fixed local prices, the unpatched production resolver/scanner tests fail and the native Linux CLI reports $0.00050 rather than $0.00075. This is a synthetic reproduction, not a claim about any user's historical bill.
Change
SQLite3on macOS or the existingCSQLite3dependency on Linux throughout the native trace reader, memo, and persisted cursor paths.SQL, pricing formulas, SSH transport, JSON schema, and CLI options are unchanged. This is independent of the UI/combined-scan proposal in #3687.
Validation
ec12a024, then all five pass with this patch. Fullswift test --jobs 2 --parallel: 660 tests / 86 suites passed.--summary-onlyreport 220 tokens / $0.00050 on the baseline and 220 tokens / $0.00075 after the fix. A normal refresh of the baseline cache (without--refresh) preserves its database identity, token snapshots, accumulators, and file checkpoints while correcting the Priority price. Removing the trace afterward retains the validated $0.00075 estimate. Coverage and provenance remain unchanged. The snapshot regression separately asserts 110 Standard and 110 Priority tokens; the wire schema is not expanded.make test118/118 groups passed on the first attempt, no retries or timeouts;make checkandgit diff --checkpassed.signal 9, cgroupoom_kill=1) while building Core. A musl build/runtime pass is not claimed; it still needs validation on the CI runner.The Linux tested source-file hashes match this commit. No installed app/CLI or private session history was used.