feat(child-process): support writable stdin for spawned processes - #314
Open
euxaristia wants to merge 2 commits into
Open
euxaristia wants to merge 2 commits into
euxaristia wants to merge 2 commits into
Conversation
Enable persistent duplex transports such as MCP stdio with piped child stdin, queued string and byte writes, backpressure, end, destroy, and error, finish, and drain listeners. Add frontend, IR, C, LLVM, and Windows/POSIX runtime support with five differential regression cases. Make diagnostic fixtures portable across Windows and Linux through LF attributes and path normalization, and regenerate compatibility evidence. Validate against Node 24.15.0: stdin cases pass on Windows through the C backend and on Ubuntu through LLVM, including sanitizers. Windows LLVM object generation and all 120 diagnostic snapshots pass. Full Linux validation records 3992 passing plain tests and 3979 passing sanitized tests; all 4 plain and 17 sanitizer failures reproduce on the unchanged baseline. Windows LLVM executable linking retains the existing _fltused failure, also reproduced with an existing non-stdin test. Refs vercel-labs#311
Contributor
|
@euxaristia is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
Input streams do not register data listeners, so incrementing scr_child_streams_watching pinned scr_children_wait into perpetual decline and prevented event loop sleep. Revert scr_child_stream_watching and spawn creation to exclude input streams from the watching counter, inspect unwritten buffer, ending, and error states directly in pending checks, and add regression corpus test 2865. Refs vercel-labs#314
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enable persistent duplex communication with spawned processes, including MCP stdio servers. Explicit piped stdin currently fails compilation; this adds a writable
child.stdinalongside the existing piped stdout and stderr.Changes
child.stdin, string and byte writes,end(),destroy(),writable, anderror/finish/drainlisteners.Validation
Validated commit
c8b37bbagainst the repository-pinned Node 24.15.0:The full suites are not entirely green. Windows LLVM executable linking still fails with the existing unresolved
_fltusedsymbol, also reproduced with a pre-existing non-stdin program. Windows sanitizer execution is not validated. The passing Windows execution results use the C backend; they do not establish LLVM executable or sanitizer parity.Refs #311.