Ivan FB fcd705e487
feat: rebuild the embedded transport on reliable channels
EmbeddedLogosDelivery now drives waku-bindings' LogosDeliveryCtx over the
reliable channels API (channel_create/channel_send + onChannelMessageReceived)
instead of the hand-written FFI, which is deleted (~1050 lines, including a
byte-identical duplicate build.rs). Each conversation maps to one SDS channel.

The node runs on a dedicated thread that is the sole caller of the ctx, with
DeliveryService methods handing it commands over a queue. Every ctx call is
blocking, and issuing one from libchat's inbound-draining thread — which
subscribes while processing a received frame — wedges, because the call is
made downstream of the node's own event dispatch. Serialising on one thread,
decoupled from the caller and the callback, is what the previous transport did
for the same reason, and it restores two-party delivery (join went from a
deterministic hang to reliable; a message sent in an established conversation
is received and displayed by the peer).

chat-cli derives the node's storage path from its data dir: SDS state is a
process-wide singleton keyed on that path, so two instances sharing it would
each read the other's causal history and drop messages as replays.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ai43sF2rymPFMG9iki9fwL
2026-07-18 17:31:15 +02:00
..