feat: add client-initiated stream/request-format renegotiation scenarios#75
Merged
Merged
Conversation
Adds two client-initiated scenarios that exercise stream/request-format end-to-end against the aiosendspin server: - client-initiated-request-format-pcm: renegotiate pcm 24-bit -> 16-bit - client-initiated-request-format-flac: renegotiate pcm -> flac A new format-renegotiation verification mode checks, from the client summary alone, that the server re-emitted stream/start (stream_start_count >= 2), the final format matches what the client requested, and it differs from the initial format. Verification is handshake-only: it confirms the server honored the request, not that post-switch audio was re-encoded. Capability is gated behind a supports_request_format flag (mirroring supports_opus); only the sendspin-rs client and aiosendspin server opt in, others fail-fast. The aiosendspin server adapter paces audio in real time for these scenarios so a mid-stream request has later chunks to flush the new stream/start; other scenarios are unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
teancom
force-pushed
the
feat/request-format-renegotiation-scenarios
branch
from
July 15, 2026 17:15
9ec9534 to
074016f
Compare
teancom
marked this pull request as ready for review
July 15, 2026 17:16
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.
This won't be usable until Sendspin/sendspin-rs#63 is merged and released, and then we'll need to update the PR with the new version number. Opening basically to show that the work is done (and to be reviewed). Will mark as Draft until it can actually be merged.
Adds two client-initiated scenarios that exercise stream/request-format end-to-end against the aiosendspin server:
A new format-renegotiation verification mode checks, from the client summary alone, that the server re-emitted stream/start (stream_start_count
Capability is gated behind a supports_request_format flag (mirroring supports_opus); only the sendspin-rs client and aiosendspin server opt in, others fail-fast. The aiosendspin server adapter paces audio in real time for these scenarios so a mid-stream request has later chunks to flush the new stream/start; other scenarios are unchanged.