Improve actor abort/timeout handling, add TTS request IDs and VAD error events#1
Open
abdufelsayed wants to merge 1 commit intomainfrom
Open
Improve actor abort/timeout handling, add TTS request IDs and VAD error events#1abdufelsayed wants to merge 1 commit intomainfrom
abdufelsayed wants to merge 1 commit intomainfrom
Conversation
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.
Motivation
Description
llmandttsactors by introducingisSettled,timeoutId, and afinishWithErrorhelper and by clearing timeouts on completion.requestIdon TTS actor input and on internal_tts:*events and wire thettsactor to attachrequestIdtochunk,complete, anderrorevents.activeTTSRequestIdto the machine context and implement guards/actions (matchesActiveTTSRequest,speakingCurrentTTS,hasPendingSentencesForCurrentTTS) to ensure only the active TTS request affects state transitions and audio streaming.vadandturn-detectoractors andsttactor return early ifabortSignalis already aborted to avoid starting providers after cancellation._vad:errorevent type and include VAD errors in the machine'srecordError/emitAgentErrorflows and metrics.ArrayBuffer(0)for empty payloads and ensure TTS spawn flows generatenanoid()request ids forsystemIdandactiveTTSRequestIdtracking.emitErroron the VAD fake provider.Testing
test/agent/error-recovery.test.tsandtest/agent/interruption.test.ts, which exercise VAD error propagation, LLM/TTS timeout deduplication, and ignoring stale filler audio; all tests passed._tts:*and_vad:errorvia the test suite; no type regressions were reported.agent:errorevents after a late provider error in the tests.Codex Task