Skip to content

chore(utils): trim runtime.ts to verified-live helpers#299

Merged
bbopen merged 1 commit into
mainfrom
chore/0.9-runtime-utils-trim
Jul 11, 2026
Merged

chore(utils): trim runtime.ts to verified-live helpers#299
bbopen merged 1 commit into
mainfrom
chore/0.9-runtime-utils-trim

Conversation

@bbopen

@bbopen bbopen commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Remove the test-only clearRuntimeCache export from src/utils/runtime.ts.
  • Preserve runtime detection caching while automatically invalidating its cache
    when the observable runtime globals change.
  • Update runtime-detection tests to exercise the public detection surface.

What broke and why it cannot now

clearRuntimeCache was a testing hook in production runtime utilities with no
production or generated-template caller. Cache invalidation is now tied to the runtime discriminants
that select Node, Deno, Bun, browser, or unknown, so tests and embedders do not
need a mutable reset API to observe a changed environment.

BREAKING CHANGE

clearRuntimeCache is no longer exported. It was documented as test-only and
had no production caller in src/; consumers should call detectRuntime()
directly.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 30 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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: ASSERTIVE

Plan: Pro

Run ID: a2c2fc0d-8610-46e8-9bbf-1d6e890039e1

📥 Commits

Reviewing files that changed from the base of the PR and between 344c9d7 and 737f0f7.

📒 Files selected for processing (4)
  • src/utils/runtime.ts
  • test/runtime_bun.test.ts
  • test/runtime_detection.test.ts
  • test/runtime_utils.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/0.9-runtime-utils-trim

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.

@bbopen bbopen force-pushed the chore/0.9-runtime-utils-trim branch from 8398bfc to 737f0f7 Compare July 11, 2026 21:12
@bbopen bbopen merged commit 360f2e7 into main Jul 11, 2026
23 checks passed
@bbopen bbopen deleted the chore/0.9-runtime-utils-trim branch July 11, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant