Skip to content

feat(child_process): support static fork IPC - #386

Merged
ctate merged 2 commits into
mainfrom
feat/static-fork-ipc
Sep 23, 2026
Merged

ctate merged 2 commits into
mainfrom
feat/static-fork-ipc

Conversation

@ctate

@ctate ctate commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • discover statically resolvable child_process.fork() targets and embed their module graphs
  • re-execute the native binary with cross-platform JSON IPC for parent and child channel APIs
  • lower fork/IPC through both C and LLVM, with diagnostics, compatibility metadata, docs, and differential coverage

Testing

  • pnpm -r build
  • pnpm lint (zero errors)
  • NEXT_DIST_DIR=.next-check pnpm check in docs/
  • focused ABI, diagnostics, frontend baseline, C differential, and LLVM differential tests
  • pnpm test:sandbox --remote-only: every plain and sanitized corpus shard passed; one unrelated CLI source-output test received a sandbox context canceled stderr, and the exact test passed locally

@vercel

vercel Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
scriptc Ready Ready Preview, v0 Sep 23, 2026 4:19am UTC

Comment thread packages/runtime/src/scr_child.c Outdated
}
}

export function forkCallModulePath(program: ts.Program, call: ts.CallExpression): string | null {

@vercel vercel Bot Sep 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

require-bound fork calls (const cp = require("child_process"); cp.fork(...)) are not discovered as fork targets, so the module graph is never embedded and lowering rejects the static target with a misleading "runtime-valued module path" diagnostic.

Fix on Vercel

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 9c35d12. Static target discovery now recognizes namespace and JavaScript default imports using symbol provenance. The 2948 and 2949 differential fixtures cover both forms across C and LLVM.

@ctate
ctate force-pushed the feat/static-fork-ipc branch from 9c35d12 to 5688890 Compare September 23, 2026 04:19
@ctate
ctate merged commit 9ff5ed1 into main Sep 23, 2026
20 checks passed

This branch was successfully deployed

1 active deployment
Preview 5688890a Deployed Sep 23, 2026 by vercel[bot]
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