rouse-context/integration-tests
Jason Monk 51f99bdf29 Add tunnel mux protocol and integration tests against mock relay
Implement the mux framing protocol in Kotlin (matching the Rust relay's
wire format) and add integration tests that verify the protocol over
WebSocket against a mock relay server.

Tunnel module additions:
- Frame/FrameType/ErrorCode: mux protocol encode/decode (5-byte header)
- CertificateStore interface: device cert abstraction for TLS
- TunnelClient/TunnelState/TunnelError/MuxStream interfaces
- 12 unit tests for frame encode/decode and wire format compatibility

Integration test module (pure JVM, no Android deps):
- MockRelayServer: Ktor WebSocket server speaking mux protocol
- 7 integration tests covering all 5 test scenarios (IDs 100-104):
  connection establishment, OPEN/DATA/CLOSE round-trip, concurrent
  streams, ERROR frame parsing, graceful shutdown, device-initiated
  close, and large payload integrity

BLOCKERS.md documents why real relay integration is not yet possible:
the relay binary does not bind a TCP listener, /ws is a stub, and
mTLS is not configured.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 09:58:53 -04:00
..
src/test/kotlin/com/rousecontext/tunnel/integration Add tunnel mux protocol and integration tests against mock relay 2026-04-05 09:58:53 -04:00
BLOCKERS.md Add tunnel mux protocol and integration tests against mock relay 2026-04-05 09:58:53 -04:00
build.gradle.kts Add tunnel mux protocol and integration tests against mock relay 2026-04-05 09:58:53 -04:00