Repository navigation
refactor: use one canonical name per PSK category - #159
Merged
Merged
Conversation
Collapses the PSK naming variants to one canonical name per category, matching the wire identifiers (long_term_psk, pairing_psk, sendspin-sentinel-psk-v1): Sendspin PSK / long-term Sendspin PSK / per-server PSK / per-pair Sendspin PSK -> long-term PSK Sendspin Pairing PSK / Pairing PSK -> pairing PSK Sentinel PSK -> unchanged Title case is kept where "Pairing PSK" names the pairing method or the Pairing PSK Flow section, consistent with the other method names. Also corrects the long-term PSK definition: it claimed the secret is "shared between a (client, server) pair", but with a shared-PSK record one long-term PSK can authenticate more than one server. No wire change. Fixes #141
This was referenced Aug 20, 2026
maximmaxim345
added a commit
that referenced
this pull request
Aug 20, 2026
Fixes #148. Drops the "Sendspin" prefix term by term per the issue's table: **Server**, **Client**, **Group**, **Stream**, **Identity**, **Pairing Code**, and **Trust Level** in the Definitions block, plus the prefixed body references ("Sendspin group" ×3, "Every Sendspin client and server", "the Sendspin client implements", "a different Sendspin server", and the discovery-chapter opener "Sendspin Servers must support both methods"). ## Kept, per the issue's exceptions - `connection.md:13` and the connection note (`:62`) — "Sendspin client" where the Sendspin client is the WebSocket listener / always the data consumer, so the prefix disambiguates against the WebSocket role. - `connection.md:48` — server discovery text. - The adjective forms: "Sendspin playback" ×3 and "non-Sendspin activity" ×2 in External Source Handling, and the system-name use in `roles/source/v1.md`. ## Coordination with #159 The issue's two PSK rows (Sendspin PSK → long-term PSK, Sendspin Pairing PSK → pairing PSK) are **not** in this PR — they are implemented by #159 (issue #141), as this issue anticipates ("Complete one issue, then remove this row from the other issue"). The two PRs touch adjacent lines of the Definitions block and both regenerate `README.md`, so whichever merges second may need a trivial rebase + `python3 tools/build-readme.py`. ## Verification - Remaining `Sendspin <term>` occurrences in source files are exactly the exception list above — audited by grep. - No wire identifiers, message types, or the `_sendspin._tcp` / `_sendspin-server._tcp` service types touched. - `python3 tools/build-readme.py --check` passes; definition links all target the unchanged `#definitions` anchor. --------- Co-authored-by: Maxim Raznatovski <nda.mr43@gmail.com>
Resolves the Definitions-block and pairing.md conflicts with #162: main's de-prefixed terms (Group, Stream, Identity, Pairing Code, Trust Level) are kept, and this branch's long-term PSK / pairing PSK renames are applied on top. README.md regenerated.
arturpragacz
approved these changes
Aug 24, 2026
1 of 9 tasks
maximmaxim345
added a commit
to Sendspin/aiosendspin
that referenced
this pull request
Oct 5, 2026
# What does this implement/fix? <!-- Quick description and explanation of changes. --> The spec removed trust level and made `psk_category` the only name for it, so `TrustLevel` and `ConnectionSecurity.trust_level` are removed. Use `ConnectionSecurity.psk_category` instead: `PskCategory.LONG_TERM` was trust level `user`, and anything else was `none`. Nothing changes on the wire. The server still accepts a `trust_level` key in `client/hello` from older clients. **Related issue or spec PR (if applicable):** - Sendspin/spec#158 - Sendspin/spec#159 ## 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. --> - [ ] 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` - [x] 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`
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 #141.
Collapses the PSK naming variants to one canonical name per category, matching the wire identifiers (
long_term_psk,pairing_psk,sendspin-sentinel-psk-v1). No wire change; no anchors move.Counts are against current
main, which has moved since the issue was filed (#137, #155), hence the small drift from the issue's table.Method and flow names keep title case
The issue's table maps all "Pairing PSK" to lowercase "pairing PSK". Twelve occurrences, however, use the phrase as the method name or the Pairing PSK Flow section name rather than as a reference to the key — e.g. "clients must implement Pairing PSK", "the Pairing PSK Flow additionally omits...", and the
### Pairing PSK Flowheading itself. These keep title case, consistent with how the other method names (Dynamic Pairing Code, Static Pairing Code) are treated since #137. Key references are lowercase throughout. Settled in review: the method and flow names stay title case, so all twelve are left as they are.Correction included
The long-term PSK definition claimed the secret is "shared between a (client, server) pair"; with a shared-PSK record one long-term PSK can authenticate more than one server. The erroneous clause is deleted (nothing new is asserted):
"Distinct from the per-pair Sendspin PSK that pairing produces" in the pairing PSK entry likewise becomes "Distinct from the long-term PSK that pairing produces", and the two
per-server PSKreferences inmanagement.mdbecome long-term PSK (the stored-pubkey record's binding to aserver_idalready conveys the per-server relationship).The same framing appeared a second time, in the
client/pair-finalizedescription ("Delivers the long-term PSK for this (client, server) pair"), and is corrected the same way: "Delivers the long-term PSK established by this pairing." No occurrence of the per-pair claim is left.Small cleanups in passing
pairing.md: "in the Pairing PSK flow" → "in the Pairing PSK Flow" (the one lowercase-"flow" holdout against the title-case convention).connection.md: the category list "(long-term, Pairing, Sentinel)" becomes "(long-term, pairing, Sentinel)". The issue cites this parenthetical as the place the category names already exist, so it should spell them the way the prose now does.pairing.md: the five prose references to "the new PSK" become "the new long-term PSK" (the reveal rule, the three sequence-diagram notes, and the wrapping summary). All three PSKs are in play in a pairing flow, so the one that pairing produces is now named.Verification
python3 tools/build-readme.py --checkpasses (README regenerated; all links resolve).Sendspin PSK,Sendspin Pairing PSK,per-pair, orper-server PSKin the source files.