Repository navigation
fix(codex): record a 402 account move as a quota recovery - #7231
vadymhimself wants to merge 2 commits into
Conversation
A Codex 402 move was recorded as oauth-account-429, so request metrics counted it as rate_limit and the dashboard labelled it an OAuth 429. Add oauth-account-402 mapped to quota-exhausted and wire it into the cooldown set, the dashboard label map and all locale catalogs. Co-Authored-By: Claude Code <noreply@anthropic.com>
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Review readiness checklist
0/4 boxes ticked. This PR stays in draft until every box above is ticked. |
|
@coderabbitai full review |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
✅ Action performedFull review finished. |
|
Being carried into #7236 with your authorship preserved; this PR will be closed when the bundle lands. |
Co-Authored-By: Claude Code <noreply@anthropic.com>
#7230, #7231, #7232, #7233) (#7236) Carries four vadymhimself follow-ups onto dev: - #7230: the combo sibling check peeks the round-robin ring without advancing it, while the failed account's cooldown is still recorded. - #7231: a Codex account move after a 402 is recorded as quota recovery, separate from 429 rate recovery, through persistence, metrics, analytics and Logs labels. - #7232: the Anthropic server-tool input buffer is capped on the incoming fragment (4,096 code units), so one oversized fragment cannot exceed the bound. - #7233: refused-then-served usage rows are priced from the served attempt, and client cancels keep an unknown cost. A usage-less refusal never changes a row's pricing classification. A row with a leading refusal summarizes exactly like the same row without it, under dev's existing partial-cost contract. Co-authored-by: Vadym O <bolein95@gmail.com>
|
Landed on dev via #7236 in a02cecd, carried with Co-authored-by: Vadym O bolein95@gmail.com. That bundle is reviewed and validated (lidge full suite with 0 new failures, mini Windows focused 48/48, hosted CI green). #7233's pricing kept dev's existing partial-cost contract and pins refusal invariance. Details are on #7236. Thank you, @vadymhimself. Closing this one as superseded by that landing. |
Summary
core-codex-account.ts): a Codex pool 402 account move was recorded asoauth-account-429.causeForRecoveryKindmaps that torate-limit, so metrics counted a quota recovery asrate_limit, and the Logs page labelled it an OAuth 429.oauth-account-402, mapped toquota-exhaustedand wired into the recovery roster, the cooldown set, theLogs.tsxlabel map and all locale catalogs. Infailure-stage-model.test.ts, the invariant 'no recovery kind maps to a cause resending cannot fix' now exempts only this kind, with a comment saying why.Follow-up to the batch-2 bundle (#7224/#7225), which landed at a head from before this review finding was fixed on the source PR. The same commit was offered on the bundle.
Verification
bun test tests/responses/responses-account-label.test.ts tests/lib/failure-stage-model.test.tsgives 24 pass, 2 fail (oauth-account-429recorded).tsc -b: clean.bun x tsc --noEmit: clean.tests/test-layout.test.tsandtests/ci-workflows/file-size-ratchet.test.ts: pass.cd gui && bun run build, i.e.tsc -b && vite build) on 9ea4be7: exit 0, built clean; only the existing >500 kB chunk-size warning.bun run structure:check: passed (structure/transports/responses.mdnow distinguishesoauth-account-402quota recovery fromoauth-account-429rate-limit recovery).Checklist
🤖 Generated with Claude Code
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit