Skip to content

Fix sendspin-jvm adapter for ServerState.metadata type change - #107

Open
OnFreund wants to merge 2 commits into
mainfrom
claude/fix-sendspin-jvm-adapter-server-state
Open

Fix sendspin-jvm adapter for ServerState.metadata type change#107
OnFreund wants to merge 2 commits into
mainfrom
claude/fix-sendspin-jvm-adapter-server-state

Conversation

@OnFreund

@OnFreund OnFreund commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Two related fixes, both surfaced by Sendspin/sendspin-jvm#33:

  1. Build break: Sendspin/sendspin-jvm#33 wrapped ServerState.metadata/controller/color in JsonOptional<T> (fixing a real bug — the client couldn't distinguish "role omitted" from "role explicitly null" per spec PR #175). That's source-breaking for this repo's sendspin-jvm adapter (adapters/sendspin-jvm/client/src/main/kotlin/com/sendspin/conformance/Main.kt), which read state.metadata as a plain TrackMetadataMsg?. Fixed with the JsonOptional.orNull() idiom this file already uses elsewhere.

  2. Matrix regression: with the build fixed, the full aiosendspin -> sendspin-jvm matrix started failing across the board (9/9 scenarios) — not a regression from fix Add sendspin-cpp conformance client adapter #1, but a separate, real interop gap: sendspin-jvm also picked up spec PR #168 (artwork media_width/media_heightwidth/height, dropping BMP), which aiosendspin hadn't caught up to. aiosendspin was rejecting every client/hello outright as malformed (media_width/media_height are required fields aiosendspin's model still expected, and sendspin-jvm no longer sends them) — that's why every scenario failed, not just the artwork one. Fixed this repo's aiosendspin_client.py/aiosendspin_server.py adapters, which also constructed ArtworkChannel with the old field names and referenced the now-removed PictureFormat.BMP. The actual aiosendspin-side fix is Sendspin/aiosendspin#343this PR depends on that one merging (or at least landing on aiosendspin's main) for the full matrix to go green, since the harness resolves aiosendspin as a sibling git checkout.

Test plan

  • python -m conformance.build (build_selected_adapters({"sendspin-jvm-client"})) succeeds
  • import conformance.adapters.aiosendspin_server smoke-test import passes
  • Full conformance matrix (conformance run --from aiosendspin --to sendspin-jvm) — needs Sendspin/aiosendspin#343 merged first; verify via this PR's CI once that lands

🤖 Generated with Claude Code

OnFreund and others added 2 commits August 30, 2026 18:26
sendspin-jvm's Sendspin/sendspin-jvm#33 wrapped ServerState.metadata/
controller/color in JsonOptional<T> to fix a bug where the client
couldn't distinguish "role omitted" (leave unchanged) from "role
explicitly null" (clear), per spec PR #175. This adapter read
state.metadata as a plain TrackMetadataMsg?, breaking the build.

Fixed using the same JsonOptional.orNull() idiom this file already
uses elsewhere (e.g. meta.title.orNull() in addMetadataFields).
Functionally equivalent to the old code for the non-null-clearing
case this adapter cares about (tracking the last received metadata
value).

Verified: `python -m conformance.build` succeeds for sendspin-jvm-client
and the aiosendspin_server smoke-test import passes locally. Could not
exercise the full conformance matrix in this sandbox (client/server
socket timeouts even against the previous, already-passing commit —
a local networking limitation, not a regression from this change).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…dth/height rename

aiosendspin's own ArtworkChannel model (fixed in a companion PR to
Sendspin/aiosendspin) is being updated for spec PR #168 ("Letterbox art
and remove BMP support"): media_width/media_height -> width/height,
and BMP dropped from PictureFormat entirely. This adapter constructed
ArtworkChannel directly with the old kwarg names and referenced
PictureFormat.BMP, which would break once that aiosendspin fix lands.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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