From 2baebeebecd1c1a201d1ce5649ab5d0e04c3617b Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Thu, 10 Sep 2026 18:54:22 +0200 Subject: docs(node): the ack comment described scalars that are gone MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The handshake ack's app-directories entry still said "the same three answers in one shape" and "the scalars above are derived from these and kept for MNP 1.0 clients". Neither is true since the per-app ops were folded into one: there are no scalars above, and a 1.0 client cannot reach this code at all — the floor moved to 3.0 with the lease flag day. A comment that contradicts the code beside it is worse than no comment, because one of them is wrong and the reader cannot tell which. This is the same fault the leaseless-bound comment had, one commit earlier. What it says instead is what is actually load-bearing: `_directories` is the only form on the wire, and `chat_directory` below is safe as a second name for one of them because `_app_directories_ctx` derives it on every build rather than storing it alongside — which is precisely what the removed scalars did not do. daemon.py had the same stale reference three lines from the code that produces these, pointing at `video_root` for the shape a per-group signed setting takes. Comments only; no behaviour change. Node suite green. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01YVoHVCcfBqud6ZjG4db3y7 --- packages/meshbay-node/src/meshbay_node/daemon.py | 2 +- .../src/meshbay_node/transport/webrtc_server.py | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'packages/meshbay-node') diff --git a/packages/meshbay-node/src/meshbay_node/daemon.py b/packages/meshbay-node/src/meshbay_node/daemon.py index 5036803..966dc69 100644 --- a/packages/meshbay-node/src/meshbay_node/daemon.py +++ b/packages/meshbay-node/src/meshbay_node/daemon.py @@ -433,7 +433,7 @@ class NodeDaemon: # Whether TMDB lookups run for this group at all — # per-group (2026-08-24, used to be node-wide), same # "read once, kept current in place by the signed op" - # shape as video_root above. + # shape as the app directories above. "tmdb_enabled": await self._roster.tmdb_enabled( group_cfg.id) if self._roster else True, # Music app equivalent of tmdb_enabled — per-group from 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 b2374d3..54f1541 100644 --- a/packages/meshbay-node/src/meshbay_node/transport/webrtc_server.py +++ b/packages/meshbay-node/src/meshbay_node/transport/webrtc_server.py @@ -885,12 +885,18 @@ class WebRTCPeerSession: # fields above. No language field: MusicBrainz search doesn't # take one the way TMDB does. "musicbrainz_enabled": bool(self._group_ctx().get("musicbrainz_enabled", True)), - # The same three answers in one shape, plus every other app's — - # `_directories`, keyed by the app's registry name, always a - # list. The scalars above are derived from these (daemon.py's - # `_app_directories_ctx`) and kept for MNP 1.0 clients, which can - # represent one folder and never more. A client reading the plural - # form gets all of them. + # Every app's configured folders — `_directories`, keyed by + # the app's own registry name, always a list. Built by daemon.py's + # `_app_directories_ctx`, and the only form on the wire: the + # `video_root` / `audio_root` / `photo_roots` scalars that used to + # ride here are gone. One folder was never the general case, and two + # spellings of one answer meant whichever the reader consulted first + # decided it. + # + # `chat_directory` below is the one surviving second name, and it is + # safe for the reason those were not: it is *derived* from this list + # on every build rather than stored beside it, so the two cannot + # drift apart. **{f"{app}_directories": list(self._group_ctx().get(f"{app}_directories") or []) for app in ("video", "music", "photo", "chat")}, -- cgit v1.2.3