Repository navigation
fix(process): reset Windows pipe stdio after completion - #82
Merged
Merged
Conversation
steipete
force-pushed
the
w94/windows-stdio-reuse
branch
from
October 3, 2026 00:14
ead040e to
5692c9e
Compare
Enable autoDestroy for Windows pipe stdout/stderr so finish reaches the existing stdio _destroy reset. Preserve POSIX shutdown and EPIPE behavior. Cover later scalar and corked writes after end and pipeline on both descriptors.
steipete
force-pushed
the
w94/windows-stdio-reuse
branch
from
October 3, 2026 00:47
5692c9e to
d26faa9
Compare
steipete
marked this pull request as ready for review
October 3, 2026 00:59
This was referenced Oct 3, 2026
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.
On Windows pipes,
process.stdout.end()or a completed pipeline left Bun's stream permanently ended. Node resets the stream and accepts later writes. The stdio_destroyoverride already performs that reset, but the Windows pipe branch did not enableautoDestroy, so successful completion never reached it.Enable the existing finish/destroy/reset path for Windows pipes. POSIX retains the same auto-destroy setting, native shutdown, and EPIPE guards from #76. A native Windows regression checks stdout and stderr after both
end()and pipeline completion, including writable-state flags, scalar writes, and corked vector writes.Upstream PR/issue searches for Windows stdout end, autoDestroy, and write-after-end found no matching fix. The upstream adaptation is oven-sh#44475.
Focused native Windows proof is complete; the full matrix and rebase CI are in progress. Fork PR CI has Linux and macOS lanes and no Windows lane. An unpublished Windows dry-run build and Node 24 comparison will be recorded before landing. W86 previously reproduced the late-write failure in stock Bun and the fork, with Node passing. The new fixture is directly runnable under Node or Bun on Windows.
Native Windows evidence (Windows Server 2022, Node 24.21.0): the fixture passes all four stdout/stderr × end/pipeline combinations under Node and patched head
ead040e29a, including later scalar and corked writes. The same fixture fails on W86's6a5d9c721fbaseline. The local POSIX stdio/environment suites pass 44 tests with three platform skips; 16 SHARE_ENV tests pass.Unpublished dry run 37077930429 passed cross-build, Windows smoke, and manifest; Publish was skipped. ZIP SHA-256:
7c119385b8cd45df334f37f79928144877d9e0588aee389d023b57ef365a3e4f; executable SHA-256:ec02e7fbc7a489ef749cf455cc6b07de95a2c3f27c2b914645bd9fd3fe0ae25e. Both matched locally and on Windows. The executable is unsigned and was not published. Linux/macOS CI passed on that exact head in 37077930396. The branch has since been rebased onto the concurrent filesystem fix; the runtime diff is unchanged.After rebasing onto the concurrent filesystem fix, Linux and macOS CI passed on exact head
5692c9e2a06b99cfb2330dfacc6e092bf74bce54: 37081195469. The refreshed branch P2 review is scoped-clean.Final landing head
d26faa938beec21092c03342304ea01b6bab3b02is rebased onto the merged environment fix (#81). Linux/macOS CI pass in 37083514701, and the refreshed branch P2 review is scoped-clean. The local integration of all three Windows fixes passes 48 applicable focused tests (four platform skips) and 24/24 OpenClaw lazy-alias tests. The first full Windows matrix has no regressions; final combined Windows qualification proceeds with #83.