savinmax 48d47dfc92 test(hub): add room-scoped broadcast isolation tests (P03)
Add tests verifying that the broadcast case in Hub.Run() correctly
sends messages only to clients in the same room as the sender:

- TestIntegration_RoomIsolation_MessagesOnlyGoToSameRoom: verifies
  messages from room-a are received by room-a clients and NOT by
  room-b clients
- TestIntegration_RoomIsolation_MultipleRoomsIndependent: verifies
  two rooms operate independently with no message leakage
- TestIntegration_BroadcastToEmptyRoom: verifies graceful handling
  when broadcasting to a non-existent room (no panic, hub remains
  functional)
- TestBroadcastRoomIsolation: unit-level room isolation test using
  the broadcast channel directly

Also adds dialWSWithRoom helper for room-aware WebSocket connections
in integration tests.

🤖 Assisted by the code-assist SOP
2026-06-13 13:20:05 +02:00
..