Skip to content

Remove the deprecated management API from the server - #472

Draft
maximmaxim345 wants to merge 5 commits into
mainfrom
refactor/remove-server-management
Draft

maximmaxim345 wants to merge 5 commits into
mainfrom
refactor/remove-server-management

Conversation

@maximmaxim345

Copy link
Copy Markdown
Member

What does this implement/fix?

The server no longer implements the management activity, which the spec removed in Sendspin/spec#183. Every past client still connects, pairs and plays, since management was always started by the server. Paired legacy devices lose remote management, including opening their pairing window from the server.

Removed:

  • SendspinServer.enable_management and disable_management
  • SendspinConnection.enable_management, disable_management, list_records, add_record, remove_record, get_pairing_config, set_pairing_config and open_pairing_window
  • ConnectionReason.MANAGEMENT, Activity.MANAGEMENT and ManagementResult
  • the aiosendspin.models.management module
  • aiosendspin.util.warn_deprecated

ServerUnpairMessage and ServerUnpairPayload moved to aiosendspin.models.core.
A management/result from a legacy client is now ignored like any other unknown message.
The client still closes with unauthorized when a server declares management, and now does the same for any activity it doesn't recognize.

Note

Left as draft for now, until a Music Assistant release can drop its device management section.
Shipping this in a patch release would remove that feature for users.

Related issue or spec PR (if applicable):

Types of changes

  • Bugfix (non-breaking change which fixes an issue): bugfix
  • New feature (non-breaking change which adds functionality): new-feature
  • Enhancement to an existing feature: enhancement
  • Breaking change (changes the public API or the protocol in a way that is not backwards compatible): breaking-change
  • Refactor (no behavior change): refactor
  • Documentation only: documentation
  • Maintenance / chore: maintenance
  • CI / workflow change: ci
  • Dependencies bump: dependencies

@github-actions github-actions Bot added the breaking-change Changes the public API or the protocol in a way that is not backwards compatible label Oct 2, 2026
@maximmaxim345
maximmaxim345 requested a balanced review from Copilot October 2, 2026 09:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The removal is complete, consistent with the merged specification change, and adequately covered by updated tests.

Review effort: Balanced
Findings: None

What changed in this PR

Removes deprecated server management support to align with Sendspin/spec#183 while preserving server/unpair.

Changes:

  • Removes management APIs, models, enums, and deprecation infrastructure.
  • Moves unpair models into models.core.
  • Rejects unknown activation activities and updates tests accordingly.
File Description
aiosendspin/​client/​connection.py Uses core unpair model and rejects unknown activities.
aiosendspin/​models/​__init__.py Removes management module export.
aiosendspin/​models/​core.py Adds unpair message models.
aiosendspin/​models/​management.py Deletes management models.
aiosendspin/​models/​types.py Removes management enums.
aiosendspin/​server/​connection.py Removes management session handling and APIs.
aiosendspin/​server/​server.py Removes server management APIs.
aiosendspin/​util.py Removes deprecated-warning helper.
tests/​conftest.py Removes deprecation test utilities.
tests/​integration/​test_unpair_flow.py Retains focused unpair coverage.
tests/​models/​test_management.py Deletes management model tests.
tests/​models/​test_package_exports.py Updates expected model exports.
tests/​models/​test_server_unpair.py Tests the relocated unpair model.
tests/​server/​test_client_state_dispatch.py Removes management-result dispatch coverage.
tests/​server/​test_compliance.py Removes management deprecation tests.
tests/​server/​test_management_issuer.py Deletes management request tests.
tests/​server/​test_multi_server.py Removes management connection-reason coverage.
tests/​server/​test_reconnect_policy.py Updates reconnect activity coverage.
tests/​test_client_pairing.py Updates pairing-window documentation.
tests/​test_client_protocol_callbacks.py Covers rejection of removed activities.
tests/​test_util.py Removes deprecated-warning tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

maximmaxim345 added a commit that referenced this pull request Oct 9, 2026
# What does this implement/fix?

<!-- Quick description and explanation of changes. -->

The client applied a `server/activate` that named an activity it doesn't
recognize, dropping the unknown activity with only an info log. The spec
never allows such an activity set, so the client now closes the
connection with `unauthorized`.

Only servers sending an activity other than `playback`, `pairing` or
`management` are affected.

**Related issue or spec PR (if applicable):**

- #472

## Types of changes

<!--
Tick exactly one box. CI (.github/workflows/pr-labels.yaml) applies the
matching label, and the release notes use it to sort this change.
-->

- [x] Bugfix (non-breaking change which fixes an issue): `bugfix`
- [ ] New feature (non-breaking change which adds functionality):
`new-feature`
- [ ] Enhancement to an existing feature: `enhancement`
- [ ] Breaking change (changes the public API or the protocol in a way
that is not backwards compatible): `breaking-change`
- [ ] Refactor (no behavior change): `refactor`
- [ ] Documentation only: `documentation`
- [ ] Maintenance / chore: `maintenance`
- [ ] CI / workflow change: `ci`
- [ ] Dependencies bump: `dependencies`
…r-management

# Conflicts:
#	aiosendspin/models/management.py
#	aiosendspin/server/connection.py
#	aiosendspin/server/server.py
#	aiosendspin/util.py
#	tests/conftest.py
#	tests/models/test_management.py
#	tests/server/test_management_issuer.py
#	tests/test_client_protocol_callbacks.py
#	tests/test_util.py
…r-management

# Conflicts:
#	tests/server/test_compliance.py

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Changes the public API or the protocol in a way that is not backwards compatible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants