diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-19 02:12:47 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-19 02:12:47 +0200 |
| commit | 20a824118c09af15d6c338db4c9480ffe5cbcdb6 (patch) | |
| tree | 39fa0c2056b12e3423eefe0cda78cf160ce17131 /packages/meshbay-common/src/meshbay_common | |
| parent | cc0820de8d8c33560c44bd6a0864de30e33a0109 (diff) | |
| download | meshbay-20a824118c09af15d6c338db4c9480ffe5cbcdb6.tar.gz | |
docs: cite MESHBAY_DESIGN.md and a section instead of the merged notes
The per-feature design notes were merged into docs/MESHBAY_DESIGN.md and
deleted from the tree on 2026-09-11, but ~230 comments across the three
packages still named them — usually written `docs/musicbay.md §3.2`, as
though the file were still in docs/. A reader had to know §16 existed to
resolve any of them. They now name the section directly.
Every mapping comes from §16, the concordance, which already records where
each old section landed: musicbay -> §9.8, mediacenter -> §9.7 for the
Videos app and §6.5 where the subject is derived data, photos -> §9.9,
auth-confirm -> §3.6, refactoring-search -> §9.11, invite-pairing-v1 ->
§3.4, per-node-identity-v1 -> §3.2, captcha -> §7.7, chat-sender-keys ->
§4.5, apps/refactor-groups -> §9.1–§9.4, desktop-client-v1 per section.
Bare citations of the same documents (`draft-v6 §2.11`, `§4.8`, `§3.4`)
are retargeted too: those collide with real section numbers in the design
document, so leaving them would have been worse than the named form.
Four cases the concordance does not cover, each decided rather than guessed:
Sub-item references into documents that no longer exist — mediacenter's
`§3.3 row 4`, `§3.4b/c`, `apps.md §3b` — name rows and sub-items §9.7 and
§9.2 do not reproduce. The module-level citation stays; the sub-item
pointer is dropped.
The V-findings keep their labels but lose the dead `§10.1/` prefix.
§13.8 lists V1–V13 as per-application open items, which is not what the
labels mean in these comments, so pointing them at §13.8 would have been
a false citation.
`apps.md §5`'s virtualization requirement has no counterpart anywhere in
the design document. The requirement is stated in the comment itself, so
the citation is dropped rather than aimed at a section that does not say
it.
Comments that attributed a *sentence* to an old note — musicbay's "several
thousand files" example, its "what got measured" note, its measured
~11%/~26% cover-art figures, the "original no root, whole shared tree"
call — state the fact without attribution now. §9.8 does not contain those
sentences and citing it for them would have been wrong.
CLAUDE.md's "a reference to a document that no longer exists" row now says
the concordance is for git history and out-of-tree material; the code cites
sections directly.
Verified: 2851 passed, 4 skipped. The 12 errors in the run are the Firefox
leg of test_sticky_header.py's browser harness, which is broken at the
browser level on this machine — headless Firefox (snap) dies with
`[GFX1-]: RenderCompositorSWGL failed mapping default framebuffer`, renders
nothing, and the probe exits `{"error": "no measurement"}` after its full
90s wait. Chrome runs the same 12 assertions in 3.2s and passes. Nothing
here can affect it: every changed line in style.css is inside a comment.
Also checked: ast.parse on every changed .py, `node --check` on every
changed .js, the /* */ balance in style.css, and that no changed line
exceeds the width its file already used.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-common/src/meshbay_common')
6 files changed, 26 insertions, 25 deletions
diff --git a/packages/meshbay-common/src/meshbay_common/__init__.py b/packages/meshbay-common/src/meshbay_common/__init__.py index c5b0279..1d857fd 100644 --- a/packages/meshbay-common/src/meshbay_common/__init__.py +++ b/packages/meshbay-common/src/meshbay_common/__init__.py @@ -26,7 +26,8 @@ __version__ = "0.14.0" # older client simply never sends/handles the new pair. # 0.8: added `artist`/`album`/`track_no` to `IndexEntry`, and # `musicbrainz_config`/`_ack`, `musicbrainz_enabled`/`_ack`, -# `music_meta_req`/`_resp`, for the Music group app (docs/musicbay.md). +# `music_meta_req`/`_resp`, for the Music group app +# (docs/MESHBAY_DESIGN.md §9.8). # Same shape as 0.5-0.7's Videos additions, and reuses `duration`/ # `thumb_hash`/`display_title` rather than declaring new ones. Additive: # an older client simply doesn't render the new fields or send the new @@ -38,29 +39,29 @@ __version__ = "0.14.0" # client never sends the request, and simply can't play those two formats, # same as before this existed. # 0.10: added `audio_root`/`_ack` — the Music app's own entry point, same -# shape as `video_root`/`_ack`. Reverses musicbay.md's original "no root, -# whole shared tree" call: a real messy library showed that call was -# wrong, and Music now requires one before showing/enriching anything, -# exactly like Videos. Additive at the protocol level: an older client -# never sends the op and never expects the field. +# shape as `video_root`/`_ack`. Reverses the original "no root, whole +# shared tree" call: a real messy library showed that call was wrong, and +# Music now requires one before showing/enriching anything, exactly like +# Videos (docs/MESHBAY_DESIGN.md §9.8). Additive at the protocol level: an +# older client never sends the op and never expects the field. # 0.11: added `taken_at`/`camera` to `IndexEntry` (best-effort, from a photo's # own EXIF block) and `photo_roots`/`photo_roots_ack`, for the Photos group -# app (docs/photos.md). Unlike `video_root`/`audio_root`, `photo_roots` is a -# *set*, replaced whole in one signed op — a photo library is routinely -# scattered across several folders, not one. Additive: an older client +# app (docs/MESHBAY_DESIGN.md §9.9). Unlike `video_root`/`audio_root`, +# `photo_roots` is a *set*, replaced whole in one signed op — a photo library +# is routinely scattered across several folders, not one. Additive: an older client # never sends the op and never expects either field. # 0.12: added `link_preview_req`/`link_preview_resp` — the node unfurls a URL # pasted in chat into an OpenGraph card. Additive: an older node logs "unknown # type" and the client just shows the bare link, as it always did. # 0.13: added `tmdb_rematch`/`tmdb_rematch_ack` — an operator dropping one # file's cached TMDB match so it re-resolves with the current matcher -# (§10.1/V13). Additive: an older node logs "unknown type", the client's +# (V13). Additive: an older node logs "unknown type", the client's # button just does nothing. # 0.14: added an optional `bundle_enc_recovery` field on `keypair_bundle_store` # and `keypair_bundle_resp` — a second copy of the identity bundle wrapped # under the account's recovery key, so a forgotten passphrase does not strand -# the identity (docs/auth-confirm.md §4.3). Additive: an older node ignores the -# field on store and never returns one; an older client never sends it. +# the identity (docs/MESHBAY_DESIGN.md §3.6). Additive: an older node ignores +# the field on store and never returns one; an older client never sends it. # 0.15: `file_chunk` and `index_sync` had forked between the transports — WebRTC # sent binary, unsigned chunks and plain index entries, QUIC sent base64 chunks # with a per-chunk Ed25519 signature and a `GroupIndex.serialize()` envelope. One diff --git a/packages/meshbay-common/src/meshbay_common/adminop.py b/packages/meshbay-common/src/meshbay_common/adminop.py index 3e9fe11..20b5080 100644 --- a/packages/meshbay-common/src/meshbay_common/adminop.py +++ b/packages/meshbay-common/src/meshbay_common/adminop.py @@ -63,7 +63,7 @@ OP_SET_SCAN_SETTINGS = "set_scan_settings" # shown before signing names the outcome and not the operation. OP_TRANSFER_LIMITS = "transfer_limits" # Whether the node uses the operator's own API token/language instead of the -# shipped default — node-wide (docs/mediacenter.md §5.5), one credential +# shipped default — node-wide (docs/MESHBAY_DESIGN.md §9.7), one credential # shared by every group. Signed like the rest: it turns on outbound # third-party network traffic that did not exist before the Videos app # (§8) — an unsigned change would let any member alter egress the operator @@ -119,7 +119,7 @@ OP_GROUP_ATTACH = "group_attach" OP_GROUP_DETACH = "group_detach" # OP_GEK_BUNDLE_STORE is gone. Members no longer hand the node key material at # all: the node holds the GEK and wraps it itself, for a key the recipient proved -# they hold (see `join.py` and docs/invite-pairing-v1.md). The operation existed +# they hold (see `join.py` and docs/MESHBAY_DESIGN.md §3.4). The operation existed # only to make member-supplied bundles safe, and deleting the message is a # stronger guarantee than authorizing it. diff --git a/packages/meshbay-common/src/meshbay_common/chatbox.py b/packages/meshbay-common/src/meshbay_common/chatbox.py index 740e829..f0534fa 100644 --- a/packages/meshbay-common/src/meshbay_common/chatbox.py +++ b/packages/meshbay-common/src/meshbay_common/chatbox.py @@ -1,7 +1,7 @@ """ Chat message encryption and sender authentication. -Design A of `docs/chat-sender-keys.md`, decided 2026-09-07. What it is, and what +Design A of `docs/MESHBAY_DESIGN.md` §4.5, decided 2026-09-07. What it is, and what it deliberately is not, in the order the decisions were made: **Not a ratchet, and not sender keys.** With per-sender chains distributed under diff --git a/packages/meshbay-common/src/meshbay_common/device.py b/packages/meshbay-common/src/meshbay_common/device.py index cfa8dd6..3a598d0 100644 --- a/packages/meshbay-common/src/meshbay_common/device.py +++ b/packages/meshbay-common/src/meshbay_common/device.py @@ -27,7 +27,7 @@ Fields are length-prefixed and domain-separated, per L4 — the same rule as of the connection carrying the message, so neither signature can be lifted onto another connection, and `node_pk` binds an authorization to one node. -See `docs/desktop-client-v1.md` §4. +See `docs/MESHBAY_DESIGN.md` §3.3. """ from __future__ import annotations diff --git a/packages/meshbay-common/src/meshbay_common/join.py b/packages/meshbay-common/src/meshbay_common/join.py index 6ee543f..84ea18a 100644 --- a/packages/meshbay-common/src/meshbay_common/join.py +++ b/packages/meshbay-common/src/meshbay_common/join.py @@ -11,7 +11,7 @@ from the hub and wrap the group key for whatever came back. The hub is the key directory, so a hub answering with its own key was handed the GEK by an honest inviter following the protocol exactly. The key now comes from the peer over an authenticated channel and is bound to an identity by a one-time pairing code the -hub never sees. See `docs/invite-pairing-v1.md`. +hub never sees. See `docs/MESHBAY_DESIGN.md` §3.4. Fields are length-prefixed and domain-separated, per L4 — the same rule as `handshake.py` and `adminop.py`. `nonce_node` is the handshake nonce the node just diff --git a/packages/meshbay-common/src/meshbay_common/protocol.py b/packages/meshbay-common/src/meshbay_common/protocol.py index c3cb099..c444711 100644 --- a/packages/meshbay-common/src/meshbay_common/protocol.py +++ b/packages/meshbay-common/src/meshbay_common/protocol.py @@ -69,11 +69,11 @@ class MNP: # never once invoked. A live handler on both transports, plaintext media, # and no client: removed rather than repaired. # - # Not a Double Ratchet message, and never was — `first-review.md` C1 - # rejected exactly that for groups. Since MNP 2.0 it is AES-256-GCM under a + # Not a Double Ratchet message, and never was — finding C1 + # (`docs/MESHBAY_DESIGN.md` §13.1) rejected exactly that for groups. Since MNP 2.0 it is AES-256-GCM under a # per-device subkey of the group's chat epoch key, signed over the # ciphertext with the sending device's pinned Ed25519 key. There is no - # plaintext form on the wire (`chatbox.py`, docs/chat-sender-keys.md); + # plaintext form on the wire (`chatbox.py`, docs/MESHBAY_DESIGN.md §4.5); # `format` distinguishes a *stored* pre-2.0 row, which is still served. CHAT_MESSAGE = "chat_msg" # one chat message, sealed and signed CHAT_ATTACHMENT = "chat_attach" # attachment metadata @@ -136,7 +136,7 @@ class MNP: GEK_BUNDLE_RESP = "gek_bundle_resp" # node → client: wrapped GEK bundle KEYPAIR_BUNDLE_STORE = "keypair_bundle_store" # client → node: store encrypted keypair bundle # optional `bundle_enc_recovery` (MNP 0.14): a second copy wrapped under the - # account's recovery key (docs/auth-confirm.md §4.3) + # account's recovery key (docs/MESHBAY_DESIGN.md §3.6) KEYPAIR_BUNDLE_FETCH = "keypair_bundle_fetch" # client → node: request own keypair bundle KEYPAIR_BUNDLE_RESP = "keypair_bundle_resp" # node → client: encrypted keypair bundle # carries `bundle_enc_recovery` too when the node has one stored @@ -178,9 +178,9 @@ class MNP: TMDB_OVERRIDE_ACK = "tmdb_override_ack" TMDB_REMATCH = "tmdb_rematch" # operator → node: drop one file's match TMDB_REMATCH_ACK = "tmdb_rematch_ack" - # Music app (docs/musicbay.md). Contact is derived from the owner's hub - # email at login — no config/ack pair needed. Only the per-group toggle - # remains. + # Music app (docs/MESHBAY_DESIGN.md §9.8). Contact is derived from the + # owner's hub email at login — no config/ack pair needed. Only the + # per-group toggle remains. MUSICBRAINZ_ENABLED = "musicbrainz_enabled" # operator → node: enable/disable MUSICBRAINZ_ENABLED_ACK = "musicbrainz_enabled_ack" # node → this group: new enabled state MUSIC_META_REQ = "music_meta_req" # client → node: metadata for a path @@ -268,7 +268,7 @@ class MNP: # below, which is the operator's view of the whole node: this is scoped to # one group and answers any member of it, because the point is that a member # verifies another member's device *for themselves* rather than trusting the - # node's `sender_id` (Tier 2, docs/desktop-client-v1.md §4.8). + # node's `sender_id` (Tier 2, docs/MESHBAY_DESIGN.md §3.3). GROUP_ROSTER_REQ = "group_roster_req" GROUP_ROSTER_RESP = "group_roster_resp" ROSTER_READ = "roster_read" # operator → node: list pinned identities + members |