fix(reliability): restack positive TTL and rate-limit normalization - #375
fix(reliability): restack positive TTL and rate-limit normalization#375seonghobae wants to merge 2 commits into
Conversation
|
Warning Review limit reached
Next review available in: 28 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: CHILL 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 |
Purpose
Rebuild the unique reliability delta from #369 directly on current protected
main2db716d7252603689b2cc18b700bac25e872b28fafter #366 advanced protected truth. The protected advance touched only the NIM product-development workflow and its tests, so none of this five-path runtime/test slice is overwritten. No predecessor check, review, scanner, or coverage evidence transfers.configuredTtlMs()andconfiguredRateLimit()must remain positive after integer normalization. Sub-unit positive configuration such as0.5previously passed the pre-floor positivity check and could normalize to zero, disabling cache effectiveness or making the second client request rate-limit immediately. The implementation preserves reviewed floor/cap semantics while falling back safely when the normalized value is non-positive.Test-first current-lineage commits
653dc69b5061ce8c8dd8c79d30e75c4f96680f01— RED current-base contract: installs the exact reviewed realistic TTL/rate-limit/coverage tests before source.cache-ttl.test.tshas no matching production module on the parent and the sub-unit runtime case requires behavior the parent does not provide.a1f813ea582d1a2f6539f28491c9545906157264— GREEN: installs the exact reviewed finalsrc/cache-ttl.tsandsrc/index.tsblobs from fix(reliability): keep normalized TTL and rate limits positive #369.Fresh compare is two commits ahead and zero behind with exactly five paths:
src/cache-ttl.ts,src/index.ts,test/cache-ttl.test.ts,test/configured-rate-limit-coverage.test.ts, andtest/coverage-ignore-operational-helpers.test.ts.Evidence boundary
Focused cases cover unset, non-finite, non-positive, sub-unit positive, positive fractional, and over-cap TTL configuration plus absent/invalid/sub-unit/positive-fractional rate-limit behavior and retry guidance. This change does not establish release, deployment, production KPI, revenue, legal-rights, or acquisition evidence.
Do not merge until unchanged exact head
a1f813ea582d1a2f6539f28491c9545906157264has fresh terminal-success applicationci,reviewer-ci, eligible protected-base centralSecurity Scan, exact configured 100% owned-production statement/branch/function/line coverage, and zero valid unresolved findings. Pending, queued, skipped, absent, neutral, failed, cancelled, stale, predecessor, status-only, model-only, or rate-limited evidence is non-passing.No force update, self-approval, gate weakening, reviewer/secret invention, repair/self-modifying workflow, credential-core broadening, release, or deployment is introduced.
Related: #84. Supersedes #369.