Repository navigation
fix(claudeplatform): preserve balance when credit details overflow - #5115
Yuxin-Qiao wants to merge 1 commit into
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 Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR bounds Claude Platform grant details to 24 rows and shows an omitted count when the wallet contains more grants. Example: A Claude Platform wallet has a $200 balance and 25 additional credit grants.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current snapshot-validation failure with a focused change; no actionable defects remain, and the updated CLI evidence addresses the previous proof request. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe bundled Claude Platform plugin converts Console billing responses into a shared usage snapshot that the Swift host validates for app and CLI consumption. flowchart LR
A[Console billing responses] --> B[Claude Platform plugin]
B --> C[Balance and credit windows]
B --> D[Bounded grant details]
C --> E[Host snapshot validation]
D --> E
E --> F[App and CLI output]
Technical reviewBest possible solution: Land the bounded detail-list repair while preserving existing wallet calculations, expiry ordering, and the host’s snapshot limits. Do we have a high-confidence way to reproduce the issue? Current main maps every additional grant into one section, which the host rejects above 24 rows; supplied base/head CLI results corroborate this path, and no target code was executed during review. Is this the best way to solve the issue? Bounding presentation in the existing provider is the smallest complete repair: it respects the documented host contract, preserves numeric wallet data, and explicitly counts omitted details. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1f6da9bec444. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 18, 2026, 9:03 AM ET / 14:03 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Summary
If a Claude Platform wallet has more than 24 additional credit grants, its detail section exceeds the plugin host's row limit and the whole balance refresh fails. Keep all details at the limit. When grants exceed the limit, show 23 in expiry order plus an omitted count. The total wallet balance, subscription and purchased credit windows, and monthly spend remain available.
Related to #5094.
Validation
./Scripts/test_fast.sh --jobs 6 -Xswiftc -gnone --filter 'ClaudePlatformPluginTests|CostUsageStoreReadWorkTests|SpendDashboardSnapshotBackedRevisionTests'passed. The new wallet regression passed all six cases.make checkpassed../Scripts/test.sh --direct-workers 8passed all 168 groups on the first run, with zero retries or timeouts. Test discovery used the same local Swift build flags.CLI behavior with an isolated wallet fixture
Ran local builds using the normal
codexbar usage --provider claudeplatform --source web --jsonentry point against the base (1f6da9bec444) and PR head (feb4131e3718). A test-only transport supplied synthetic Console responses for the organization, credits, and spend requests. Outbound network and Keychain access were disabled. Both QuickJS and JavaScriptCore produced the same results. The rows below are a sanitized excerpt of the CLI's output and exit status.details[0].rows exceeds 24 entries2 not shown177 not shown