carlos / platform Public

Flaky: TestHeldDialWebSocketUpgrade (internal/edge) loses its reserved port to another listener Issue open

Seen on CI for branch static-dir-slash at d3b89de5 (2026-10-29 18:50Z):

localholdtest.go:197: listen 127.0.0.1:41239: listen tcp 127.0.0.1:41239: bind: address already in use localholdtest.go:340: handshake = "HTTP/1.1 200 OK ... {\"isValid\":true,\"name\":\"\"}", want 101

listenLater picks a free port, then binds it after a delay; on a busy runner another process took the port in between, and the dial reached that process instead (a JSON 200 from something else). Passes 5/5 locally. A fix: hold the listener open from the start and only start serving after the delay, so the port is never released.