Skip to content

feat(ts): add runtime config ramp controls#135

Closed
lan17 wants to merge 1 commit into
lev/ts-m2-redis-ttlfrom
lev/ts-m3-config-ramp
Closed

feat(ts): add runtime config ramp controls#135
lan17 wants to merge 1 commit into
lev/ts-m2-redis-ttlfrom
lev/ts-m3-config-ramp

Conversation

@lan17

@lan17 lan17 commented May 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add runtime config resolution for per-layer TTL and ramp controls
  • fall back from provider null to cached-function defaultConfig
  • disable only the relevant layer for missing/invalid TTL or ramp config, then continue through the remaining cache chain
  • add injectable percentage sampling so ramp behavior is deterministic in tests
  • document Milestone 3 scope and add Given/When/Then behavioral tests

Validation

  • pnpm install --frozen-lockfile
  • pnpm ts:gcache:typecheck
  • pnpm ts:gcache:test — 34 tests, coverage: 96.53% statements / 95.1% branches / 96.82% functions / 96.88% lines
  • pnpm ts:gcache:build

Stack

Stacked on #134 / lev/ts-m2-redis-ttl. This PR intentionally leaves Prometheus metrics, targeted invalidation/watermarks, and framework integrations for later milestone PRs.

@codecov

codecov Bot commented May 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.47%. Comparing base (1f32c9c) to head (41a08a5).

Additional details and impacted files
@@                 Coverage Diff                  @@
##           lev/ts-m2-redis-ttl     #135   +/-   ##
====================================================
  Coverage                97.47%   97.47%           
====================================================
  Files                       13       13           
  Lines                      673      673           
====================================================
  Hits                       656      656           
  Misses                      17       17           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lan17

lan17 commented May 12, 2026

Copy link
Copy Markdown
Collaborator Author

Closing this stacked milestone PR in favor of the consolidated peak PR #137.

@lan17 lan17 closed this May 12, 2026
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