mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-14 18:01:20 +08:00
3bbe78b63c
Strengthens the regression gate from issue #309. The original tests binding real sockets only caught the bug on Linux (Crostini and likely Ubuntu), not macOS where wildcard-vs-loopback parallel binds happen to succeed. That left CI as the only gate and only if the CI runner's kernel reproduces the race. testPortOnAllHosts now takes an optional injectable probe. The contract test passes a recording fake that holds each call for 20ms and tracks in-flight count. Buggy parallel code drives it to 4; the sequential fix keeps it at 1. Verified by reverting the fix in place and confirming the contract test fails with expected=1 / received=4 — then restored and all 4 tests pass. Production callers pass no probe and get the real socket check, unchanged behaviour.