Repository navigation
fix(server): survive a late child-pipe ECONNRESET (upstream #16555 on nightly 2761, board #15806) - #3
Open
MattRiddell wants to merge 1 commit into
Conversation
…erver Effect's child process sink listens for "error" only while it writes. Child pipes are sockets, so a child that exits with input still queued resets them after the writer finished or was interrupted, and the late EPIPE/ECONNRESET became an uncaught exception. HtmlRender hit it whenever a capture closed while Chrome still had CDP bytes on fd 3, taking every running agent down with it. Patch @effect/platform-node-shared to keep observing errors on child stdin and input fds for the life of the process, as it already does for output fds.
This branch has not been deployed
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.
Board pingdotgg#15806. Matt, q3348 (Telegram 2026-10-07T14:06:54Z): "q3348: 1" = make our T3 survive the socket error.
What: upstream pingdotgg#16555 (commit 2f236af, not merged upstream yet), cherry-picked onto the exact commit of the nightly the live server runs (
v0.0.46-nightly.20261007.2761= 10f39eb). Base branchlive/v0.0.46-nightly.20261007.2761is that commit.Why: t3-server crashed at 05:03 and 08:37 Panama on 2026-10-07 with
Error: read ECONNRESET(unhandled 'error' event; pingdotgg#16794).@effect/platform-node-shared@4.0.1listens for "error" on child stdin/input fds only while writing; a child that exits with unread input resets the pipe later and Node throws. The patch keeps a listener for the life of the process.Evidence:
apps/server/src/process/spawnerPipeErrors.test.ts: 2/2 pass with the patch; without it (lockfile + workspace reverted) Vitest reports 2 unhandled errors.bin/t3-patched-build(claude-config): the embedded JS bundle differs from the published 2761 executable by 29 lines, all inNodeChildProcessSpawner(the fix); version, channel and build-time values are identical. Staged at~/.local/lib/t3-20261007-2761-fix16794(sha256 03472139f1b869dd…), boot smoke GET / 200.Not a merge target: this branch is built, not merged. Drop it when an upstream nightly contains pingdotgg#16555.
🤖 Generated with Claude Code