Skip to content

fix(stream): a child's pipe must not kill the run that owns it - #42

Merged
drewstone merged 1 commit into
mainfrom
fix/child-stream-errors
Aug 28, 2026
Merged

fix(stream): a child's pipe must not kill the run that owns it#42
drewstone merged 1 commit into
mainfrom
fix/child-stream-errors

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

A killed child's stdout and stderr can emit error after the fact, and a stream with no error listener throws to the top of the process.

Measured: a 42-cell study died at cell 3 on an unhandled EPIPE, after two cells had already cost twenty minutes each. stdin was handled and reports "the policy stopped reading its input"; the other two pipes had resume() and a data listener and no error listener at all.

The child's fate already reaches an operator through health(), so these listeners record into the same bounded buffer that explains a dead agent, and do not rethrow. Both launchers get the same treatment, because a launcher's job is to outlive its agent long enough to publish the meter.

Local: 20 of 20 test files, boundary check, 0 typecheck errors.

A killed child's stdout and stderr can emit `error` after the fact, and a
stream with no error listener throws to the top of the process.
Measured: a 42-cell study died at cell 3 on an unhandled EPIPE, after two cells
had already cost twenty minutes each. `stdin` was handled and reported the
policy that stopped reading; the other two pipes had `resume()` and a data
listener and no error listener at all.
The child's fate already reaches an operator through `health()`, so these
listeners record into the same bounded buffer that explains a dead agent and do
not rethrow. Both launchers get the same treatment, because a launcher's job is
to outlive its agent long enough to publish the meter.
@drewstone
drewstone merged commit 33cd213 into mainAug 28, 2026
6 checks passed
@drewstone
drewstone deleted the fix/child-stream-errors branch August 28, 2026 18:07
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@drewstone