OverviewFilesCommitsIssuesDocsReleasesPeers

hyperswarm-peer commits / bda998f

docs: what retiring session-daemon actually needs, and why not here
hyper-games #73 NEXT item 9. Reading daemon/session_daemon.h instead of assuming its shape: session-daemon is NOT Blender-specific and holds no logic. It exposes one Protomux channel on one topic to a local socket and moves opaque frames both ways; grab arbitration lives in blender-bridge/session/grab.py. So swarmd already supersedes it at the transport level, and that is measured rather than argued — test_channel_e2e.py carries a frame between two daemons over a named channel on a shared topic on the public DHT, which is session-daemon's whole job, plus buffering, truthful backpressure, client ids and a generated wire. What remains is a CLIENT change: the addon writes raw frames at a socket and would instead say HELLO / SWARM_JOIN / CHANNEL_OPEN / SEND and read on-message. Payloads stay opaque. ⛔ Which is why design step 5 — the C++ client library — comes first, and not as bookkeeping. A Python client means hand-writing swarmd's wire in the addon, and this session watched that exact mistake twice already: the first channel gate hand-rolled compact-encoding and the daemon answered "undecodable message" to every frame. Rebuilding it inside the addon puts it where it is hardest to test. ⚠ And it cannot be verified here: there is no Blender binary on tabertron (searched /storage, /opt, /usr, flatpak and snap; blender-source is a source tree with no build). Every blender-bridge gate runs `blender --background`, so an addon port made on this machine would be an unexercised path by construction. Steps 1-4 are marked done in §9; 5 and 6 are not, and the order between them is now written down with its reason. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
bda998ff3b9fb7732b149751f6e566a4619aad25
by plankatron <fleeky@gmail.com> · 2026-09-10T19:55:04.000Z

Changed files (1) +38 -6

docs/SWARMD-DESIGN.md +38 -6
……@@ -141,12 +141,44 @@ the products never use.
141141
142142## 9. Order
143143
1441. `libcompact` replaces `src/compact_encoding.h` — useful alone, no schema needed
1452. define the schema; generate structs (`hyperschema-c`) and RPC (`hrpc-c`)
1463. the daemon skeleton: threads, UDS, per-client buffering (§4)
1474. control plane, then channels, then content
1485. the C++ client library
1496. port the Blender addon off `session-daemon`, and retire it
1441. ✅ `libcompact` replaces `src/compact_encoding.h` — useful alone, no schema needed
1452. ✅ define the schema; generate structs (`hyperschema-c`) and RPC (`hrpc-c`)
1463. ✅ the daemon skeleton: threads, UDS, per-client buffering (§4)
1474. ✅ control plane, then channels, then content
1485. ⏳ the C++ client library
1496. ⏳ port the Blender addon off `session-daemon`, and retire it
150
151### 9.1 What step 6 actually is (2026-09-10)
152
153Reading `daemon/session_daemon.h` rather than assuming: **session-daemon is not
154Blender-specific and holds no logic.** It exposes ONE Protomux channel on ONE
155topic to a local socket and moves opaque length-prefixed frames both ways; grab
156arbitration lives in `blender-bridge/session/grab.py` with its own gates. Its
157header says so, and it is right.
158
159So swarmd already supersedes it at the transport level, and that is measured
160rather than assumed: `test/test_channel_e2e.py` carries a frame between two
161daemons over a named protocol channel on a shared topic, on the public DHT —
162which is session-daemon's entire job, plus per-client buffering, truthful
163backpressure, client ids and a generated wire.
164
165**What remains is a CLIENT change, not a daemon change.** The addon writes raw
166frames at a socket; against swarmd it must say HELLO, SWARM_JOIN, CHANNEL_OPEN
167and then SEND, and read `on-message` events. The frame payloads do not change —
168they stay opaque.
169
170⛔ WHICH IS WHY STEP 5 COMES FIRST, and not as bookkeeping. A Python client
171means hand-writing the wire in Python, and this session already watched that
172fail twice: the first channel gate hand-rolled compact-encoding and the daemon
173answered "undecodable message" to every frame, and the fix was to drive
174`tools/swarmd-probe`, which uses the generated encoders. Porting the addon by
175hand-writing swarmd's wire in the addon would rebuild that mistake in the place
176it is hardest to test.
177
178⚠ And it cannot be verified here: **there is no Blender binary on tabertron**
179(searched /storage, /opt, /usr, flatpak, snap; `blender-source` is a source tree
180with no build). Every blender-bridge gate runs `blender --background`. An addon
181port made here would be an unexercised path by construction.
150182
151183⚠ Open decision: whether `swarmd` lives in hyperswarm-peer (where its includes
152184are, making it that repo's first product rather than a library) or its own repo.