Goal
Design the WebSocket transport for the network adapter stack — the streaming sibling of the HTTP pair (ADR-0030 contract + ADR-0031 resilience) that ADR-0029 deferred to "a deliberate later session". Driven by the first Broker/Data Provider (IBKR Client Portal WS) and cross-checked against Binance and Coinbase so the generic transport carries no IBKR-shaped assumption.
Scope
Two paired ADRs (documentation only — no crate implementation in this issue):
- ADR-0032 — WebSocket transport contract. Untyped duplex frame channel (grammar/demux adapter-side); asymmetric
Stream recv / RPITIT one-shot send with split owned halves; minimal Frame enum; epoch-stamped lifecycle channel; uniform no-silent-drop backpressure guarantee; WsConnector leaf over tokio-tungstenite + rustls; per-transport AuthSource.
- ADR-0033 — WebSocket resilience stack. Two-seam composition (
WsConnector in / ReconnectingConnection out); reconnect as a spawned actor over a new runtime-neutral Spawn seam; two-axis layer stack (connect-time chain + per-frame recv/send pipelines); transport-liveness-vs-session-keepalive split (mandatory auto-Pong, passive idle + active keepalive-when-idle probe); lifecycle as a watch of an epoch-stamped LifecycleSnapshot; dual count+byte drop-oldest buffer; a circuit breaker that retries transient loss forever but surfaces permanent failure as Unrecoverable; a send-axis rate limit; force_reconnect on a control handle.
Out of scope
- Implementation of
oath-adapter-net-ws-api / -tungstenite / -mock crates (future work, gated on the net-http slices landing first — WS rides on the REST session).
- The net-http construction-surface amendments (a separate workstream → ADR-0034).
Notes
Venue semantics (IBKR/Binance/Coinbase keepalive, rate limits, silent-loss, large frames) were verified against live docs, not recalled.
Goal
Design the WebSocket transport for the network adapter stack — the streaming sibling of the HTTP pair (ADR-0030 contract + ADR-0031 resilience) that ADR-0029 deferred to "a deliberate later session". Driven by the first Broker/Data Provider (IBKR Client Portal WS) and cross-checked against Binance and Coinbase so the generic transport carries no IBKR-shaped assumption.
Scope
Two paired ADRs (documentation only — no crate implementation in this issue):
Streamrecv / RPITIT one-shot send with split owned halves; minimalFrameenum; epoch-stamped lifecycle channel; uniform no-silent-drop backpressure guarantee;WsConnectorleaf over tokio-tungstenite + rustls; per-transportAuthSource.WsConnectorin /ReconnectingConnectionout); reconnect as a spawned actor over a new runtime-neutralSpawnseam; two-axis layer stack (connect-time chain + per-frame recv/send pipelines); transport-liveness-vs-session-keepalive split (mandatory auto-Pong, passive idle + active keepalive-when-idle probe); lifecycle as awatchof an epoch-stampedLifecycleSnapshot; dual count+byte drop-oldest buffer; a circuit breaker that retries transient loss forever but surfaces permanent failure asUnrecoverable; a send-axis rate limit;force_reconnecton a control handle.Out of scope
oath-adapter-net-ws-api/-tungstenite/-mockcrates (future work, gated on the net-http slices landing first — WS rides on the REST session).Notes
Venue semantics (IBKR/Binance/Coinbase keepalive, rate limits, silent-loss, large frames) were verified against live docs, not recalled.