Skip to content

[codex] process: implement child IPC channel surface - #4207

Merged
proggeramlug merged 1 commit into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-process-child-ipc
Jun 3, 2026
Merged

proggeramlug merged 1 commit into
PerryTS:mainfrom
andrewtdiz:codex/node-compat-process-child-ipc

Conversation

@andrewtdiz

Copy link
Copy Markdown
Contributor

Summary

  • Adds a child-side process IPC runtime surface initialized from NODE_CHANNEL_FD.
  • Exposes live process.send, process.disconnect, process.connected, and process.channel.ref/unref through direct process reads and native module namespace objects.
  • Drains child IPC messages through the process EventEmitter pump and keeps the loop alive only after message/disconnect listeners or explicit channel.ref().
  • Adds parity coverage for no-IPC reads and forked child JSON message round-trips.

Closes #2529.

Notes

  • This implements newline-delimited JSON child IPC framing. Advanced serialization and handle passing are left out of this cut.
  • NODE_CHANNEL_FD and NODE_CHANNEL_SERIALIZATION_MODE are removed before process.env materialization to match Node bootstrap behavior.

Validation

  • cargo fmt --all -- --check
  • git diff --check
  • ./scripts/check_file_size.sh
  • cargo check -p perry-runtime -p perry-hir -p perry-codegen -p perry-api-manifest
  • ./run_parity_tests.sh --suite node-suite --module process --filter child-channel
  • ./run_parity_tests.sh --suite node-suite --module process --filter ipc
  • ./run_parity_tests.sh --suite node-suite --module child_process --filter fork-send-callback-closed (local Node cannot run this .ts fixture; skip-only threshold failure)
  • ./run_parity_tests.sh --suite node-suite --module child_process --filter fork-child-shape (local Node cannot run this .ts fixture; skip-only threshold failure)

@proggeramlug
proggeramlug force-pushed the codex/node-compat-process-child-ipc branch from f52946e to 0cfcd5d Compare June 3, 2026 06:17
@proggeramlug
proggeramlug marked this pull request as ready for review June 3, 2026 06:17
@proggeramlug
proggeramlug merged commit bb2037b into PerryTS:main Jun 3, 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:process: implement child-side IPC channel surface

2 participants