Skip to content

fix(reliability): restack positive TTL and rate-limit normalization - #375

Closed
seonghobae wants to merge 2 commits into
mainfrom
fix/cache-ttl-rate-limit-restack-2db716
Closed

fix(reliability): restack positive TTL and rate-limit normalization#375
seonghobae wants to merge 2 commits into
mainfrom
fix/cache-ttl-rate-limit-restack-2db716

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Purpose

Rebuild the unique reliability delta from #369 directly on current protected main 2db716d7252603689b2cc18b700bac25e872b28f after #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() and configuredRateLimit() must remain positive after integer normalization. Sub-unit positive configuration such as 0.5 previously 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.ts has 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 final src/cache-ttl.ts and src/index.ts blobs 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, and test/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 a1f813ea582d1a2f6539f28491c9545906157264 has fresh terminal-success application ci, reviewer-ci, eligible protected-base central Security 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.

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d33b1d9a-8e41-44c1-91d7-ea0449f4193c

📥 Commits

Reviewing files that changed from the base of the PR and between 2db716d and a1f813e.

📒 Files selected for processing (5)
  • src/cache-ttl.ts
  • src/index.ts
  • test/cache-ttl.test.ts
  • test/configured-rate-limit-coverage.test.ts
  • test/coverage-ignore-operational-helpers.test.ts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant