logos-delivery/logos_delivery
Ivan FB f332c130ed
feat(channels): add channelExists to reliable channels API
Callers need to know whether a channel is open before create/send, and
had no way to ask without inferring it from a "channel already exists"
error. Exposed at both layers so FFI consumers get the same answer.

"Exists" means currently held by the manager, i.e. between a successful
createReliableChannel and closeChannel. Persisted SDS state outlives a
close, so a closed channel reports false -- this is a liveness check,
not a "was this channel ever created" check.

Cherry-picked from chore/channel-exists, which forked before the nim-ffi
0.2.0 migration. The FFI proc is re-expressed in the typed model, which
also lets it carry a real bool instead of a "true"/"false" string; the
hand-written header hunk is dropped since that header is generated now.

Closes #4039

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 17:52:27 +02:00
..