Skip to content

berd-call: answer input controls still clearing when a session ends - #413

Closed
johnmatthewtennant wants to merge 1 commit into
mainfrom
jtennant/berd-call-deferred-reply-shutdown
Closed

johnmatthewtennant wants to merge 1 commit into
mainfrom
jtennant/berd-call-deferred-reply-shutdown

Conversation

@johnmatthewtennant

Copy link
Copy Markdown
Contributor

Summary

In a realtime Berd Call, muting the microphone or resetting input is acknowledged only after the provider confirms it has cleared its input buffer. If the call ended while a clear was outstanding, the session exited without answering those controls, so a caller waiting on input_reset_applied or input_mute_applied never got a reply.

The session now waits for its outstanding clears and answers them in order before it shuts down or finishes after its input closes. The runtime already settles every clear within its acknowledgement timeout, so the wait is bounded. A clear that fails ends the session with that error, as it does mid-call.

Related issue

None.

Testing

  • New session test against a local Realtime server that confirms the clear 300 ms late: a reset and an unmute are sent, then the session is shut down before the confirmation arrives. Both get their answers, input_reset_applied then input_mute_applied, before the session exits. Before the change the session exited with neither.
  • When the host closes the session's input instead, the same wait runs. The test harness can't close that input while its audio host still holds it, so that path is not covered by a test.

A mute or input reset waits to be acknowledged until the provider has
cleared its input. When the host shut the session down, or closed its
input, while a clear was outstanding, the session exited without ever
answering those controls. Wait for the outstanding clears, which the
runtime settles within its acknowledgement timeout, and answer them
before the session ends.

Signed-off-by: John Tennant <jtennant@block.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@johnmatthewtennant

Copy link
Copy Markdown
Contributor Author

🤖 Folded into #416 for review and merge.

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.

1 participant