Skip to content

feat(net): WebSocket transport contract — net-ws-api + net-ws-mock (ADR-0032/0033) #63

Description

@NotAProfDev

Implement the WebSocket transport contract slice — the WS twin of the HTTP contract (#60) — per ADR-0032 as amended by ADR-0033 §5.

Scope

New crate oath-adapter-net-ws-api (zero-runtime, zero-I/O):

  • Frame/CloseFrame — RFC 6455 frame vocabulary (untyped duplex channel, ADR-0032 §1/§3)
  • WsError + HasErrorKind — one concrete transport error (§Consequences)
  • WsSink/WsSource — the split owned halves: one-shot RPITIT send + terminal close(self); blanket Stream recv (§2)
  • ConnState/LifecycleSnapshot/Lifecycle — epoch-stamped last-value watch over async-watch (§4 + ADR-0033 §5)
  • WsConnector — the leaf dependency-inversion seam (§7)

New dev-only crate oath-adapter-net-ws-mock: MockWsConnector, MockSink, MockSource (ADR-0033 §9).

Deferred (later slices, not this issue)

AuthSource, the resilience stack (Spawn, reconnect actor, heartbeat, buffer, SendRateLimit, stack(), WsConfig, ReconnectingConnector), the net-ws-tungstenite leaf, and MockTimer/MockSpawn.

Plan

docs/superpowers/plans/2026-07-02-net-ws-contract.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions