This repository is a conformance harness for multiple Sendspin implementations. It does four things:
- builds adapter CLIs for each implementation/toolchain
- runs a scenario matrix across
server -> clientimplementation pairs - records per-case artifacts and summaries
- generates a static HTML report for GitHub Pages
Treat this repository as infrastructure around the implementations, not as the implementations themselves.
Start with these files before making changes:
README.md: quick start for validating a client app and running the harness locallysrc/conformance/scenarios.py: canonical list and order of scenariossrc/conformance/implementations.py: implementation registry and role capability metadatasrc/conformance/runner.py: matrix execution and artifact layoutsrc/conformance/site.py: static report generationadapters/README.md: stable adapter CLI contract
These are the easiest things to break accidentally.
Every implementation is modeled as exactly two CLIs:
serverclient
An implementation whose role is not supported at all gets no cases in that role: the runner skips it before case creation and the report draws no row (server) or column (client) for it, so a server-only or client-only implementation adds no dead cells to the matrix. Both the runner and the site take the client list from implementations_with_role() and the server list from implementations_for_scenario().
The filters differ per side. Server rows are also dropped per scenario, wherever RoleSpec.unsupported_reason() returns a reason. Client columns are not: a client that implements the role but cannot run one scenario still gets a case, which fails fast through the placeholder adapter and reads as "Unsupported" in that column.
When the harness judges a case unsupported — the role is not supported, or
RoleSpec.unsupported_reason() returns a reason for the scenario — it stamps
unsupported: true on the result row. The report labels and counts a failed cell
as unsupported from that field alone, never from the wording of a reason, so an
adapter cannot relabel its own failure. status stays failed. A row published
before the field existed carries none and reads as a plain failure.
Adapters do not need to rely on the implementation library owning discovery itself. External mDNS advertisement/browsing or the harness registry handoff are acceptable, as long as the adapter can still attach the implementation to an outbound WebSocket or an accepted inbound WebSocket and report the resulting interaction honestly.
Scenarios are data-driven for matrix construction, ordering, and report rendering.
Adapter behavior is intentionally explicit per scenario, so hard-coded
scenario_id branching in adapters is acceptable and expected.
Important current scenario traits:
initiator_rolepreferred_codec
Adapters should hardcode supported scenario IDs and scenario-specific behavior.
Use generic traits (initiator_role, preferred_codec, etc.) as helpful inputs,
but do not treat them as a replacement for explicit per-scenario handling.
Scenario order is explicit and matters:
- run order
- site index order
- user perception of report health
Today the PCM scenarios are intentionally listed first because they are greener. Preserve that unless there is a strong reason to change it.
The report output layout is fixed:
results/data/results/index.htmlresults/implementations/*.html(one per implementation, for linkable filtered overviews)results/scenarios/*.htmlresults/cases/*.html
Per-case artifacts live under results/data/<environment>__<scenario>__<server>__to__<client>/.
Cross-run metadata such as build logs and repository revisions also live under
results/data/, notably:
results/data/build-report.jsonresults/data/repositories.jsonresults/data/declared-formats.json
declared-formats.json is derived by the report step from the per-case summaries,
so a merged multi-host run regenerates it rather than merging it. It carries a
schema_version; downstream consumers should check it.
repositories.json leads with a spec entry recording the revision of the
Sendspin spec the run was audited against, followed by one entry per
implementation the run covered. Every entry carries revision_label, a
git describe label that is a tag when the checkout sits on one. A merged
multi-host run keeps one entry per host, so spec is not unique there.
Do not reintroduce SPA-style routing or inline all case details onto scenario pages.
The site is static HTML, not a SPA. The index page shows all scenario matrices. Each scenario gets its own HTML page, and each concrete server/client pairing gets its own dedicated HTML page. Use only minimal vanilla JS; today that is limited to the case-page tabs in src/conformance/site.py.
Keep server/client roles explicit everywhere in the report. Do not regress back to ambiguous from/to terminology.
The generated site also shows:
- the audio formats each client declared in
client/hello, marked exercised or not verified, on that client's implementation page - per-case status and reason with explicit server/client labeling
- summary, server, client, and build tabs on each dedicated case page when build data exists
- linked case artifacts for drill-down:
result.json, client/server summaries, and logs
The overview page also shows repository revision metadata gathered at run time.
If you change how repositories are resolved, merged, or reported, update both
src/conformance/repository_versions.py and the overview rendering in
src/conformance/site.py.
unverifiable is a final case status, never a reason to skip execution. Run both
adapters and check the available evidence. Use it only when an SDK cannot expose
decoded PCM, raw client audio frames or baseline protocol evidence, or when
resampling prevents comparison against the source PCM hash. Adapters report
status: "ok" and explicit null for unavailable evidence. Missing fields and
malformed evidence remain harness failures. Connection errors, nonzero exits and
observed protocol violations still fail. The site counts unverifiable cases
separately; regression detection treats them as not passed.
Successful adapters should print a JSON summary and exit 0.
Important fields to preserve where available:
statusimplementationrolescenario_idinitiator_rolepreferred_codecpeer_helloactivation(server summaries)availability_trace(server summaries)time_exchange(server summaries)group_updates(server summaries)- audio hash fields
peer_hello should contain the full hello message received from the other party whenever capture is possible.
activation should contain the first server/activate the server sent, as it went on the wire and in the same {type, payload} shape as peer_hello. It is null only when the server sent none, and is never reconstructed from adapter arguments or SDK state.
null fails the case: activation_violation in src/conformance/protocol.py judges this field on every case, whatever the scenario.
group_updates should contain every group/update the server sent after that first server/activate, in order, each as it went on the wire and in the same {type, payload} shape. It is an empty list only when none followed, and is never reconstructed from adapter arguments or SDK state.
group_update_violation in src/conformance/protocol.py judges this field on every case too. An empty list fails the case, and so does any recorded group/update whose playback_state is not playing or stopped, or whose group_id or group_name is missing or not a string. The group ID must also contain exactly 43 base64url characters. Unlike activation, a summary without the field also fails the case, as a harness gap. The difference is deliberate, so do not align the two. Every server adapter in the tree records group_updates, so a summary without it comes from a broken adapter, never from an implementation that predates the field, and failing closed keeps an adapter that cannot observe the messages from reading as a server that sent them. How soon the first message followed is not judged, because the spec says "promptly" and gives no bound, so one sent at any point in the case satisfies it.
Every recorded group/update is judged for its fields. The same spec sentence also requires one "whenever any field listed below changes", and nothing in the matrix asserts that a change produced one.
availability_trace should contain each client/state the server received and each stream/start it sent, in the order the adapter observed them, as adapters/README.md specifies. It is null only when the adapter cannot observe that ordering, and is never reconstructed from what the implementation is expected to do.
null or a missing field fails the case as a harness gap: stream_start_gate_violation in src/conformance/protocol.py judges this field on every scenario that opens a player or artwork stream.
time_exchange should contain each client/time the server received and each server/time it sent, in the order the adapter observed them, each as it went on the wire and in the same {type, payload} shape, with an other-sent entry where the server began sending any other text message, as adapters/README.md specifies. It is an empty list when the client sent no client/time, null only when the adapter cannot observe the messages, and is never reconstructed from adapter arguments or SDK state.
time_exchange_violation in src/conformance/protocol.py judges this field on every case. null or a missing field fails the case as a harness gap, and an empty list gives it nothing to judge. It does not judge the timestamp values, how late server_transmitted was stamped, or whether the client's time filter converged, and adapters/README.md gives the reason for each.
The shared source fixture is almost_silent.flac from sendspin-cli:
- resolved by
src/conformance/fixtures.py - expected at
sendspin-cli/tests/fixtures/almost_silent.flac
Do not hard-code another fixture path in adapters or tests.
GitHub Actions should still publish artifacts and GitHub Pages even when the conformance matrix has failing cases. Harness failures are currently expected. Do not add a workflow step that turns expected red matrix cases into a failed workflow.
Build/setup failures are different: those can still be real workflow failures.
Two workflows run on pull requests and pushes to main:
publish.ymlbuilds every implementation, runs the full matrix on macOS and publishes Pages. Only changes that can alter the matrix or the site start it:src/conformance/**,adapters/**,scripts/**,pyproject.toml,uv.lockand the workflow itself. The client validator (src/conformance/validator/**), its vendored aiosendspin (src/conformance/_vendor/**),scripts/vendor_aiosendspin.py,scripts/install-sendspin-validate.shandscripts/sendspin-validate-constraints.txtare excluded, because the matrix never runs them. Changes totests/, docs or other workflows do not start it either. The nightly schedule and manual dispatch always run it.ci.ymlrunsscripts/vendor_aiosendspin.py --checkandtests/on Linux wheneversrc/,tests/,scripts/,patches/,pyproject.toml,uv.lockor the workflow itself changes. Checks that need no implementation clones or macOS toolchains belong here.
A new path the matrix depends on must be added to publish.yml's path filters, or changes to it will merge without a matrix run.
The published workflow currently runs on macos-latest and publishes one matrix without host-specific sections in the UI. Internal environment metadata may still exist in raw artifacts for build-log lookup or local merged runs, but the public report should read as one authoritative matrix.
After building the report, CI compares local results against the live published baseline at https://sendspin.github.io/conformance/data/index.json. A regression is any case that was passed in the baseline but is no longer passed locally.
- Pull requests: the workflow fails if regressions are detected.
- Pushes to main / scheduled / manual: regressions are logged and a Discord notification text is uploaded as an artifact (
discord-regression-notice), but the workflow does not fail so that Pages still publishes.
If the baseline is unreachable (first publish, network error), the check is skipped silently.
Changing what a scenario does — tightening its assertions, or altering the
stimulus it drives the pair with — turns its cells red by design, which is not a
regression. Each ScenarioSpec carries a scenario_revision, stamped onto every
result row, and a cell is exempt from comparison when its baseline row carries a
different revision. Exempt cells are always printed, with their reason.
A baseline published before the field existed carries no revision on any row, so every cell is exempt for that one release. That exemption retires itself: once any baseline row carries a revision, a row missing one is read as a broken contract rather than an old publish, and the cell keeps its protection. A local result row missing a revision fails the check outright — it is written by the harness in the same checkout, so its absence is a bug, not a migration. The blanket is re-armable: replacing the published baseline with one built from a checkout that predates the field exempts every cell again for that release. It announces itself — the whole matrix prints the migration reason — and closing it costs more than the risk.
Bumping scenario_revision on the one scenario that changed is the deliberate
act that resets its baseline; every other scenario in the same run
keeps full protection. A verdict applied to every case, such as
activation_violation, group_update_violation or
time_exchange_violation, changes the assertions of every scenario and so
bumps them all, which exempts the whole matrix for that one release. A
verdict applied to some scenarios, such as
stream_start_gate_violation, bumps only those. Do not add a
waiver file, allowlist or PR-label escape hatch — the baseline is live and
remote, so any such list goes stale on the next merge.
src/conformance/scenarios.py is the source of truth for the scenario list and order (listed below in that order), and src/conformance/implementations.py for coverage. Keep this section in step with them when either changes.
client-initiated-pcm(Client initiates connection and client wants PCM): start the server first, let the client discover/connect to it, advertise PCM as the only supported audio format, and compare canonical PCM hashesserver-initiated-pcm(Server initiates connection and client wants PCM): start the server first, let the client advertise a listener and PCM as its only supported audio format, let the server connect in, and compare canonical PCM hashesserver-initiated-protocol-baseline-v1(Server initiates a protocol baseline session): validates a spec-revision-pinned protocol trace for handshake order, activation, initial state, stream negotiation, and player chunk framing; it does not assess decoded or rendered audioserver-initiated-flac(Server initiates connection and client wants FLAC): start the server first with PCM audio decoded fromalmost_silent.flac, let the client advertise a listener and FLAC as its only supported audio format, let the server connect in, encode the PCM to FLAC using the SDK, stream it to the client, and compare the transported FLAC bytes; where the client reports the audio it decoded and the stream kept the source's sample rate and channel count, also compare its canonical PCM hash against the source clip, so an intact but incomplete stream failsserver-initiated-opus(Server initiates connection and client prefers OPUS): start the server first with PCM audio decoded fromalmost_silent.flac, let the client advertise a listener and list OPUS first in its supported audio formats, followed by the PCM or FLAC entry every player must list, let the server connect in, and verify that it honoured that priority by encoding the PCM to OPUS using the SDK and streaming it to the client; compare the declared list, the negotiated format and the transported OPUS bytes. OPUS is lossy, so decoded audio is not compared against the source clipserver-initiated-metadata(Server initiates connection and client wants Metadata): start the server first, let the client advertise a listener, let the server connect in, receive a metadata snapshot, and compare normalized metadata fieldsserver-initiated-controller(Server initiates connection and client wants Controller): start the server first, let the client advertise a listener, let the server connect in, observe controller state, send a control command, and verify the server recorded itserver-initiated-artwork(Server initiates connection and client wants Artwork): start the server first, let the client advertise a listener, let the server connect in, receive album artwork bytes, and compare the encoded image hashserver-initiated-pcm-24bit(Server initiates connection and client wants 24-bit PCM): start the server first, let the client advertise a listener and 24-bit PCM as its only supported audio format, let the server connect in, negotiate the 24-bit packed wire format, stream it to the client, compare canonical PCM hashes, and verify that the negotiated stream was 24-bit — a client SDK with no 24-bit decode path misreads the bytes and produces a hash mismatch, and a pair that streamed another depth has not tested the 24-bit pathclient-initiated-state-format-pcm(Client changes its preferred PCM bit depth viaclient/state): start the server first, let the client connect advertising two PCM formats (24-bit then 16-bit), let the server stream the higher-priority 24-bit format, have the client send aclient/statewhose playerformatprefers the 16-bit entry, and verify the server received that preference inclient/stateand the client observed a newstream/startin the 16-bit formatclient-initiated-state-format-flac(Client changes its preferred format from PCM to FLAC viaclient/state): start the server first, let the client connect advertising PCM then FLAC, let the server stream the higher-priority PCM format, have the client send aclient/statewhose playerformatprefers the FLAC entry, and verify the server received that preference inclient/stateand the client observed a newstream/startin the FLAC formatclient-initiated-metadata(Client initiates connection and client wants Metadata): start the server first, let the client discover/connect to it, receive a metadata snapshot, and compare normalized metadata fieldsclient-initiated-controller(Client initiates connection and client wants Controller): start the server first, let the client discover/connect to it, observe controller state, send a control command, and verify the server recorded itclient-initiated-artwork(Client initiates connection and client wants Artwork): start the server first, let the client discover/connect to it, receive album artwork bytes, and compare the encoded image hashserver-initiated-legacy-unencrypted(Server initiates connection over the legacy unencrypted transition mode): start the server first, then the client; the server uses aiosendspin'sallow_unencryptedmode to test clients that do not yet support the required Noise handshake. This mode is outside the spec and sends traffic without encryption, and the scenario can be removed once every tracked implementation supports the Noise handshakeserver-initiated-audio-chunk-framing(Server initiates connection and frames PCM audio chunks): start the server first, let the client advertise a listener and PCM as its only supported audio format, let the server connect in and stream, and have both adapters record each audio frame as it crossed the transport; verify that every frame is message type 4 behind the 13-byte header (type, int64 timestamp, uint32send_ahead), that the client read the same 13 bytes off each one, and that no chunk lasted longer than 150 ms or, the final chunk aside, less than 15 ms. The audio itself is not compared, andsend_aheadsaturation is not judged because no adapter can observe when a frame was transmitted
aiosendspin: real server adapter, including OPUS encoding, and real client adapter; the client SDK decodes PCM and FLAC only, so it does not advertise OPUSsendspin-dotnet: real client adapter for client-initiated PCM plus the server-initiated PCM, metadata, artwork, controller, FLAC, and OPUS scenarios; server placeholderSendspinKit: real Swift client adapter for client-initiated PCM, Flac, and Opus plus the server-initiated PCM, Flac, Opus, metadata, artwork, and controller scenarios; server placeholdersendspin-cpp: real C++ client adapter for client-initiated PCM plus the server-initiated PCM, 24-bit PCM, metadata, artwork, controller, FLAC, OPUS, legacy-unencrypted, protocol-baseline and audio-chunk-framing scenarios, evidenced from the library's message trace; it joins theclient-initiated-state-format-*scenarios as a player but fails them, since the library exposes no way to set theclient/stateplayerformat; server placeholdersendspin-go: not currently tested. Both roles are placeholders: the server library has no RC1client/initor Noise handshake, and the Go client adapter source inadapters/sendspin-go/is kept but no longer built or runsendspin-js: real Node.js client adapter driving the publicSendspinCoreSDK over an adapter-owned WebSocket; covers client-initiated PCM plus the server-initiated PCM, OPUS, metadata, and controller scenarios (FLAC decode andartwork@v1are not exposed by the public SDK in a headless Node environment); server placeholder. The SDK decodes OPUS through the browser's WebCodecsAudioDecoder, which Node lacks, so for the OPUS scenario the adapter provides that API fromadapters/sendspin-js/webcodecs-opus.mjs, backed by theopus-decoderpackage, and hashes the encoded chunks the SDK submits to itsendspin-rs: real Rust client adapter for client-initiated PCM plus the server-initiated PCM, metadata, artwork, controller, and FLAC scenarios; server placeholdersendspin-server-cpp: real C++ server adapter for the client- and server-initiated PCM, 24-bit PCM, protocol-baseline, audio-chunk-framing, metadata, artwork and controller scenarios, the server-initiated FLAC and OPUS scenarios (both encoded by the library) and bothclient-initiated-state-format-*scenarios, built on the library's public API and evidenced from its message trace; the library has no unencrypted mode, so it takes no part inserver-initiated-legacy-unencrypted; client placeholder (its client counterpart issendspin-cpp)
The OPUS scenario is currently exercised only by the SendspinKit, sendspin-cpp, sendspin-dotnet and sendspin-js clients against the aiosendspin and sendspin-server-cpp servers until other implementations opt in via supports_opus.
The client-initiated-state-format-* scenarios have no capability flag of their own: RC1 gives every player the client/state format preference, so a client that never sends one shows as a failed case. The FLAC variant still needs a client that can list FLAC (supports_flac). The aiosendspin and SendspinKit client adapters drive them today.
The client-initiated-metadata, client-initiated-artwork and client-initiated-controller scenarios have no capability flag of their own either: RC1 requires every server to support client-initiated connections, whichever roles the client brings. The aiosendspin, sendspin-dotnet, SendspinKit and sendspin-cpp client adapters drive all three over the outbound path they use for client-initiated-pcm. The sendspin-js client adapter drives the metadata and controller scenarios the same way; it declares no artwork role family, so the harness marks its client-initiated-artwork cases unsupported before launching anything. The sendspin-rs client adapter has an outbound path for player sessions only, so its cases fail as a harness gap rather than being left out.
The server-initiated-audio-chunk-framing scenario has no capability flag of its own either. A client adapter that receives parsed chunks and cannot observe raw frames still runs. Its case is unverifiable unless the available evidence shows a failure. Only the aiosendspin adapters, the sendspin-server-cpp server and the sendspin-rs and sendspin-cpp clients observe raw frames today.
Which rows and columns appear follows the rule under "Adapter model" above.
The JavaScript adapter builds the selected sendspin-js checkout with its Yarn lockfile and imports that same checkout. CI clones the latest default branch on each run. Update existing local checkouts before running the matrix; their exact revisions appear in the report.
The matrix is moving from media-oriented interoperability checks to normative protocol
conformance. server-initiated-protocol-baseline-v1 is the first authoritative
protocol test and is pinned to Sendspin spec revision
8c9577ea8719ad082d051ec13cc73ef15ed68948. That pin scopes this scenario's assertions
only. It is not the revision the matrix is audited against: the verdicts applied to every
case are judged against the spec checkout each run records in repositories.json and
shows on the report overview. An adapter that cannot expose ordered protocol evidence reports it as unavailable.
The case still runs and checks the other peer's evidence. The contract is described in
adapters/README.md. The current PCM, FLAC, OPUS, artwork,
metadata, and controller scenarios remain diagnostic interoperability checks during
this migration: a matching hash or normalized snapshot is evidence that two adapters
interoperated, not proof that either followed the specification.
sendspin-validate checks a Sendspin client app on its own, without an adapter. It
is a strict Sendspin server, built on a bundled copy of aiosendspin, that your app
connects to. It records every frame, checks what the client sends against spec
1.0.0-rc1, and writes a report. Install it on Linux or macOS with:
curl -LsSf https://raw.githubusercontent.com/Sendspin/conformance/main/scripts/install-sendspin-validate.sh | shthen run sendspin-validate. The installer needs nothing but curl (or wget): it
installs uv when it is missing, and uv fetches Python. It
downloads the source as a GitHub tarball, so the machine needs neither git nor the
Xcode command line tools. uvx and uv tool install ignore uv.lock, so the
installer pins dependencies with scripts/sendspin-validate-constraints.txt, which
records the versions uv.lock holds. Run the installer again to update, or set
SENDSPIN_VALIDATE_REF to install a branch, tag or commit. With uv already installed,
you can also run it once without installing:
uvx --from git+https://github.com/Sendspin/conformance sendspin-validateIt asks how your app connects. In client-initiated mode it listens on port 8927
(--port), announced as _sendspin-server._tcp, and judges the first client to
connect. In server-initiated mode it lists the _sendspin._tcp clients it finds and
connects to the one you pick, taking it over from any server holding it idle;
--connect ws://host:port/path skips mDNS. --verbose streams every decoded frame to
stderr, and --fresh starts from a new validator identity. The identity is kept in the
platform user-data directory.
On the first connection it checks:
client/init:client_id,version,suite, and no undefined fields- the Noise handshake: message 2 carries exactly
{} - ordering: nothing but
client/helloorclient/goodbyebefore the firstserver/activate client/hello: support objects, role names, pairing methods,unpaired_access, no undefined fields, and (a warning only) the mDNS TXTname- the initial
client/state, itsavailablefield and its role objects, andclient/time - every rule aiosendspin's strict mode enforces, on every connection of the run, each cited to the spec line it comes from
It then walks you through the suites --suite names, in this order (default: all):
unpaired: U1 the Sentinel handshake; U2 refusing playback with unpaired access off (pairing_required); U3 accepting it with unpaired access on. U4, an activation no client may accept, runs only with--fault-injection.pairing: each method your app'sclient/hellooffers, in this order, with the checks of a method it does not offer reportedN/A:- P2 in the QR format: you paste the text of the QR your app shows.
- P1, pairing with the token (
SP:…) you paste from your app or leaflet, through both re-handshakes. - P2 in the digits format: you type the 6-digit code your app shows or speaks, then
a wrong one on purpose, which your app must reject, then the right one again. The
validator names a random non-English language in
server/hello, and asks which language a speaking app used. - P3, the static code: the validator first asks with the pairing window closed, then you open it and type the 8-digit code.
- P4: the validator cancels an attempt, which your app must drop cleanly. Then, if you opt in at its prompt, it leaves one idle until your app times it out, which takes about two minutes.
- P3 lockout, if you opt in at its prompt: five wrong static codes, which must close your device's pairing window, then a sixth attempt your app must hold back.
post-pairing: R1 reconnecting paired; R3 accepting the Sentinel once the validator forgets the pairing; R5 keeping the pairing and output delay across a full restart; R4server/unpair, then checking the app really dropped the pairing.
Another server may already hold your app idle, such as a Music Assistant that found
it over mDNS. In server-initiated mode, each pairing step, U2 and U4 open a connection
whose first server/activate is the step's own, so the app admits it over the idle
server. Other steps open with an activation that declares nothing. If the app turns
one of those away with client/goodbye concurrent_attempt, that step's failures
are reported as TOOL_ERROR, and the validator says how to keep other servers away.
If the app answers a step's own first activation that way, the failure stands.
Every step waits for you, and every question accepts s (skip), r (retry) and ?
(not sure). The hidden --auto-answer flag is for the CI self-test only.
The run writes report.json, a self-contained report.html and protocol.log.jsonl
to ./sendspin-validate-<client-name>-<timestamp>/. Pairing secrets are redacted as
frames are recorded, and so is every code you enter. The exit status is 1 when any
check is FAIL or TOOL_ERROR.
src/conformance/models.py: shared dataclasses and scenario capability helperssrc/conformance/scenarios.py: scenario registry and ordersrc/conformance/implementations.py: implementation registry and role metadatasrc/conformance/runner.py: matrix execution and process orchestrationsrc/conformance/build.py: adapter build checkssrc/conformance/repository_versions.py: git revision metadata written intoresults/data/repositories.jsonsrc/conformance/declared_formats.py: joins client format declarations to the formats the matrix negotiated, written intoresults/data/declared-formats.jsonsrc/conformance/chunk_framing.py: judges the player audio chunk header and chunk durations from the frames a case transportedsrc/conformance/merge.py: merges host-specific raw result directories, including build and repository metadatasrc/conformance/site.py: static site generationsrc/conformance/flac.pyandsrc/conformance/pcm.py: canonical decode/hash helperssrc/conformance/validator/: thesendspin-validateclient validator, a strict bundled-aiosendspin server that records a client's frames and judges them. It imports onlyconformance._vendor.aiosendspinand no harness module that touchesrepos/src/conformance/_vendor/: aiosendspin bundled for the client validator under its own import name, generated byscripts/vendor_aiosendspin.pyfrom upstream pluspatches/aiosendspin/. Never edit it by hand. The harness and its adapters keep loadingaiosendspinfromrepos/
src/conformance/adapters/aiosendspin_server.py: real Python server adaptersrc/conformance/adapters/aiosendspin_client.py: real Python client adapteradapters/sendspin-dotnet/client/: real.NETclient adapter sourceadapters/sendspin-go/: Go client adapter source, kept but not currently built or testedadapters/SendspinKit/client/: real Swift client adapter source with an adapter-owned inbound WebSocket listener for server-initiated scenariosadapters/sendspin-rs/client/: real Rust client adapter sourceadapters/sendspin-js/client.mjs: real Node.js client adapter source that drives the publicSendspinCoreSDK over an adapter-owned WebSocketadapters/sendspin-cpp/client/: real C++ client adapter source, built againstrepos/sendspin-cppwith CMake, whose audio and protocol evidence comes from the library's message traceadapters/sendspin-server-cpp/server/: real C++ server adapter source, built againstrepos/sendspin-server-cppwith CMake, whose evidence comes from the library's message tracesrc/conformance/adapters/placeholder.py: generic fail-fast adapter
scripts/setup_repositories.py: clone/check required reposscripts/setup_workspace.py: create local venv and install Python depsscripts/run_all.py: build + run + report orchestrationscripts/merge_results.py: merge multiple host result sets into one reportscripts/vendor_aiosendspin.py: rebuildsrc/conformance/_vendor/at an upstream ref, or--checkit against the recorded commitscripts/install-sendspin-validate.sh: thecurl … | shinstaller forsendspin-validate, which pins its dependencies withscripts/sendspin-validate-constraints.txt
.github/workflows/publish.yml: macOS build + run + Pages publishing.github/workflows/ci.yml: Linux unit tests including the validator self-test, andscripts/vendor_aiosendspin.py --checkagainst the committedsrc/conformance/_vendor/scripts/detect_regressions.py: compares local results against the published baseline to detect regressions
Bootstrap locally:
python scripts/setup_workspace.py --clone
. .venv/bin/activateuv.lock is committed. CI and scripts/setup_workspace.py install with uv sync --locked, which fails when the lock no longer matches pyproject.toml. Run uv lock after editing dependencies and commit the result. Run uv lock --upgrade to refresh every pin. After either, regenerate scripts/sendspin-validate-constraints.txt with the command in its header; a test fails until it matches uv.lock.
To use an implementation checkout outside repos/, set CONFORMANCE_REPO_<NAME> to
its absolute path, with the repository name upper-cased and - written as _ (for
example CONFORMANCE_REPO_SENDSPIN_CLI). A non-empty value must point at an existing
path: the harness stops at startup rather than fall back to repos/<name>. An empty
value counts as unset.
Build adapters:
python -m conformance.cli build
python -m conformance.cli build --report-path artifacts/build-report.jsonRun full matrix:
python scripts/run_all.py --results-dir results --build-report-path artifacts/build-report.jsonRun with explicit host metadata:
python scripts/run_all.py \
--results-dir results \
--build-report-path artifacts/build-report.json \
--environment-id linux \
--environment-name LinuxRun filtered matrix:
python -m conformance.cli run --results-dir results --from aiosendspin --to aiosendspin,sendspin-dotnetRun the matrix with parallel case execution:
python -m conformance.cli run --jobs 4
python scripts/run_all.py --jobs 4The runner assigns a dedicated server port and client-listener port to each case,
so parallel cases do not fight over 8927/8928.
Regenerate report only:
python -m conformance.cli report --results-dir resultsMerge multiple host runs:
python scripts/merge_results.py \
--output-dir artifacts/results \
artifacts/linux-results \
artifacts/macos-resultsFast sanity checks after edits:
python -m compileall src scripts
git diff --checkIf you touched the .NET adapter, also run:
~/.dotnet/dotnet build adapters/sendspin-dotnet/client/Conformance.SendspinDotnet.Client.csprojPrefer this path:
- Add a
ScenarioSpecentry insrc/conformance/scenarios.py. - Add explicit adapter handling for the new
scenario_idin each real adapter that supports it. - Reuse generic fields like
initiator_role,preferred_codec, andextra_cli_argswhere useful, but keep scenario coverage explicit per adapter. - Keep scenario order intentional.
- Verify the report renders the new scenario on the index page and generates dedicated pages under
results/scenarios/andresults/cases/.
If a scenario requires new behavior that does not fit the existing generic contract, add the minimum new generic scenario field needed while still keeping explicit per-scenario adapter handling.
- Add or update the implementation entry in
src/conformance/implementations.py. - Declare both
serverandclientroles. - If a role is unsupported, set
supported=False, wire it to the placeholder adapter and give a precisereason. The matrix then has no row or column for that role. - Keep adapter summaries aligned with the common summary contract.
- Update
adapters/README.mdif the adapter contract changes. - Verify both build-time and run-time behavior.
When adding a real adapter, make it consume harness CLI args rather than making the runner special-case that implementation.
- Prefer changing harness behavior in one place over duplicating logic across runner, adapters, and site.
- Preserve explicit naming:
server_impl,client_impl,initiator_role. - Keep result files machine-readable and stable; downstream checks depend on them.
- Treat
results/as generated output, not source. - If you change summary fields or artifact paths, update both the site generator and any runner expectations in the same change.
After meaningful changes, run the smallest relevant subset plus a syntax/build pass.
Typical minimum:
python -m compileall src scriptspython -m unittest discover -s testspython -m conformance.cli run --results-dir results --from aiosendspin --to aiosendspin,sendspin-dotnet --timeout-seconds 25python -m conformance.cli report --results-dir results
tests/ holds stdlib unittest coverage for harness rules that the matrix
cannot reach on a machine without every toolchain installed. It needs no test
dependency beyond the package itself and runs in ci.yml. A test that needs an
implementation clone or a macOS toolchain skips itself when that is missing.
If you changed CI, read .github/workflows/publish.yml afterward and confirm:
- Pages still uploads from
artifacts/results - expected harness failures do not fail the workflow
- regression detection only fails PRs, not main/schedule/dispatch
- the macOS job still runs the full published matrix
- the published artifact still preserves
build-report.jsonandrepositories.json
- Make focused commits.
- Push regularly when changes are meaningful.
- Do not rewrite history unless explicitly asked.