Skip to content

Conversation

@toubatbrian
Copy link
Contributor

Add error handler to suppress EPIPE race condition in supervised_proc.test.ts

@changeset-bot
Copy link

changeset-bot bot commented Jan 5, 2026

🦋 Changeset detected

Latest commit: 4fab404

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@livekit/agents Patch
@livekit/agents-plugin-anam Patch
@livekit/agents-plugin-baseten Patch
@livekit/agents-plugin-bey Patch
@livekit/agents-plugin-cartesia Patch
@livekit/agents-plugin-deepgram Patch
@livekit/agents-plugin-elevenlabs Patch
@livekit/agents-plugin-google Patch
@livekit/agents-plugin-inworld Patch
@livekit/agents-plugin-livekit Patch
@livekit/agents-plugin-neuphonic Patch
@livekit/agents-plugin-openai Patch
@livekit/agents-plugin-resemble Patch
@livekit/agents-plugin-rime Patch
@livekit/agents-plugin-silero Patch
@livekit/agents-plugins-test Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@toubatbrian toubatbrian requested a review from theomonnom January 5, 2026 08:43
Comment on lines +101 to +103
child.on('error', (err: NodeJS.ErrnoException) => {
if (err.code !== 'EPIPE') throw err;
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the root case? Just curious.

Isn't it a real issue if we're writing to a closed stream?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is due to race condition. child.connected can still be true briefly after kill() while the pipe is already closed. The 20ms interval fires in that window results in EPIPE.

This is a test artifact, not a real app issue.

@toubatbrian toubatbrian merged commit 3b8fcd7 into main Jan 6, 2026
8 checks passed
@toubatbrian toubatbrian deleted the brian/stablize-tests branch January 6, 2026 07:15
@github-actions github-actions bot mentioned this pull request Jan 6, 2026
Sign up for free to 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.

4 participants