aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/src/meshbay_node/transport
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-10 17:30:22 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-10 17:30:22 +0200
commit6cf21a019963468cb853e5c763ef0097115efa46 (patch)
treeac0fd6261252b744ffdf15f0b100af7fd252d221 /packages/meshbay-node/src/meshbay_node/transport
parentefc93c187dba9027292b51ff0e9caa29349c953e (diff)
downloadmeshbay-6cf21a019963468cb853e5c763ef0097115efa46.tar.gz
refactor(common): delete the sender-key implementation nothing uses
`senderkeys.py` and its 13 tests implemented Signal-style sender keys, and production has never called them: chat is a key per group, per epoch, per device, derived by name. The reasoning that ruled the ratchet out stays where it belongs — in `chatbox.py`, at the top of the module that replaced it — because the argument is the useful part, and it now stands on its own instead of pointing at a file to compare against. Kept code that nothing calls is worse than absent code: it reads as an alternative somebody may reach for, and it has to be maintained past every refactor to stay compiling, which is maintenance spent on a decision already made. The three comments naming `GroupSenderKeyStore` are rewritten to say the thing they were illustrating. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AsoWC3GmhNdwVFomW3QjH3
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node/transport')
-rw-r--r--packages/meshbay-node/src/meshbay_node/transport/webrtc_server.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/packages/meshbay-node/src/meshbay_node/transport/webrtc_server.py b/packages/meshbay-node/src/meshbay_node/transport/webrtc_server.py
index ec7ef5d..2a90bb4 100644
--- a/packages/meshbay-node/src/meshbay_node/transport/webrtc_server.py
+++ b/packages/meshbay-node/src/meshbay_node/transport/webrtc_server.py
@@ -383,12 +383,10 @@ class WebRTCPeerSession:
self._username: str = ""
# This connection's key in the group's peer registry. **Per connection,
# never per account**: one person may hold several devices here, and
- # keying the registry by user_id made the second evict the first — the
- # same "keyed by account where it should be keyed by device" mistake as
- # `pin_identity`'s old INSERT OR REPLACE and as GroupSenderKeyStore's
- # silent overwrite. Symptom was invisible: two devices of one account
- # could not both be connected, and whichever disconnected took the
- # other's chat delivery with it. See docs/chat-sender-keys.md F7.
+ # keying the registry by user_id makes the second evict the first, and
+ # the symptom is invisible: two devices of one account cannot both be
+ # connected, and whichever disconnects takes the other's chat delivery
+ # with it.
self._registry_key: str = uuid.uuid4().hex
# Set from the roster: the key this node pinned for this account. Never
# from the JWT — the hub picks what goes in there.