19 tasks covering core testing, Redis hardening, WebSocket client/server adapters, Worker adapter, and final review gates. Iroh adapters are tracked as a deferred placeholder blocked on the @alkdev/iroh fork. Phases: core validation → Redis hardening → review gate → WebSocket adapters → review gate → Worker adapter → review gate → final validation.
1.8 KiB
1.8 KiB
id: integration-test-ws-client-server
name: Integration test: WebSocket client and server event targets together
status: pending
depends_on: [websocket-client-tests, websocket-server-tests]
scope: moderate
risk: medium
impact: component
level: implementation
Description
Test the WebSocket client and server adapters working together — a spoke subscribes via the client adapter, the hub fans out via the server adapter. This validates the full subscription control protocol end-to-end:
- Client connects to server
- Client calls
addEventListener→ sends__subscribeto server - Server receives
__subscribe→ adds client to subscription map - Server
dispatchEventon that topic → message sent only to subscribed client - Client receives message → dispatches to local listeners
- Client calls
removeEventListener→ sends__unsubscribeto server - Server removes client from subscription map
This is also where we validate that createPubSub works with the WebSocket adapters.
Acceptance Criteria
- Integration test: bidirectional communication between WS client and server
- Integration test: subscription control protocol end-to-end
- Integration test: topic-based fan-out — subscribed clients receive events, unsubscribed don't
- Integration test: direct messaging via topic scoping
"direct:${spokeId}" - Integration test:
createPubSubworks with WS client event target - Integration test:
createPubSubworks with WS server event target
References
- docs/architecture/event-targets/websocket-client.md
- docs/architecture/event-targets/websocket-server.md
- docs/architecture/decisions/003-subscription-control-protocol.md
Notes
To be filled by implementation agent
Summary
To be filled on completion