Skip to content

Add a multi-server arbitration scenario #62

Description

@balloob

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions