The WebSocket server broadcasts events to connected clients. There are no tests verifying that a client subscribed to stream A does not receive events for stream B owned by a different user.
Implementation:
Create backend/src/services/websocket.isolation.test.ts:
Connect two clients with different wallet addresses
Trigger a stream event for client A's stream
Assert client B does not receive the message
Assert client A does receive the message with correct payload shape
Acceptance Criteria:
Cross-user event isolation is verified in tests
Message payload shape is asserted (stream ID, event type, timestamp)
No broadcast leakage between unrelated clients
The WebSocket server broadcasts events to connected clients. There are no tests verifying that a client subscribed to stream A does not receive events for stream B owned by a different user.
Implementation:
Create backend/src/services/websocket.isolation.test.ts:
Connect two clients with different wallet addresses
Trigger a stream event for client A's stream
Assert client B does not receive the message
Assert client A does receive the message with correct payload shape
Acceptance Criteria:
Cross-user event isolation is verified in tests
Message payload shape is asserted (stream ID, event type, timestamp)
No broadcast leakage between unrelated clients