Repository navigation
berd-call: recover a Spokesperson session lost during an input reset - #412
Closed
johnmatthewtennant wants to merge 1 commit into
Closed
johnmatthewtennant wants to merge 1 commit into
johnmatthewtennant wants to merge 1 commit into
Conversation
When the Realtime session was lost or expired while an input reset was waiting on the provider's confirmation, the call ended with "Spokesperson runtime is closed" instead of starting a replacement session. The lost session takes its input buffer with it, so treat its outstanding clears as done once its terminal event arrives, answer the waiting input controls, and let recovery proceed. Signed-off-by: John Tennant <jtennant@block.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
🤖 Folded into #416 for review and merge. |
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.
Summary
If the Spokesperson's Realtime session was lost or expired while an input reset (muting, or clearing what you'd said) was waiting for OpenAI to confirm its clear, the call ended with
Spokesperson runtime is closed. A session lost at any other moment starts a replacement and the call carries on.The lost session takes its input buffer with it, so its outstanding clears no longer need confirming. When its session-lost or expiry event arrives, those clears count as done, the waiting mute or reset is answered, and recovery starts a replacement session as it does otherwise. Until then a clear whose session has ended just waits, so a runtime that fails outright still ends the call through its failure event.
Related issue
None.
Testing
New test: an input reset waiting on a session that is then lost stays pending without failing, and is answered once the session's end is handled. Before the change, the first check after the loss failed with
Spokesperson runtime is closed.Not exercised through the realtime host loop or a live call. The test covers the input-reset tracking that the session-lost and expiry handler now calls first.