fix: address 5 Detail scan bugs from March 11 (reconnect, mutex leak, playout, ordering, retryability) - #1188
Merged
Merged
Conversation
…eam and ProcPool - Introduced a per-connection AbortController in SpeechStream to prevent reconnect loops from inheriting an aborted signal. - Enhanced task cancellation and cleanup processes in SpeechStream. - Updated ProcPool to ensure proper pairing of lock tokens with warmed processes, improving resource release. - Adjusted handling of process initialization failures and ensured correct unlocking of resources in ProcPool. - Minor adjustments in ParticipantAudioOutput to maintain accurate duration tracking during audio playback.
🦋 Changeset detectedLatest commit: de2a152 The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 packages
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 |
tinalenguyen
approved these changes
Apr 1, 2026
Merged
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.
Bugs Fixed
1) STT reconnect stream could break permanently
agents/src/inference/stt.tsAbortControllerin the reconnect loop, while still propagating the parent abort signal.2) ProcPool
MultiMutexslots could leakagents/src/ipc/proc_pool.ts{ proc, unlock }and release the exact lock token associated with the dequeued process; also release queued lock tokens on close and on warmup failure.procUnlockwas overwritten in multi-idle scenarios, losing earlier unlock functions.3) Overlapping audio segments could hang playout flow
agents/src/voice/room_io/_output.tspushedDurationto zero.flush()calls no-op.4) LLM context grouping order could become nondeterministic
agents/src/llm/provider_format/utils.tsinsertionOrderfor the non-assistant branch as well.undefined - undefinedin sort and unstable ordering.agent_handoffhandling remains intentionally filtered from provider model input; comments were clarified.5) HTTP 408/429 were treated as non-retryable
agents/src/_exceptions.ts408and429as retryable while preserving explicit overrides.Tests Added
agents/src/_exceptions.test.tsagents/src/ipc/proc_pool.test.tsagents/src/llm/provider_format/utils.test.tsagents/src/voice/room_io/_output.test.tsValidation
All tests passed.