Repository navigation
fix(process): port IPC and buffered-stdio compatibility fixes - #37
Merged
Merged
Conversation
Integrates oven-sh#36405 for the custom OpenClaw runtime. Co-authored-by: robobun <[email protected]> (cherry picked from commit 73342fd)
(cherry picked from commit 64b2c25)
(cherry picked from commit 9a2d874)
(cherry picked from commit cece04c)
Join explicit FileSink flushes through the existing pending operation, including in-flight Windows writes. Route fs.WriteStream through Writable queue, cork, drain, and error handling while retaining the upstream final flush and current descriptor ownership. Preserve console.write promise byte counts and deferred flush errors. (cherry picked from commit 3ff0efc)
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.
Port the CI-line IPC channel reference, writable stdio assignment, failed-spawn exit-code, and buffered FileSink completion fixes after #28 landed. Preserve #28’s parent-end descriptor and stream._handle ownership and the upstream _final flush while completing per-write callbacks through Writable’s normal queue, cork, drain, and error lifecycle.
These repair OpenClaw’s spawn-broker channel ref/unref calls and subprocess adapters, and ensure pipe-write callbacks report completion or failure correctly. Upstream oven-sh#43879 covers final flushing only; its existing implementation is retained while porting the missing per-write completion behavior.
Original authors and cherry-pick provenance are retained as individual commits.
73342fd16fe4df87555764b2c253fcff296746309a2d874b652c5411aa0dcece04c5c8b64f9a316e3ff0efc822c2320899597e3ba2fdbcQualified together with the complete integrated stack on darwin-arm64 at
7e3ba2fdbcd4530ea39504f4a17257930056d9fausingbun scripts/build.ts --profile=release, linked to unchanged WebKitf20ce7744553c910bcf16a33faf976af208de091. The release binary’s revision was verified before tests.BUN_FEATURE_FLAG_INTERNAL_FOR_TESTING=1 BUN_GARBAGE_COLLECTOR_LEVEL=0 build/release/bun test <file> --max-concurrency 2test/js/bun/bun-object/write.spec.tstest/js/bun/console/console-write.test.tstest/js/bun/spawn/spawn.ipc.test.tstest/js/bun/util/filesink.test.tstest/js/node/child_process/child-process-stdio.test.jstest/js/node/child_process/child_process.test.tstest/js/node/fs/fs.test.tstest/js/node/stream/node-stream.test.jsIndependent Codex review found no actionable P0/P1 findings. Local JavaScript lint and Rust/C++/TypeScript formatting checks passed. Cross-target Rust checking passed all 12 targets with release codegen inputs (0 failed, 0 skipped). No workflow or WebKit-pin changes.
The first integrated run exposed asynchronous construction delaying the first child.stdin write until after unref. The wrapper now receives its already-open FileSink at construction, preserving the stdio keep-alive regression from #28. One existing FileSink promise-identity assertion failed once; 30 isolated repeats and 20 full-file repeats then passed on both published baseline 7862bb3 and candidate. The rebuilt eval suite hit one 1ms startup trap inside macOS pthread_jit_write_protect_np. The exact test passed 30 isolated repeats on both baseline and candidate; the full candidate file passed 10 serialized repeats. Overlapping reruns briefly collided on the suite’s shared fixture path and were discarded, then rerun serially. No code or assertions were changed for these incidents. The table above records the final rebuilt qualification.