feat(reliability): add retry governor controls and telemetry#40
feat(reliability): add retry governor controls and telemetry#40
Conversation
Adds a pure retry governor for all-rate-limited flows, introduces an absolute wait ceiling setting with env override, and wires decision-based retry gating into the request loop. Also exposes retry ceiling in Settings Hub (Rotation & Quota), and adds structured codex-metrics counters for retry governor stop reasons. Validation: - npm run typecheck - npm run lint - npm run build - npm test - npm run clean:repo:check - npm run audit:ci Co-authored-by: Codex <noreply@openai.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (14)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review Re-triggering review to clear the transient rate-limit status check failure. |
|
✅ Actions performedReview triggered.
|
|
Re-requesting CodeRabbit review: the current failure is CodeRabbit: Review rate limit exceeded while other checks are green. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
Follow-up tracking: external blocker recorded in #44. Current failing context remains:
Actions already taken:
Next required step is external quota reset/increase, then rerun CodeRabbit. |
|
no action needed from you in the meantime — all threads are clean and the pr is in good shape. ✅ Actions performedReview triggered.
|
Summary
etryAllAccountsAbsoluteCeilingMs\ + \CODEX_AUTH_RETRY_ALL_ABSOLUTE_CEILING_MS\ and wire it into the request loop
Validation
note: greptile review for oc-chatgpt-multi-auth. cite files like
lib/foo.ts:123. confirm regression tests + windows concurrency/token redaction coverage.Greptile Summary
adds pure retry governor module to centralize all-rate-limited retry decisions with new
absoluteCeilingMsconfig and env var. clean separation of decision logic from request loop enables isolated unit testing. three new telemetry counters track governor stop reasons (wait>max, retry limit, absolute ceiling).key changes:
lib/request/retry-governor.ts- pure decision function with comprehensive edge case handling (NaN, Infinity, negative values)index.ts- integrated governor, tracks accumulated wait across retries, logs stop reasonslib/config.ts+lib/schemas.ts- newretryAllAccountsAbsoluteCeilingMsfield with env overrideCODEX_AUTH_RETRY_ALL_ABSOLUTE_CEILING_MSnotes:
waitMsbut actual sleeps include ±20% jitter, so real wait can exceed ceiling by ~20% (commented)accumulatedAllRateLimitedWaitMsis local to request loop scopeConfidence Score: 4/5
Important Files Changed
Last reviewed commit: d7a8a4d