Skip to content

Resolve more pre-1.0 spec gaps - #122

Open
maximmaxim345 wants to merge 12 commits into
mainfrom
fix/remaining-spec-gaps
Open

Resolve more pre-1.0 spec gaps#122
maximmaxim345 wants to merge 12 commits into
mainfrom
fix/remaining-spec-gaps

Conversation

@maximmaxim345

@maximmaxim345 maximmaxim345 commented Jul 16, 2026

Copy link
Copy Markdown
Member

Resolves a batch of pre-1.0 ambiguities across the spec.

  • Roles and preamble: codec framing, source format and trust rules, group volume and mute for mixed and empty groups, artwork channel and lateness semantics, the metadata clock domain, normative language boilerplate, and role versioning notes.
  • Connection and management: plain ws:// transport, discovery name precedence, provisional connection caps, prologue hashing, psk_id uniqueness across PSK categories (collisions rejected as already_exists), and a device-specific pre-provisioned fallback record.
  • Messaging: WebSocket control frames vs the binary-only rule, per-direction fragmentation and malformed-sequence handling, handshake payload encodings and version/suite typing, re-handshake framing and key-swap boundary, required role support objects and supported_pair_methods, per-role trust folded into the central server/activate rules, state merge depth and initial full-state baselines, and client/goodbye reason cleanup.
  • Pairing: PIN pairing over an already-paired channel, stream-only quiesce when entering pairing, server-side cancel and timeout, Pairing PSK lifecycle and standing client obligations, a pinned CPace draft revision, exact lockout counter events, and sequence violations handled as protocol errors.
  • Source role: prompt and idempotent start/stop, clarify per-connection streaming state, chunks in flight after a stop, capture timestamps under encoder delay, chunk duration bounds and stall backlog, and rate estimation from the delivered sample stream.

Breaking: the group volume/mute formula, which fixes edge cases for groups with no volume- or mute-capable members. Breaking for servers only.

Three client/hello and client/state rules are formally new MUSTs but match what existing implementations already do, so they carry no practical adoption cost: a role's support object (e.g. player@v1_support) is now required whenever that role version is listed in supported_roles, supported_pair_methods is now required (it can never be legitimately absent, every client implements at least Pairing PSK), and clients with only display stream roles (artwork, visualizer) now also send the initial client/state.

Comment thread management.md Outdated
Comment thread management.md Outdated
@maximmaxim345
maximmaxim345 force-pushed the feat/split-readme-source branch from c395fd2 to 9c7ea2b Compare July 21, 2026 08:46
@maximmaxim345
maximmaxim345 force-pushed the fix/remaining-spec-gaps branch from f534ea4 to 4308bde Compare July 21, 2026 08:56
@maximmaxim345
maximmaxim345 force-pushed the feat/split-readme-source branch from 9c7ea2b to ea7dfce Compare July 21, 2026 11:39
@maximmaxim345
maximmaxim345 force-pushed the fix/remaining-spec-gaps branch from a99f6ce to 228b277 Compare July 21, 2026 12:10
@maximmaxim345
maximmaxim345 changed the base branch from feat/split-readme-source to docs/reorg-readme-sections July 21, 2026 12:12
@maximmaxim345
maximmaxim345 marked this pull request as ready for review July 21, 2026 12:21
@maximmaxim345
maximmaxim345 force-pushed the docs/reorg-readme-sections branch from e16b6b7 to 81cda95 Compare July 21, 2026 13:40
Base automatically changed from docs/reorg-readme-sections to main July 21, 2026 14:45
Clarifications and fixes across the role definitions (player, source,
controller, metadata, artwork, visualizer) and the preamble: codec
framing, source format and trust rules, group volume/mute for mixed
and player-less groups, artwork channel and lateness semantics,
metadata clock domain, normative-language boilerplate, and
role-versioning/binary-ID notes.

Core-file changes (connection, messaging, pairing, management) are not
included here and land separately.
Found while implementing the source role.
@maximmaxim345
maximmaxim345 force-pushed the fix/remaining-spec-gaps branch from 228b277 to 75f2cb5 Compare July 21, 2026 15:03

@kahrendt kahrendt 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.

Looks good to me!

Comment thread messaging.md Outdated
Comment thread messaging.md Outdated
Comment thread pairing.md Outdated
Comment thread pairing.md Outdated
Comment thread pairing.md Outdated
Comment thread pairing.md
- `pin_length_unacceptable` (client) - the `pin_length` in [`server/pair-init`](#server--client-serverpair-init) is below the client's `min_pin_length` or outside the 4–12 range
- `pin_mismatch` (client or server) - PAKE key-confirmation failed, or (in dynamic PIN pairing) the PIN binding check failed
- `user_cancelled` (client or server) - operator aborted the pairing
- `user_cancelled` (client) - operator aborted the pairing through a local UI

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.

Why did you remove or server here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I dropped it since this PR also introduces the cancelling server/activate ("A server MAY send such a cancelling server/activate at any point during a pairing attempt", deliberately not touching the lockout counter), so the server has its own cancel path and user_cancelled (server) would be a second overlapping way to do the same thing. Happy to restore it if you see a case the server/activate route doesn't cover.

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.

3 participants