fix: make HTTP rate-store policy authoritative - #1777
Conversation
|
Warning Review limit reached
Next review available in: 48 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. 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: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (14)
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 |
📊 Benchmark Results✅ All benchmarks passed
Updated: 2026-08-08T19:53:50.225Z · Commit: 454be99 |
c1e51bf to
f1e5b46
Compare
Outcome
HTTP rate-limit middleware now passes its
failOpenchoice into each limiter check, so store outages follow the HTTP policy even when theRateLimiterconstructor uses the opposite default. Fail-closed requests reject with recovery headers; fail-open requests continue with an explicit degraded result.Runtime inspection records one
rate-limit.store-unavailablefailure event with the policy name and actualallowedorrejectedaction. The middleware factory forwards the same policy.Fixes #1709
Verification
pnpm --filter @croco/ratelimit-core test— 92 passedpnpm --filter @croco/transports-http test— 414 passedpnpm public-api:check— 115 package snapshots matchpnpm problem-registry:check— 581/581 codes matchpnpm package-manifests:check— 115 manifests normalizedpnpm docs:api-triggers:check— passedpnpm changeset-required:check -- --base origin/trunk --head HEAD— passedpnpm check— 24/25 passed, one not applicableReview gates
Validation gap
The full API-doc drift run identified four pre-existing unrelated generated files on the current base (
Problem.md,CROCO_PROBLEM_CODE_REGISTRY.md,TrpcRouterOptions.md, andParamResolver.md). This PR synchronizes only the three affected rate-limit API artifacts to avoid unrelated generated churn.