Repository navigation
refactor: move normative requirements out of Note blocks into body text - #161
Merged
Merged
Conversation
A **Note:** block reads as an omittable comment, but 14 of the spec's
30 notes carried BCP 14 keywords (MUST, SHOULD, MAY, ...). Each of
those notes is relocated into body text; keywords stay uppercase and
wording is otherwise unchanged except where noted:
- The shutdown-reason note folds into the `shutdown` reason bullet in
client/goodbye ("send `shutdown`" becomes "send this reason").
- The two adjacent volume notes in roles/player/v1.md (loudness curve,
click ramp) join into one body paragraph.
The 16 remaining notes are comments only: no **Note:** block contains
an uppercase BCP 14 keyword any more. Notes stating requirements with
lowercase keywords are left for the general keyword pass (#100).
Fixes #147
Refs #100
This was referenced Aug 20, 2026
maximmaxim345
approved these changes
Aug 20, 2026
maximmaxim345
left a comment
Member
There was a problem hiding this comment.
Looks good! Noticed that some other notes that don't use the RFC style wording can also benefit from such a pass. I'll open a separate follow up PR for that.
Thanks @chrisuthe !
chrisuthe
added a commit
that referenced
this pull request
Aug 21, 2026
Resolves the roles/source/v1.md conflict with #161: keep the promoted (non-Note) format-announcement sentence from main and apply the client-stream/start rename to it. README.md regenerated.
maximmaxim345
added a commit
that referenced
this pull request
Aug 24, 2026
…rule (#163) Fixes #150. _Revised after review: names are now `client-stream/*`, per the [final discussion on #150](#150 (comment)). The issue body still shows the superseded `stream/client-*` form._ ## Change 1: `client_stream/*` → `client-stream/*` `client_stream/start` → `client-stream/start`, `client_stream/end` → `client-stream/end`. The underscore goes; the messages keep their own prefix rather than joining `stream/`, because server→client and client→server binary channels are independent and have separate lifetimes. All 18 occurrences are in `roles/source/v1.md`; the two section headings move with their anchors and in-file links are updated (build-verified). No other file links to these sections. **⚠️ Breaking:** these two message types change on the wire for clients implementing the `source` role. No other message type changes. ## Change 2: the prefix rule Added to the Communication section of `messaging.md`, directly after the `type`/`payload` paragraph: > **Message type prefixes.** The prefix before the `/` in a message `type` identifies a group of messages. `client/` and `server/` name the sender. `stream/` groups the messages that control a binary channel from the server to the client, and `client-stream/` those that control a binary channel from the client to the server; the two kinds of channel are independent and have separate lifetimes. `group/`, `management/`, `pair/`, and `noise/` name a subject. A message outside the `client/` and `server/` groups can flow in either direction; each message's definition gives its direction. The closing sentence is what places `stream/request-format` (client-sent, but controlling the server→client channel) correctly. Body text rather than a `**Note:**`, in keeping with #147. ## Coordination #161 (open) touches `roles/source/v1.md` on one of the same lines (the promoted format-announcement note). Whichever merges second needs a trivial rebase + README rebuild — happy to do that on this side. ## Verification - Zero `client_stream` or `stream/client-` occurrences remain in any source file. - `python3 tools/build-readme.py --check` passes — the renamed headings' anchors and all links to them resolve. --------- Co-authored-by: Maxim Raznatovski <[email protected]>
maximmaxim345
added a commit
that referenced
this pull request
Aug 24, 2026
The keyword pass in #147 covered notes carrying uppercase BCP 14 keywords. Seven notes were left stating requirements with a lowercase keyword or no keyword at all, so a reader could still not safely skip a note. Promoted to body text with an uppercase keyword: - The audio-codec and image-format support requirements in roles/player/v1.md and roles/artwork/v1.md, now matching the roles/source/v1.md twin that #161 already promoted. - The role-removal ordering rule in messaging.md, which had no keyword (MUST). - Image scaling in roles/artwork/v1.md, the only statement of that server behavior anywhere in the spec (MUST). - The lead-time and buffer reporting guidance in roles/player/v1.md (SHOULD, and MUST NOT for the output_delay_ms exclusion). Reworded to read as comments, requirement dropped: - The two stream/request-format notes ("clients should use" becomes "clients can use"). Also drops the double blank line left in client/goodbye when the shutdown note was folded into its reason bullet. Refs #100
kahrendt
pushed a commit
that referenced
this pull request
Aug 24, 2026
Follow-up to #161, which relocated the 14 `**Note:**` blocks carrying uppercase BCP 14 keywords (#147). Some notes that do not use the RFC style wording benefit from the same pass: they state a requirement with a lowercase keyword or with no keyword at all, so a reader still cannot safely skip a note. Refs #100. Two moves, decided per note. ## Promoted to body text with an uppercase keyword - The audio-codec and image-format support requirements in `roles/player/v1.md` and `roles/artwork/v1.md`. #161 promoted the `roles/source/v1.md` twin, so this class of requirement was body text in one role file and a lowercase note in two others. All three now match. - The role-removal ordering rule in `messaging.md`, which had no keyword at all (now MUST). #147 notes that moving this one is not sufficient. - Image scaling in `roles/artwork/v1.md` (now MUST). This is the only statement of that server behavior anywhere in the spec, so the requirement lived solely inside a note. The channel-numbering half of the note stays a note. - The lead-time and buffer reporting guidance in `roles/player/v1.md` (SHOULD, and MUST NOT for the `static_delay_ms` exclusion). It sits directly above the Server behavior list that governs the same fields. ## Reworded so they read as comments - The two `stream/request-format` notes, in `messaging.md` and `roles/player/v1.md`: "clients should use" becomes "clients can use". Purely advisory. The two copies are kept because they sit at different scopes, the generic message and the player-specific object, matching how the role files already restate codec details independently. ## Left alone `connection.md` has two bare-imperative notes ("Do not manually connect to servers if you are advertising `_sendspin._tcp`"). Both are one direction of the exclusivity MUST at the top of that section, so the rule is already stated normatively and the notes read as practical reminders. Notes carrying a lowercase "may" in `messaging.md` (the `?` notation, and per-version support objects) define notation and naming rather than granting permission, with the requirements stated separately nearby. ## Verification Every remaining `**Note:**` block in the source files is a comment with no requirement-shaped wording. `python3 tools/build-readme.py --check` passes.
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.
Fixes #147. Refs #100.
Relocates all 14
**Note:**blocks carrying BCP 14 keywords into body text, per the issue's list (located by content — line numbers had drifted with #137/#155). Keywords stay uppercase; wording is untouched except for the two integrations below. The issue's mechanical test now passes: no**Note:**block contains an uppercase BCP 14 keyword (16 comment-only notes remain).Straight promotions (11)
The
**Note:**marker is dropped and the paragraph stands as body text in place — each already sat adjacent to the content it governs:connection.md×2 — TXTname/ hello-name agreement (client and server sections)messaging.md×4 — minimal activity set; MAY-omit-role;server/stateasymmetry (clients MAY resend unchanged fields); disconnect-without-goodbye handling incl. the reconnect-backoff SHOULD NOTroles/player/v1.md×2 — volume/mute independence (MUST NOT clear mute); initial format selection (SHOULD/MAY)roles/source/v1.md×3 — servers MUST support all codecs; SHOULD accept the announced source format; source-timestamp handling (SHOULD/SHOULD NOT)Integrations (3 notes → 2 places)
Per the issue's "write the new text again — do not only move it":
shutdownnote folds into theshutdownreason bullet inclient/goodbye, matching the style of the other reason bullets (which already carry normative sentences). "clients SHOULD sendshutdown" becomes "clients SHOULD send this reason" now that it sits inside the bullet defining it.roles/player/v1.md(perceived-loudness curve + click ramp) join into one body paragraph; both sentences govern the same behavior.Left alone, deliberately
Notes stating requirements with lowercase keywords (
roles/player/v1.md"Servers must support…",roles/artwork/v1.md, and the keyword-free server requirement in the role-removal note) are outside this issue's mechanical test and belong to the general keyword pass in #100, as the issue states.Verification
python3 tools/build-readme.py --checkpasses.