Root cause of CI hang (CI / Platform (Go) failing after 2m11s):
1. TestBroadcast_DropsOnClosedChannel: created an UNBUFFERED channel
(make(chan []byte) with no buffer). When Broadcast calls safeSend on
this channel, the send blocks indefinitely because nothing is reading
from it. go test hangs forever waiting for the test to complete.
Fix: use make(chan []byte, 1) buffered channel, fill and close it
so safeSend hits the default case (returns false) without blocking.
2. Pointer identity: Broadcast tests used anonymous struct literals in
h.clients map assignments, but Go map keys store copies of structs.
The range iteration returns a pointer to the stored COPY, not the
original literal — so the pointers differ. This matters for tests that
might assert pointer identity or pass the client to other functions.
Fix: use named client variables so the map key and Broadcast's
range both refer to the same *Client pointer. Applied to all
Broadcast tests defensively.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>