This test scenario was identified by a cross-SDK conformance audit comparing every Sendspin client/server implementation. See the audit docs on branch claude/stream-sync-correction-sdks-AWoNC.
What it tests
Two servers connect to one client (one with
connection_reason: 'discovery', one 'playback'); the harness
asserts the client sends client/goodbye with the right reason
('another_server') on the right socket and ends up speaking to the
right server per the spec's decision table.
Why we need it
The spec's multi-server arbitration rules ("must complete handshake
first, prefer last-played server, send another_server on switch")
are unenforced. Only sendspin-cpp and sendspin-cli implement
them; six SDKs collapse to "whichever connection happened first" and
default to the wrong goodbye reason on switch.
Implementation sketch
- Harness spins up two
aiosendspin server adapters with different
connection_reason values and a stable server_id per server.
- Client adapter is configured with one server as "last played".
- Harness asserts on the goodbye message contents (socket + reason)
and on which server receives subsequent client/state updates.
Variants worth covering: (a) playback arrives while existing is
discovery, (b) both discovery and last-played matches one, (c)
both discovery and neither matches.
Source: docs/reconnection-and-multi-server.md §recommendations
This test scenario was identified by a cross-SDK conformance audit comparing every Sendspin client/server implementation. See the audit docs on branch
claude/stream-sync-correction-sdks-AWoNC.What it tests
Two servers connect to one client (one with
connection_reason: 'discovery', one'playback'); the harnessasserts the client sends
client/goodbyewith the right reason(
'another_server') on the right socket and ends up speaking to theright server per the spec's decision table.
Why we need it
The spec's multi-server arbitration rules ("must complete handshake
first, prefer last-played server, send
another_serveron switch")are unenforced. Only
sendspin-cppandsendspin-cliimplementthem; six SDKs collapse to "whichever connection happened first" and
default to the wrong goodbye reason on switch.
Implementation sketch
aiosendspinserver adapters with differentconnection_reasonvalues and a stableserver_idper server.and on which server receives subsequent
client/stateupdates.Variants worth covering: (a)
playbackarrives while existing isdiscovery, (b) bothdiscoveryand last-played matches one, (c)both
discoveryand neither matches.Source:
docs/reconnection-and-multi-server.md§recommendations