Skip to content

Recognize legacy-unencrypted scenario in existing player-scenario dispatch - #115

Merged
chrisuthe merged 2 commits into
mainfrom
wire-legacy-unencrypted-into-client-adapters
Sep 4, 2026
Merged

Recognize legacy-unencrypted scenario in existing player-scenario dispatch#115
chrisuthe merged 2 commits into
mainfrom
wire-legacy-unencrypted-into-client-adapters

Conversation

@chrisuthe

Copy link
Copy Markdown
Member

Answers a fair pushback: does every client adapter really need net-new scenario-specific code just to keep testing the plaintext/legacy-unencrypted path that already worked pre-Noise-migration?

No. The client's wire-level behavior for 'server-initiated-legacy-unencrypted' is identical to 'server-initiated-pcm' - same PCM audio format, same role, same verification. The only thing that differs is server-side: whether it performs the Noise handshake or skips it (allow_unencrypted). The client is agnostic to that.

So instead of adding bespoke per-scenario logic, this just adds the new scenario_id string to each adapter's existing player-scenario allow-list (the same pattern already used for server-initiated-flac, server-initiated-opus, etc.):

  • sendspin-go: internal/conformance/scenarios.go IsPlayerScenario
  • sendspin-cpp: client/main.cpp is_player_scenario
  • sendspin-js: client.mjs PLAYER_SCENARIOS

All three of these already declare supports_legacy_unencrypted=True in implementations.py, and sendspin-go/sendspin-js clients are plaintext-only already (no Noise support at all), making this scenario their native mode. sendspin-cpp's client is likewise unaware of encryption mode.

Not touched: aiosendspin's client (by design - it always uses real Noise and should correctly fail/refuse this scenario), and the currently build-broken adapters (dotnet/jvm/rs/SendspinKit), which are unrelated pre-existing issues.

chrisuthe and others added 2 commits September 4, 2026 17:01
The macOS publish workflow has been failing to produce a report at all
for the last two runs: a single case's summary comparison raised an
unhandled KeyError ('audio') deep in _compare_audio_summaries(), which
propagated straight out of asyncio.gather() in run_matrix() and killed
run_all.py before the report/Pages-publish steps ever ran. This is why
recently-added scenarios (e.g. server-initiated-legacy-unencrypted from
#112) appeared to be "missing" from the published site -- the whole
report generation had silently stopped succeeding, not just that one
scenario's row.

- runner.py: wrap _compare_summaries() in run_case() so any exception
  it raises is turned into a failed case with a descriptive reason
  instead of crashing the entire matrix run. A bug in one scenario's
  comparison logic should now only fail that one case.
- _compare_audio_summaries(): guard against a missing/malformed
  "audio" section in either summary with an explicit, readable failure
  reason instead of a raw KeyError, since that's the concrete bug that
  triggered this.

Verified locally: python -m compileall src scripts passes, and a full
aiosendspin -> aiosendspin matrix run (including the new
server-initiated-legacy-unencrypted and
server-initiated-protocol-baseline-v1 scenarios) still produces the
same pass/fail results as before, plus report generation still
succeeds end-to-end.

Co-authored-by: Copilot <[email protected]>
… existing client adapters

The client side of this scenario is identical to server-initiated-pcm
(same PCM audio, same role behavior) - only the server differs, by
skipping the Noise handshake. Rather than requiring new scenario-specific
client logic, each client adapter's existing player-scenario dispatch just
needed to also match this scenario_id.

- sendspin-go: add to IsPlayerScenario
- sendspin-cpp: add to is_player_scenario
- sendspin-js: add to PLAYER_SCENARIOS
@chrisuthe
chrisuthe merged commit 342e4bd into main Sep 4, 2026
1 check passed
@chrisuthe
chrisuthe deleted the wire-legacy-unencrypted-into-client-adapters branch September 4, 2026 22:42
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