Skip to content

fix(server): survive a late child-pipe ECONNRESET (upstream #16555 on nightly 2761, board #15806) - #3

Open
MattRiddell wants to merge 1 commit into
live/v0.0.46-nightly.20261007.2761from
fix/16794-late-pipe-errors
Open

MattRiddell wants to merge 1 commit into
live/v0.0.46-nightly.20261007.2761from
fix/16794-late-pipe-errors

Conversation

@MattRiddell

Copy link
Copy Markdown
Owner

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 branch live/v0.0.46-nightly.20261007.2761 is 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.1 listens 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.
  • Built with bin/t3-patched-build (claude-config): the embedded JS bundle differs from the published 2761 executable by 29 lines, all in NodeChildProcessSpawner (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

…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.
@github-actions github-actions Bot added size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Oct 7, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants