fix(codex): avoid reauthentication advice for rate-limited warmup - #4144
fix(codex): avoid reauthentication advice for rate-limited warmup#4144remorser58 wants to merge 1 commit into
Conversation
Classify HTTP 429 warmup failures separately and carry the machine-readable failure code into OAuth login status so clients can distinguish rate limits. Preserve a received 429 even when bounded error-body cleanup times out. Constraint: Keep failed warmup from persisting or validating an account. Rejected: Change quota-exhausted registration policy | Separate work in PR lidge-jun#3848. Confidence: high Scope-risk: narrow Directive: Never expose raw upstream warmup error bodies. Tested: 355 focused tests; TypeScript typecheck; privacy scan; 425-page docs build. Not-tested: Full repository suite and Windows/Linux execution.
|
⏳ DRAFT
What to do
Review readiness checklist
1/4 boxes ticked. This pull request was already a draft. Its draft status will be preserved after every issue above is resolved. |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
리뷰 · 우선순위 46 / 80이 PR은 Codex 계정 warmup이 HTTP 429를 받았을 때, 지금도 “다시 로그인(Reauthenticate)하세요”로 안내하는 오답을 고치려는 좁은 패치입니다. 관련 이슈/PR은 #3846(등록이 warmup 성공에 묶임), #3848(쿼터 소진 시 등록 유예, 여전히 draft)이고, 작성자도 등록 정책 자체는 건드리지 않고 오류 분류·문구·상태 코드만 분리한다고 명시했습니다. base는 현재 방향은 맞고 범위도 작습니다. 사용자가 쿼터/레이트리밋인데 재로그인을 반복하게 만드는 UX는 실제 운영에서 자주 나오는 함정이고, #3848의 “등록 자체를 warmup 성공 전에도 허용”과는 축이 다릅니다. 다만 auth 표면이라 스폰서 없이 머지하면 안 되고, draft + hygiene-blocked 상태에서는 리뷰 큐에 올리면 안 됩니다. 테스트는 auth-api/warmup 쪽에 회귀를 잘 심었고, 작성자 로컬 355 focused green·typecheck·privacy·docs build를 적었습니다. 전체 스위트·Windows/Linux·실계정은 미실행이라 스폰서 전 최소 Cross-platform CI green은 필요합니다. 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
Summary
HTTP 429 during Codex account warmup currently tells users to reauthenticate even though signing in again cannot reset a provider's rate or usage limits. Report this case as rate-limited, with guidance to retry later or after the account's usage limit resets.
codex_warmup_rate_limitedin OAuth login status.Related to #3846 and #3848. This is an independent, narrowly scoped error-reporting fix; it preserves the current account-registration policy. The larger deferred-registration behavior in #3848 remains separate.
Verification
Verified on macOS using synthetic OAuth identities and upstream responses, with isolated test homes. No real account credentials or provider inference calls were used for this patch.
bun run test -- tests/codex-integration/codex-auth-api.test.ts tests/codex-integration/codex-warmup.test.ts tests/codex-integration/warmup.test.ts tests/codex-integration/token-guardian.test.ts tests/codex-integration/codex-quota-auto-refresh.test.ts: 355 passed, 0 failed.bun run typecheck: passed.bun run privacy:scan: passed.cd docs-site && bun run build: passed, 425 pages.git diff --check: passed.The regressions cover bounded stalled-body cancellation, preserved HTTP 400 timeout behavior without fallback, rate-limit versus authentication classification, failure-code propagation, one warmup attempt, no raw upstream error-body disclosure, no new account persistence, and unchanged credentials after failed reauthentication.
The full repository suite, Windows/Linux execution, and live-account validation were not run. This PR is a draft under the contributor policy. Authentication-area maintainer sponsorship and the required upstream review remain necessary before merge.
Checklist
Review readiness checklist