Repository navigation
fix(sendspin): record a declared aiosendspin override so MA controller state parses - #12
Merged
Conversation
…r state parses sendspin 7.5.0 declares aiosendspin[server]~=6.0.1, i.e. >=6.0.1,<6.1.0, but aiosendspin 6.1.0 added seek/seek_relative to MediaCommand and servers now advertise them (Music Assistant 2.10.x, Loxone/Sonn Core 4.0.0-beta.21). Since supported_commands is typed list[MediaCommand], one unknown member discards the whole server/state message: mashumaro.exceptions.InvalidFieldValue: Field "supported_commands" ... Audio keeps playing, so the client looks alive while controller state (volume/mute/repeat/shuffle) silently stops syncing. Reported upstream as Sendspin/sendspin-python-cli#280 and moode-player#278; no fix released. This does not fix upstream, it keeps the moOde install correct meanwhile. The installer now records a declared --overrides entry (aiosendspin>=6.1.1,<6.2) in the uv tool receipt. Unlike a hand-applied uv pip install, the recorded override is part of the resolution and survives uv tool upgrade, which would otherwise re-resolve back to 6.0.5. The bound is narrow on purpose: >=6.1.1 alone resolves to 9.1.1, and upstream PR moode-player#276 shows 9.1 needed code migration, so 6.1.x is the verified-safe range. Remove once upstream relaxes the pin. Verified by running the new functions verbatim on the Pi: 6.0.5 -> 6.1.1, second call a no-op, override present in the receipt, 0 deserialisation exceptions with a live Music Assistant stream. Installer bumped to v4.1.6.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
sendspin7.5.0 declares:PEP 440 expands
~=6.0.1to>=6.0.1,<6.1.0— 6.0.x only. Butaiosendspin6.1.0 addedseekandseek_relativetoMediaCommand, and servers now advertise them. Music Assistant 2.10.x sendsseek_relativeinsupported_commands, as does Loxone/Sonn Core 4.0.0-beta.21.Because
supported_commandsis typedlist[MediaCommand], one unknown member discards the wholeserver/statemessage:Audio keeps playing (a different message), so the client still looks healthy while controller state — volume, mute, repeat, shuffle — silently stops syncing. Observed on a moOde 10.3.4 Pi against Music Assistant: 15 dropped messages in one hour, stream unaffected.
This is a known upstream issue
Already reported, no fix released:
>=6.0.1,<7or a 7.5.1.supported_commands" (2026-09-03), the same error from Music Assistant 2.10.1 specifically.aiosendspin9.1 — but that required code changes across client/daemon/TUI, so it is not a drop-in.So this PR does not fix upstream; it makes the moOde install correct until upstream relaxes the pin.
Fix
The installer records a declared
--overridesentry in the uv tool receipt:uv tool install ... --overrides <file>overrides the transitive constraint, and — unlike a hand-applieduv pip install— the override is recorded inuv-receipt.toml, so it is part of the resolution and survivesuv tool upgrade(which otherwise re-resolves straight back to 6.0.5). Verified: with the override recorded,uv tool upgrade sendspinleaves 6.1.1 in place.The upper bound is deliberately narrow.
>=6.1.1alone resolves to 9.1.1, three majors past the declared range, and upstream PR moode-player#276 shows 9.1 needed code migration — so 6.1.x, the additive delta verified in moode-player#280, is the safe range. Drop the override once upstream relaxes the pin.New
ensure_aiosendspin_override()runs ininstall_prerequisites(so both fresh installs and re-runs after a moOde update pick it up), plusdetect_aiosendspin_override()in the post-install verification block as a warning.Verification
bash -npasses. The new functions were extracted verbatim from the branch into a harness and run on the Pi:End-to-end with the override live: a real Music Assistant stream started (
Stream started with codec flac), audio device held by the daemon, metadata endpoint populated, and 0 deserialisation exceptions since the daemon started (previously recurring).Installer bumped to v4.1.6; README gains a "Known upstream issue" section documenting the symptom, the upstream references, and how to inspect/remove the override.