Skip to content

Fix worker_threads Worker stdio and diagnostics surface - #4053

Merged
proggeramlug merged 2 commits into
PerryTS:mainfrom
andrewtdiz:codex/worker-stdio-diagnostics
Jun 2, 2026
Merged

proggeramlug merged 2 commits into
PerryTS:mainfrom
andrewtdiz:codex/worker-stdio-diagnostics

Conversation

@andrewtdiz

@andrewtdiz andrewtdiz commented Jun 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Expose Worker option state for the covered Node-observable fields, including threadName, resourceLimits, stdio stream surfaces, env, and trackUnmanagedFds.
  • Add Worker diagnostics/profiling surface shape for getHeapStatistics(), cpuUsage(), performance.eventLoopUtilization(), getHeapSnapshot(), startCpuProfile(), and startHeapProfile().
  • Split Worker options/object surface helpers out of worker_threads.rs so the touched file stays under the CI file-size limit.
  • Regenerate API docs for the new Worker diagnostic manifest entries and stabilize the BroadcastChannel parity fixture so it no longer races Node delivery against a zero-delay timer.

Fixes #3330
Fixes #3329

Verification

  • ./scripts/check_file_size.sh -> OK: no Rust source files exceed 2000 lines.
  • cargo fmt --all -- --check -> pass
  • CARGO_BUILD_JOBS=1 ./run_parity_tests.sh --suite node-suite --module worker_threads --filter broadcast-delivery -> pass, 1 parity pass / 0 fail
  • CARGO_BUILD_JOBS=1 ./run_parity_tests.sh --suite node-suite --module worker_threads --filter options-diagnostics -> pass, 1 parity pass / 0 fail
  • CARGO_BUILD_JOBS=1 ./run_parity_tests.sh --suite node-suite --module worker_threads -> pass, 9 parity pass / 0 fail / 0 compile fail
  • CARGO_BUILD_JOBS=1 cargo test -p perry-api-manifest -> pass, 31 tests
  • CARGO_BUILD_JOBS=1 cargo test -p perry-codegen --test manifest_consistency -> pass, 5 tests
  • CARGO_BUILD_JOBS=1 cargo test -p perry --bin perry hosted_builtin_default_import_collects_querystring_source -- --exact -> pass; 0 matched tests, 426 filtered, no stack overflow on this scoped branch

CI Reconciliation

  • Local/fork PR head updated from old red 1e2ec4289eb3b785259366342ca740cff66603 to c4ad3f6bb219cd94490be0b4a3cbc7d048aa824c.
  • gh pr view 4053 --repo PerryTS/perry --json headRefOid,statusCheckRollup shows the new head and fresh check runs started at 2026-06-02T06:23:14Z.

@andrewtdiz
andrewtdiz force-pushed the codex/worker-stdio-diagnostics branch from 1e2ec42 to c4ad3f6 Compare June 2, 2026 06:23
# Conflicts:
#	docs/src/api/reference.md
@proggeramlug
proggeramlug merged commit a99f45a into PerryTS:main Jun 2, 2026
11 checks passed
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.

node:worker_threads: expose Worker stdio streams and option state node:worker_threads: expose Worker diagnostics and profiling APIs

2 participants