fix(provider-http): bound admission delays - #2046
Conversation
Compute quota and budget waits as remaining eligibility delays so atomic Redis admission reaches its claim instead of looping forever.\n\nRefs DOFEK-SERVER-4N\nRefs DOFEK-SERVER-2K
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
|
Warning Review limit reached
Next review available in: 40 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Thanks 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 |
|
Storybook previews for This comment updates automatically on each PR push. |
PR Summary by QodoFix provider admission pacing by using remaining window/interval delays
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
149 rules✅ Skills:
fix-provider, write-tests, cloudflare 1.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Self-heal missing and future admission timestamps so quota and budget waits remain bounded and converge under atomic Redis rechecks.\n\nAdd the official Strava rate-limit citation requested in review.
|
Addressed all three Qodo findings in d6c18bd:
Validation: 91 focused tests pass; targeted Biome and |
|
🤖 Review skipped: Repository rate limit exceeded. Free accounts are limited to 2 reviews per 4 hours per repository. Upgrade to a paid plan for unlimited reviews. |
Summary
MULTI/EXECinstead of retrying foreverRoot cause
admissionDelayMs()returned the complete quota pacing interval on every atomic Redis claim recheck. The claim loop slept for that interval and recalculated the same full interval indefinitely, so the active BullMQ job renewed its lock without making progress. The inferred-budget branch had the same fixed-delay defect.Validation
pnpm lintpnpm typecheckCI=1 pnpm test(13,888 passed, 21 skipped)git diff --checkRefs DOFEK-SERVER-4N
Refs DOFEK-SERVER-2K
Summary by cubic
Fixes provider admission pacing by using remaining time instead of full intervals, and hardens persisted pacing so waits stay bounded. This stops atomic Redis claim loops and lets Strava jobs make steady progress.
lastRequestMs; require both short-limit and short-usage to pace; admit immediately if no prior timestamp.lastRequestMsandwindowStartMs, preserve past timestamps, and setlastRequestMson quota save when missing.MULTI/EXECafter the pacing interval (and complete immediately with quota state but no prior timestamp).Written for commit d6c18bd. Summary will update on new commits.