Skip to content

feat(protocol): SessionManager — stream-session lifecycle (stream slice 3b) - #1263

Merged
joelteply merged 1 commit into
canaryfrom
feat/stream-plane-session-mgr
Jun 20, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/stream-plane-session-mgr

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

What

The stateful SessionManager over the slice-1/2 crypto core (#1261): drives the Ed25519-authenticated X25519 handshake, holds a live StreamSession per peer, seals/opens frames. No I/O — pure state machine (begin_handshake/on_init/on_resp produce+consume HandshakeInit/Resp; seal_for/open_from over the session). The caller (a future SessionTransport<T>) carries the bytes; keeping the lifecycle I/O-free makes it exhaustively testable apart from transport plumbing.

Additive — zero transport-reliability risk

Nothing wires this into the live transport yet, so SignedTransport/LanTcp control path is byte-for-byte unchanged. Announced on airc; lanes deconflicted with BigMama (she's on route-health/connection reliability; this is session-crypto).

Tests (4) + 87 airc-protocol green, clippy clean

full handshake→seal/open both ways · NoSession before handshake · on_resp without a pending handshake rejected · unenrolled initiator rejected (trust gate flows through the manager).

Next — slice 3c (the wire integration, coordinated)

SessionTransport<T> in airc-transport: auto-orchestrate the handshake over the wire + dispatch on crypto_mode, for the UDP/WebRTC adapters. That's the live-path change — to land once BigMama's transport-reliability work settles + she's current on branches.

🤖 Generated with Claude Code

The stateful manager over the slice-1/2 crypto core: drives the
Ed25519-authenticated X25519 handshake, holds a live StreamSession per peer,
seals/opens frames. NO I/O — pure state machine (begin_handshake/on_init/on_resp
produce+consume HandshakeInit/Resp; seal_for/open_from over the session). The
caller (a future SessionTransport<T>) carries the bytes; keeping the lifecycle
I/O-free makes it exhaustively testable apart from transport plumbing.

ADDITIVE: nothing wires this into the live transport yet, so the SignedTransport/
LanTcp control path is byte-for-byte unchanged — zero risk to the transport
reliability BigMama is hardening in parallel (announced on airc; lanes
deconflicted — she's on route-health, this is session-crypto).

4 tests: full handshake→seal/open both ways, NoSession before handshake,
on_resp without a pending handshake rejected, unenrolled initiator rejected
(trust gate flows through the manager). 87 airc-protocol tests green, clippy clean.

Next (slice 3c): SessionTransport<T> in airc-transport — auto-orchestrate the
handshake over the wire + dispatch on crypto_mode, for the UDP/WebRTC adapters.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@joelteply
joelteply merged commit 7e01d86 into canary Jun 20, 2026
10 of 12 checks passed
@joelteply
joelteply deleted the feat/stream-plane-session-mgr branch June 20, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant