Extract the deferred AlknetClient as a new crate alknet-client — the client-side analogue of AlknetEndpoint. Three dial methods (QUIC + TCP+TLS via TlsClientConfig, iroh via key) produce a Connection for CallClient::spawn_dispatch / ChannelClient::from_connection to consume. The deferral collapsed because ADR-086 gave the native endpoint type three dial shapes within one endpoint type, ADR-087 broke the circular hedge, and ADR-083 gave the server-side shape to mirror by symmetry. Names the three concept layers that were tangled throughout the initial development (deployment role / establishment side / ALPN-level category) so the fix is legible. Names alknet/register as a dialable entry-point ALPN (native registration, parallel to HTTP registration in OQ-58); its wire protocol is deferred to OQ-66 (blocked on OQ-58's token model). Cross-references updated across 11 existing docs (README, overview, open-questions, OQ-55, tls, hub, core, channels README/overview/ channel-client, call client-and-adapters) to reflect OQ-55 resolved and the new alknet-client crate. Architecture review passed (2 critical, 7 warnings — all addressed).
3.4 KiB
3.4 KiB
OQ-55: AlknetClient / Client Establishment Extraction
- Origin:
docs/research/alknet-channels/phase-0-findings.mdOQ-CH-14 (theAlknetClientclarification);docs/research/alknet-channels/poc-summary.md§"Issues Surfaced" #1 (theBidiStreamSourcefinding that motivates separating the client-extraction question from theConnectionextension question). - Status: resolved (ADR-089)
- Door type: one-way (crate existence + dial seam — ADR-089)
- Priority: medium
- Resolution:
AlknetClientis extracted as a new cratealknet-client— the client-side analogue ofAlknetEndpoint(ADR-083). Three dial methods:dial_quic/dial_tcp_tls(both build aTlsClientConfigvia ADR-087 and call their transport's connector) +dial_iroh(the key-not-config exception, shares theEd25519SecretKey). The dial produces aConnectionfor the protocol take-overs (CallClient::spawn_dispatch,ChannelClient::from_connection) to consume — it does not run protocols. - Why the deferral collapsed: the blocking condition ("a second
transport's real dial existing") is met within the native endpoint
type (ADR-086): QUIC + TCP+TLS (both rustls-consuming via
TlsClientConfig) + iroh (key-based) — three dial shapes, two sharingTlsClientConfig. ADR-087 broke the circular hedge (TlsClientConfigis a prerequisite, not a consequence of the dial). ADR-083 made the server-side shape a clean accept-loop runner, giving the client-side shape by symmetry. The dial seam is extractable from two different transport implementations, not guessable from one. - Scope of the resolution: the native transport-polymorphic
dial. The web/browser client (WebSocket, HTTP — the browser
bidirectional path per ADR-044/048) was never what this OQ was
about — it is a different client surface (the JS SDK / wasm), not a
Rust dial, and does not use
AlknetClient. Non-Rust native clients (Node/Deno/Bun, Python, wasm) that negotiate TLS against an X.509 endpoint and implement the wire protocols directly are also out of scope —AlknetClientis the Rust native client, one of several possible native clients sharing the same wire protocols. - What does NOT block on this (unchanged): each crate building its
own client standalone with a shared
TlsClientConfig(ADR-087), and each transport-specific dial helper.CallClient's transport-agnostic take-over (spawn_dispatch) andChannelClient's transport-agnostic take-over (from_connection, ADR-080) are decided; the existingconnect/connect_quicconvenience constructors become thin wrappers overAlknetClient::dial_quic(ADR-089 §5). - Cross-references: ADR-089 (the resolution —
AlknetClientnative dial seam), ADR-083 (the server-side shape mirrored), ADR-086 (endpoint types — native has QUIC + TCP+TLS + iroh), ADR-087 (TlsClientConfig— the prerequisite the dial consumes), ADR-034 (verifier selection — centralized inTlsClientConfig::new), ADR-065 (server-side transport generalization — the client-side analogue this OQ's deferral avoided preempting, now completed), ADR-070 (theBidiStreamSourceextension point — orthogonal to the client establishment question), OQ-CH-14 indocs/research/alknet-channels/phase-0-findings.md(the research-scope question this core-scope OQ carried forward).