Skip to content

fix: validate FuseWorker count - #841

Open
OskarEichler wants to merge 1 commit into
krisk:mainfrom
OskarEichler:codex/validate-worker-count
Open

OskarEichler wants to merge 1 commit into
krisk:mainfrom
OskarEichler:codex/validate-worker-count

Conversation

@OskarEichler

Copy link
Copy Markdown

Problem

FuseWorker accepts any numeric numWorkers. Zero silently falls back to the default, negative values initialize no shards, fractional values create an inconsistent shard count, and Infinity enters an unbounded worker-spawn loop when initialization starts.

Fix

  • Require an explicitly supplied numWorkers to be a finite positive integer.
  • Use nullish fallback after validation so only an omitted value selects the hardware-based default.
  • Add regressions for zero, negative, fractional, NaN, and infinite counts.
  • Rebuild the committed worker proxy distributions.

Verification

  • Focused worker suite: 23 tests passed.
  • Full suite: 22 files and 454 tests passed.
  • ESLint and TypeScript checks passed.
  • Worker distributions rebuilt successfully.
  • Changed files pass Prettier and git diff --check.

This branch has not been deployed

No deployments
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