Skip to content

Restructure pair-method descriptors - #179

Merged
maximmaxim345 merged 1 commit into
mainfrom
ap/restructure-pair-method-descriptors
Aug 28, 2026
Merged

maximmaxim345 merged 1 commit into
mainfrom
ap/restructure-pair-method-descriptors

Conversation

@arturpragacz

Copy link
Copy Markdown
Contributor

Restructure pair-method descriptors.

  • Key pair-method descriptors by method. A dictionary fits much better here than a list.
  • Expose them in management. The issue we have currently is that if a server wants to show more information about a given pairing method it cannot do that until that method is enabled, as those are the only ones that client/hello message lists.

Base automatically changed from ap/resolve-miscellaneous-pairing-gaps to main August 28, 2026 15:20
@arturpragacz
arturpragacz force-pushed the ap/restructure-pair-method-descriptors branch from 888a707 to 49aeb6d Compare August 28, 2026 15:29
@arturpragacz
arturpragacz marked this pull request as ready for review August 28, 2026 15:29

@maximmaxim345 maximmaxim345 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, thanks @arturpragacz !

@maximmaxim345
maximmaxim345 merged commit 9d8a4dc into main Aug 28, 2026
1 check passed
@maximmaxim345
maximmaxim345 deleted the ap/restructure-pair-method-descriptors branch August 28, 2026 16:17
maximmaxim345 added a commit that referenced this pull request Sep 10, 2026
Removes the digit audio pack that #173 introduced. During initial
pairing the pack came from an unauthenticated peer, which thereby chose
what the client's speaker played and drove the client's audio decoders
before any trust was established. Speaking clients return to their own
bundled voice, choosing the language against the server's `languages`
hint in `server/hello` under RFC 4647 Lookup matching, as before #173.

Hand revert rather than `git revert`: #179, #194 and #237 have since
rewritten the surrounding text, and the `languages` move from
`server/activate` to `server/hello` in #173 stays, since
`client/pair-pending`'s `message` field relies on it.

Changes, all in `messaging.md` and `pairing.md` with `README.md`
regenerated:

- Binary message ID `2` returns to the reserved `2-3` range.
- `server/activate` `pairing.format?` no longer conditions `digits` on
fitting a pack.
- Sequence diagram, Digits emission, Protocol Errors, the
`dynamic_pairing_code` descriptor (`digit_audio` removed; `out_channels`
unchanged), the Messages intro, `client/pair-init` and
`server/pair-init` lose their pack references.
- The `Server → Client: Digit Audio Clip (Binary)` section is removed.

Closes #203

---------

Co-authored-by: Maxim Raznatovski <nda.mr43@gmail.com>
chrisuthe added a commit to Sendspin/aiosendspin that referenced this pull request Sep 16, 2026
#354)

# What does this implement/fix?

Implements spec [#179](Sendspin/spec#179) and
[#189](Sendspin/spec#189), plus the
ignore-unrecognized-identifiers rule from
[#178](Sendspin/spec#178) that shares the same
parse path.

`supported_pair_methods` in `client/hello` becomes an object keyed by
pairing method identifier rather than a list of self-describing
descriptors, the reader ignores identifiers and values it does not
recognize, and a server offered both pairing-code methods prefers
`dynamic_pairing_code` (spec #285 moved the one-method cap to the
implementation guide).

Clients on the superseded list wire keep working: the server rewrites
the shape and flags it, as it already does for unversioned support keys
and pre-rename artwork dimensions. Their tests are kept as legacy-wire
acceptance tests.

One judgement call worth a look. An unrecognized method identifier is
logged, not sent through `_flag_noncompliance`: such a client is
conformant per `pairing.md:318`, so flagging it would make a server
running `allow_noncompliant_clients=False` reject spec-compliant
clients. Offering both code methods is conformant since spec #285, so it
is logged too; the SDK client still offers only the dynamic one.

**Related issue (if applicable):**

- n/a

## Types of changes

- [x] Enhancement to an existing feature — `enhancement`

## Checklist

- [x] The code change is tested and works locally.
- [x] `pre-commit run --all-files` passes.
- [x] `pytest` passes, and tests have been added/updated under `tests/`
where applicable.
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