Skip to content

protocol: remove legacy management namespace - #268

Merged
chrisuthe merged 2 commits into
mainfrom
chrisuthe/protocol-remove-management-namespace
Sep 10, 2026
Merged

chrisuthe merged 2 commits into
mainfrom
chrisuthe/protocol-remove-management-namespace

Conversation

@chrisuthe

Copy link
Copy Markdown
Member

Removes the SDK's implementation of the management/* namespace, retired upstream by merged spec PR Sendspin/spec#183.

What changes

  • Wire types deleted. ManagementMessages.cs and ManagementData.cs are gone, along with every management/* MessageTypes constant and the matching serializer/JsonSerializerContext registrations. An inbound management/* message now deserializes to null and is rejected like any other unknown type.
  • Dispatch deleted. SendSpinClient loses its management dispatch block and the set-pairing-config, get-pairing-config, add-record, remove-record, list-records and open-pairing-window handlers.
  • Activity vocabulary. management is no longer an activity. It maps to no ConnectionPriority, so it carries no arbitration weight and is treated as an unrecognized activity (inadmissible on every PSK category).
  • server/unpair relocated into its own ServerUnpairMessage.cs, since it no longer belongs beside the management types.
  • Public surface removed. ISendSpinClient.PairingConfigChanged, PairingConfigChangedEventArgs, the SendSpinHostService forward of that event, and ClientCapabilities.RecordModePskId.

Breaking behaviour

  • Any app subscribing to PairingConfigChanged (client or host) no longer compiles.
  • ClientCapabilities.RecordModePskId no longer compiles.
  • Pairing configuration is now purely local. Which pair methods a client offers and whether each is enabled is manufacturer-defined ClientCapabilities state; no server can read or change it. A server that used management/set-pairing-config to repair a misconfigured client can no longer do so.
  • A server that activates a connection with the management activity is refused as unauthorized.

Tests

management/* coverage is deleted with the namespace (SendspinClientServiceManagementTests, ManagementInputValidationTests, PairingConfigOwnershipTests) and replaced by ManagementRemovedTests, which asserts the messages are rejected and the activity is inadmissible.

Assertions in PairingConfigSeedingTests that observed pairing state through management/get-pairing-config are dropped here rather than rewritten, because their replacement (the client/hello pair-method descriptors) does not exist until the next commit in the stack. PR #2 reintroduces the equivalent assertions in their final form.

dotnet test tests/Sendspin.SDK.Tests/Sendspin.SDK.Tests.csproj
  net8.0   Passed! - Failed: 0, Passed: 1086, Skipped: 0, Total: 1086
  net10.0  Passed! - Failed: 0, Passed: 1088, Skipped: 0, Total: 1088

Stack

  1. this PR — base main
  2. chrisuthe/pairing-records-and-pair-methods — pairing wire and record semantics (Storage hardening follow-ups from the secure-storage slice #178/Narrow or justify the remaining catch (Exception) sites off the peer-input path #179/Answer every management request, including wrong-kind payloads #189/Clear the concurrency and timing residue in SendspinConnection #183)
  3. chrisuthe/state-stream-configuration-in-client-state — client state authority (Run the test suite on net8.0 as well as net10.0 #175/Zeroize handshake and CPace key material #176/Stop blaming the server version for an abnormal listen-path close #181/Controller role has no seek support: seek/seek_relative, position_ms/offset_ms, and seek_max_ms are all missing #195/Provisional-connection timeout sends goodbye reason 'handshake_timeout', outside the spec's closed reason set #204)

Merge in order.

Spec PR Sendspin/spec#183 retires the whole management/* namespace, so the
SDK stops implementing it.

- Delete ManagementMessages.cs and ManagementData.cs, the management/* wire
  types, their serializer registrations and their MessageTypes constants.
- Drop the management dispatch block in SendSpinClient together with the
  set-pairing-config / get-pairing-config / add-record / remove-record /
  list-records / open-pairing-window handlers and the PairingConfigChanged
  event that fed them; pairing configuration is now purely local,
  manufacturer-defined ClientCapabilities state that no server can read or
  change.
- Remove "management" from the activity vocabulary: it no longer maps to a
  ConnectionPriority, so it carries no arbitration weight and is refused as
  an unrecognized activity.
- Relocate server/unpair into its own ServerUnpairMessage.cs now that it no
  longer lives beside the management types.
- Remove the public pairing-config surface (PairingConfigChangedEventArgs,
  ISendSpinClient.PairingConfigChanged, SendSpinHostService's forward,
  ClientCapabilities.RecordModePskId) and update README, the v10 migration
  guide, the package description and the interop notes.

Tests: management/* coverage is deleted with the namespace and replaced by
ManagementRemovedTests, which asserts the messages are rejected and the
activity is inadmissible. Assertions that observed pairing config through
management/get-pairing-config are dropped here; the following commit in the
stack reintroduces the equivalent assertions against the client/hello
pair-method descriptors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Six requested documentation and test-cleanup corrections remain unresolved.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Removes the retired management/* protocol namespace while preserving server/unpair and making pairing configuration local.

Changes:

  • Removes management wire types, dispatch, public APIs, and arbitration priority.
  • Relocates server/unpair.
  • Replaces management tests with rejection coverage and updates documentation.
File summaries
File Description
tools/interop/README.md Updates pairing interoperability notes.
tests/Sendspin.SDK.Tests/Protocol/MessageSerializerTests.cs Removes management serialization cases.
tests/Sendspin.SDK.Tests/Connection/NoiseWireFramingTests.cs Updates retired-management references.
tests/Sendspin.SDK.Tests/Connection/DisabledPairingMethodPskTests.cs Revises enablement coverage; premise needs rewording to avoid implying runtime reconfiguration (nit).
tests/Sendspin.SDK.Tests/Client/ServerArbitrationTests.cs Removes management-priority cases.
tests/Sendspin.SDK.Tests/Client/SendspinHostServicePairingTests.cs Removes forwarded-event coverage.
tests/Sendspin.SDK.Tests/Client/SendspinHostServiceArbitrationTests.cs Reworks pairing displacement coverage.
tests/Sendspin.SDK.Tests/Client/SendspinClientServicePairingTests.cs Removes management references.
tests/Sendspin.SDK.Tests/Client/SendspinClientServiceManagementTests.cs Deletes management behavior tests.
tests/Sendspin.SDK.Tests/Client/SendspinClientServiceEncryptedFlowTests.cs Treats management as an unknown activity.
tests/Sendspin.SDK.Tests/Client/PairMethodLocationsTests.cs Removes server-driven configuration tests.
tests/Sendspin.SDK.Tests/Client/PairingWindowTests.cs Updates local-window semantics.
tests/Sendspin.SDK.Tests/Client/PairingGatingTests.cs Removes remote window tests; obsolete management parameter remains (nit).
tests/Sendspin.SDK.Tests/Client/PairingConfigSeedingTests.cs Removes management-based assertions.
tests/Sendspin.SDK.Tests/Client/PairingConfigOwnershipTests.cs Deletes server-owned configuration tests.
tests/Sendspin.SDK.Tests/Client/ManagementRemovedTests.cs Adds removal and rejection coverage.
tests/Sendspin.SDK.Tests/Client/ManagementInputValidationTests.cs Deletes obsolete validation tests.
tests/Sendspin.SDK.Tests/Client/InboundMessageHardeningTests.cs Removes management input cases.
src/Sendspin.SDK/Sendspin.SDK.csproj Updates release notes.
src/Sendspin.SDK/README.md Documents local pairing configuration; must clarify that changes require a new client instance (nit).
src/Sendspin.SDK/Protocol/MessageSerializerContext.cs Removes management registrations.
src/Sendspin.SDK/Protocol/MessageSerializer.cs Removes management deserialization.
src/Sendspin.SDK/Protocol/Messages/ServerUnpairMessage.cs Relocates unpair wire models.
src/Sendspin.SDK/Protocol/Messages/ServerActivateMessage.cs Removes the management activity constant.
src/Sendspin.SDK/Protocol/Messages/MessageTypes.cs Removes management message constants.
src/Sendspin.SDK/Protocol/Messages/ManagementMessages.cs Deletes management wire models.
src/Sendspin.SDK/Protocol/Messages/ManagementData.cs Deletes management payload models.
src/Sendspin.SDK/MIGRATION-10.0.0.md Updates migration guidance; stale management/get-pairing-config guidance remains (nit).
src/Sendspin.SDK/Client/ServerArbitration.cs Removes management priority.
src/Sendspin.SDK/Client/SendSpinHostService.cs Removes configuration-event forwarding.
src/Sendspin.SDK/Client/SendspinClientOptions.cs Updates pairing-store documentation.
src/Sendspin.SDK/Client/SendSpinClient.cs Removes management state and handlers; one comment contradicts actual static_pin behavior (nit).
src/Sendspin.SDK/Client/PairingWindow.cs Documents local-only opening; retained dispatch-teardown explanation is inaccurate (nit).
src/Sendspin.SDK/Client/PairingConfigChangedEventArgs.cs Deletes obsolete event arguments.
src/Sendspin.SDK/Client/ISendSpinClient.cs Removes the configuration-change event.
src/Sendspin.SDK/Client/ClientCapabilities.cs Removes record-mode configuration.
.github/workflows/interop.yml Updates compatibility commentary.
Review details

Suppressed comments (2)

src/Sendspin.SDK/README.md:275

  • ClientCapabilities is copied into readonly effective fields when the client is constructed, so mutating it later does not turn a method back on for subsequent client/hello messages. This wording implies live reconfiguration; clarify that a new client instance is required.
the server as absent, whereas a listed-but-disabled method is simply withheld from
`client/hello` until your app turns it back on.

tests/Sendspin.SDK.Tests/Client/PairingGatingTests.cs:378

  • StartAsync still declares bool management = false at line 349, but this replacement removes its last read and the repository has no callers passing it. Leaving a no-op setup option is misleading for future tests; remove the obsolete parameter as part of this cleanup.
        var category = pairingPsk ? PskCategory.Pairing : PskCategory.Sentinel;
  • Files reviewed: 37/37 changed files
  • Comments generated: 4
  • Review effort level: Balanced

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

Comment thread src/Sendspin.SDK/MIGRATION-10.0.0.md Resolved
The migration guide still told app authors that an unrunnable pair method is
reported enabled: false by management/get-pairing-config, and three comments
still justified ordering or locking by reference to the deleted
set-pairing-config handler. The breaking-changes table also had no row for
the removal, unlike every other v10 removal.
@chrisuthe
chrisuthe merged commit 110d728 into main Sep 10, 2026
5 checks passed
chrisuthe added a commit that referenced this pull request Sep 10, 2026
Resolves the four conflicts with the management-namespace doc fixes that
landed with #268: the pairing-record and lock comments and the migration
guide's pair-method wording take this branch's versions, and the migration
table keeps the new row for the removed management surface.
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.

2 participants