rouse-context/core
Jason Monk 4d7090457a Refactor EndToEndSessionTest to exercise TunnelClientImpl production code path
Scenarios 5-10, 17-20 now use TunnelClientImpl + MtlsWebSocketFactory instead
of manually constructing WebSocket connections and pumping mux frames. This
ensures the production incomingSessions flow and MuxDemux wiring are tested
end-to-end against the real relay binary.

Extract shared test utilities into TestRelayFixture.kt:
- TestCertificateAuthority: generates CA, relay, and device certs via keytool
- TestRelayManager: starts/stops relay subprocess, waits for ready
- TestSslContexts: factory methods for mTLS, device server, AI client contexts
- buildSyntheticClientHello / findFreePort / findRelayBinary: shared helpers

Add MtlsWebSocketFactory: a WebSocketFactory backed by Java's HttpClient that
properly presents client certificates (unlike Ktor CIO).

Add new test scenarios:
- Scenario 19: multiple sequential TLS messages through tunnel
- Scenario 20: full session lifecycle (connect, stream, disconnect, reconnect)

Net effect: -638 lines of duplicated cert/relay/SSL code across the two test
files, replaced with shared utilities. Both test classes now import from
TestRelayFixture instead of maintaining their own copies.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 18:42:09 -04:00
..
bridge Extract core:bridge module for TLS accept + MCP session bridging 2026-04-06 14:22:37 -04:00
mcp Add phone-side OAuth approval UI with notifications and broadcast actions 2026-04-06 18:23:22 -04:00
tunnel Refactor EndToEndSessionTest to exercise TunnelClientImpl production code path 2026-04-06 18:42:09 -04:00