refactor: derive or justify every remaining provider special case - #2691
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a2a077286
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| let paceWindow = snapshot.flatMap { | ||
| ProviderDescriptorRegistry.descriptor(for: target).presentation.semanticWindows(snapshot: $0).weekly | ||
| } |
There was a problem hiding this comment.
Preserve Abacus's primary-lane pace window
For Abacus cards, this descriptor-based lookup now returns nil: AbacusUsageSnapshot.toUsageSnapshot() only populates primary, and that primary balance/billing window is monthly, while the default standardSemanticWindows only treats exactly 7-day windows as .weekly. The previous code explicitly used snapshot?.primary for Abacus, so Abacus users lose the pace/forecast in the menu card (and the same refactor affects the settings pane) whenever they have a normal Abacus usage snapshot; add an Abacus semantic-window resolver or keep the primary fallback.
Useful? React with 👍 / 👎.
|
Codex review: needs changes before merge. Reviewed August 5, 2026, 8:02 PM ET / August 6, 2026, 00:02 UTC. ClawSweeper reviewWhat this changesThis PR centralizes selected provider capabilities and presentation rules in descriptors, documents intentional provider-local cases, and adds a gatekeeper test for unexplained cross-provider branches. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open: the descriptor refactor regresses Abacus’s existing primary-window pace display. Likely related people: steipete (recent provider-descriptor work, high confidence) and ratulsarna (original Abacus provider work, high confidence). Priority: P2 Review scores
Verification
How this fits togetherCodexBar converts provider usage data and stored settings into menu, preference, widget, and CLI presentation. Shared provider descriptors bridge provider-specific data semantics to those common surfaces. flowchart LR
A[Provider usage data] --> B[Provider descriptors]
B --> C[Shared presentation logic]
C --> D[Menu bar card]
C --> E[Provider settings]
C --> F[CLI output]
G[Architecture gatekeeper] --> B
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Encode Abacus’s established primary billing-cycle pace semantics in its descriptor, then cover that primary-only snapshot shape with a focused regression test. Do we have a high-confidence way to reproduce the issue? Yes: an Abacus usage snapshot has only a month-long primary window, which the new generic semantic lookup does not classify as weekly while current main explicitly uses that primary window. Is this the best way to solve the issue? No: the refactor needs an explicit Abacus semantic-window mapping, analogous to Kimi’s descriptor mapping, before it can replace the prior primary-window selection. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fb66e63e8719. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What 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
|
Summary
This completes the provider special-case triage with 6 derived / 38 justified / 0 remaining cross-provider case clusters. Six dispatch decisions now come from provider descriptors, capability records, semantic-window metadata, or provider implementations; the remaining 38 clusters carry an adjacent
Provider-specific by design:explanation for the ownership or behavior that makes them intentionally provider-specific.Decision-table highlights:
TokenAccountSupportplus the provider implementation.The new special-case gatekeeper scans cross-provider case clusters outside provider-owned implementation directories. Audited clusters require a justification marker within the cluster window, generic dispatch files must be explicitly allowlisted, and failures report the actionable file/line plus whether to derive, inventory, or justify the case.
The generated Codex parser hash was refreshed after the vendored scanner source changed;
Scripts/regenerate-codex-parser-hash.sh --checkreproduces37aedd661c4272a8.🤖 Generated with Claude Code