feat(cluster): RFC 010 c5 — handshake as a pure state machine

Frames in, actions out — no IO, no clocks, no actors; the c6 connection
actor will drive it. Initiator (dial: emit Hello, interpret the single
response) and Responder (accept: judge the first frame) as consuming-self
machines; check order proto -> hash -> name -> tie-break. Driver-supplied
HelloCtx carries the two facts the pure machine cannot know (name claimed,
own dial in flight). Tie-break ratified as a wire fact: the smaller name's
dial survives; the losing inbound closes silently (both ends compute the
same verdict, no reject frame needed). Peer's own name offered => NameTaken.
build_hash is config-supplied; derivation lands with c6.
This commit is contained in:
claude
2026-08-14 17:17:14 +00:00
parent 8a9e2b81b1
commit 9e49038474
3 changed files with 425 additions and 1 deletions
+3 -1
View File
@@ -2,7 +2,9 @@
//!
//! c1: feature flag + optional deps. c2: the owned envelope. c3: the
//! transport trait (control connection), framed codec, and the TCP +
//! loopback impls. Everything above them lands in later chunks.
//! loopback impls. c5: the handshake state machine. Everything above them
//! lands in later chunks.
pub mod envelope;
pub mod handshake;
pub mod transport;