Retain priced Codex models when Auto Review is unpriced - #2643
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 4, 2026, 11:35 PM ET / August 5, 2026, 03:35 UTC. ClawSweeper reviewWhat this changesThe PR displays priced Codex model rows beside an unpriced Auto Review routing row when their daily costs reconcile, marking the breakdown partial and unranked. Merge readinessKeep this PR open for a maintainer product decision: the implementation is focused, fail-closed for invalid data, and backed by native UI proof, but it deliberately changes the dashboard from withholding incomplete model attribution to showing reconciled partial rows. Priority: P2 Review scores
Verification
How this fits togetherCodexBar converts local Codex usage records into provider and model spending summaries for the Usage & Spend dashboard. This change sits in the model-attribution step between scanned daily costs and the dashboard’s ranked model rows. flowchart LR
A[Local Codex usage records] --> B[Daily cost and model breakdowns]
B --> C[Spend attribution]
C --> D{Costs reconcile?}
D -->|Complete| E[Ranked model rows]
D -->|Partial but reconciled| F[Partial unranked model rows]
D -->|Invalid or inconsistent| G[Withhold model breakdown]
Decision needed
Why: Current main intentionally requires complete model-cost coverage, so source evidence cannot determine whether this broader attribution contract is desired. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Adopt the reconciled partial-attribution display only if maintainers want exact daily cost matching to be sufficient evidence for a clearly labeled, unranked model breakdown. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes a dashboard attribution policy rather than repairing a specified broken contract; it includes native after-fix UI proof of the proposed behavior. Is this the best way to solve the issue? Unclear: the implementation is narrowly scoped and safely rejects invalid data, but maintainers must decide whether daily reconciliation is sufficient attribution evidence. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9cc993f310cb. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (11 earlier review cycles; latest 8 shown)
|
|
Native Usage & Spend proof with model names retained: The capture shows the priced Codex model rows, partial-breakdown warning, dashed unranked markers, and Follow-up signed commit @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Landed. Verification before merge (independent maintainer-agent review):
|

Summary
Keep priced Codex model rows visible when the same local history also contains an unpriced
codex-auto-reviewrouting row. The dashboard labels this as a partial model breakdown and removes ranking; it does not invent a price for Auto Review.Root cause
Codex local
token_countrecords do not contain a billable model. The surrounding context can namecodex-auto-review, which is a routing label with no pricing entry. The scanner therefore leaves that row unpriced. The spend dashboard previously treated a single unpriced model row as reason to discard every Codex model row, even when the daily stored cost exactly matched the sum of the other priced rows.Behavior
Validation
make checkswift test --filter SpendDashboardModelTests(30 tests passed)make test(complete suite passed with the App Store Xcode toolchain before the final focused guard)git diff --checkcodexbar cost --provider codex --format json --days 30structural scan found priced rows alongside unpricedcodex-auto-reviewrows, with a valid aggregate cost.Native runtime proof
This native Usage & Spend capture shows priced Codex model rows, the partial-breakdown warning, dashed unranked markers, and
codex-auto-reviewwith an em dash instead of a fabricated cost. Model names remain visible; financial and usage quantities are redacted.The capture was made at signed parent
39610a6cb8ae6e75761d64d5760222321762069f. Follow-up signed head063fc189fed45a0f6f544a53d0d1d301c9f7d246adds only a fail-closed guard and regression test for malformed named costs; it does not alter the displayed valid-data behavior.