fix(upstream-copilot): address 5 review threads on MA PR #3611#80
Merged
fix(upstream-copilot): address 5 review threads on MA PR #3611#80
Conversation
eventing: NOTIFY now only returns on 2xx, falling through to the next
CALLBACK URL on HTTP >=300 or network error. Previously the first URL
was treated as success regardless of status, which breaks multi-URL
CALLBACK behaviour defined by UDA §4.1.2.
provider._on_play: replace `players.play_media(FLOW_STREAM, uri=...)` with
`players.select_source(target, self.instance_id)`. The old call handed
the raw upstream URI to the player, bypassing our PluginSource /
`get_audio_stream()` proxy (and its SSRF/redirect guards). Aligns with
the Spotify Connect plugin receiver pattern in MA.
renderer: pre-load SCPD XML bytes in `__init__` and serve from an in-
memory cache. Previously every `/*/description.xml` hit did a sync
`Path.read_bytes()` on the event loop.
provider._detect_ip: remove the hand-rolled 8.8.8.8 probe in favour of
`music_assistant.helpers.util.get_ip_addresses()`, which handles IPv6
and ranks interfaces. Socket import dropped.
ssdp.stop: after cancelling `_advertise_task`, await it with
`contextlib.suppress(asyncio.CancelledError)` so shutdown no longer
leaves a pending task ("Task was destroyed but it is pending").
Bump VERSION to 1.1.3.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
Addresses 5 unresolved Copilot threads on the upstream MA PR #3611:
eventing.py:214provider.py:_on_playplay_media(FLOW_STREAM, uri=...)withplayers.select_source(target, self.instance_id)so audio actually flows through ourPluginSource/get_audio_stream().renderer.py:_serve_scpd__init__; requests now serve from cache instead of blocking onPath.read_bytes().provider.py:_detect_ipmusic_assistant.helpers.util.get_ip_addresses()(IPv6-aware, interface-ranked).ssdp.py:stopawaitthe cancelled_advertise_taskwithcontextlib.suppress(asyncio.CancelledError); no more "Task was destroyed but it is pending".Bump
VERSIONto 1.1.3.Test plan
pytest— 62 passedruff check provider/ tests/— cleanruff format --check provider/ tests/— clean🤖 Generated with Claude Code