fix(reliability): restack positive TTL and rate-limit normalization on 28af0b - #380
Merged
Merged
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughTTL 계산을 별도 함수로 분리했습니다. TTL과 rate limit 설정값의 유효성 검증을 강화했습니다. 관련 단위 테스트와 커버리지 검사 대상을 갱신했습니다. Changes설정값 정규화
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change safely normalizes positive TTL and rate-limit settings while preserving bounded fallback behavior; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
seonghobae
added a commit
that referenced
this pull request
Aug 15, 2026
seonghobae
added a commit
that referenced
this pull request
Aug 15, 2026
seonghobae
added a commit
that referenced
this pull request
Aug 15, 2026
seonghobae
added a commit
that referenced
this pull request
Aug 15, 2026
24 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Rebuild the unique reliability delta from #375 directly on protected
main28af0b1c2e76d066a5d41ef1da56157209c89431after #373 advanced protected truth. No predecessor checks, reviews, scanner results, or coverage evidence transfer.configuredTtlMs()andconfiguredRateLimit()must stay positive after integer normalization. Positive sub-unit configuration such as0.5previously passed the pre-floor positivity check and could normalize to zero, disabling cache effectiveness or causing the second client request to rate-limit immediately. This keeps the reviewed floor/cap behavior while falling back safely when normalization is non-positive.Test-first lineage
a68360c303f58dfe97f49c489cb2d911025c2727— RED: realistic TTL/rate-limit cases plus coverage-exclusion guard are installed before the source change.4f819f0feee3d8da9029bfea71da6be132df266d— GREEN current exact head: bounded positive TTL helper and fail-safe normalized rate limit.Fresh compare against protected main is exactly two commits ahead, zero behind, changing only
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
4f819f0feee3d8da9029bfea71da6be132df266dhas 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 #375 and #369.
Summary by CodeRabbit
개선 사항
테스트