Skip to content

Conversation

@Michael-M-Judd
Copy link

Summary

This PR adds documentation for the RAYON_NUM_THREADS environment variable to help users running multiple Biome instances in parallel (e.g., in monorepos or agentic workflows) to limit CPU usage and prevent resource contention.

Changes

  • Added caution callout in big-projects.mdx about agentic workflows and parallel processes
  • Updated environment_variables.md with RAYON_NUM_THREADS documentation
  • Updated environment-variables.md with RAYON_NUM_THREADS documentation
  • Updated codegen/src/env_variables.rs to include the new variable in the code generation template

Motivation

When running multiple Biome processes in parallel (e.g., with multiple agents in CI/CD), each instance can use 60-80% CPU, causing resource contention. The --threads flag only works for the ci command, but RAYON_NUM_THREADS works across ALL Biome commands, making it more convenient for limiting resource usage globally.

Testing

  • Verified the documentation renders correctly
  • Confirmed the code generation template includes the new variable

@netlify
Copy link

netlify bot commented Feb 4, 2026

Deploy Preview for biomejs ready!

Name Link
🔨 Latest commit b35529a
🔍 Latest deploy log https://app.netlify.com/projects/biomejs/deploys/69835c54bafad30008703fe9
😎 Deploy Preview https://deploy-preview-3907--biomejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

Locale File Note
en src/content/docs/guides/big-projects.mdx Source changed, localizations will be marked as outdated.
en src/content/docs/reference/environment-variables.md Source changed, localizations will be marked as outdated.
en src/content/docs/reference/environment_variables.md Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 4, 2026

Walkthrough

This pull request adds documentation for the RAYON_NUM_THREADS environment variable across the documentation and code generation files. The changes include a new reference section describing the variable's purpose (controlling Biome's internal thread pool size via Rayon), its scope (applies to all Biome commands), and usage examples for both per-process and global configuration. Additionally, a caution block is added to the big-projects guide warning about potential high CPU usage when running multiple Biome processes in parallel. No functional code changes are introduced.

Possibly related PRs

Suggested labels

A-Documentation

Suggested reviewers

  • ematipico
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and specifically describes the main change: adding documentation for the RAYON_NUM_THREADS environment variable.
Description check ✅ Passed The description clearly relates to the changeset, providing context about the RAYON_NUM_THREADS environment variable documentation, motivation, and testing performed.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist.


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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/content/docs/reference/environment-variables.md (1)

1-6: ⚠️ Potential issue | 🟠 Major

Fix naming inconsistency between codegen output and documentation routing.

The codegen script writes to environment_variables.md (underscore), but astro.config.ts references environment-variables (hyphen). Both files currently exist with identical content and falsely claim auto-generation. Either update the codegen to write to the hyphen version, update the config to reference the underscore version, or remove the duplicate—but maintain only one source of truth to prevent drift.

@dyc3
Copy link
Contributor

dyc3 commented Feb 4, 2026

I think I would rather introduce this as an actual feature rather than document this env var, in case we want to move away from rayon in the future. Maybe that doesn't matter that much tho because we could always have it as an alias.

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.

2 participants