pingqiuandClaude Opus 5.5 de43d48be4 test: a holder's harness-chosen port is drawn below the host's ephemeral range, and a start that lost its port is retried once (#927)
handoffAddress drew from [10000, 20000) whatever the host's ephemeral range;
it now cuts the range at the host's ip_local_port_range low end
(handoffRange), as the weed port pairs already do. F1's holder start
(f1Up) answers errBindTaken when the holder exits before adopting with
"address already in use"; startWithBindRetry then draws the holder's four
ports again and starts it once more (v1, whose ports the cluster spec
names, is not retried). Any other failure, or a second taken port, fails
the test as before.

Red first: TestHandoffRangeStaysBelowTheEphemeralRange (a host whose
ephemeral range starts at 15000 must get [10000, 15000)) and
TestStartWithBindRetry (a taken port, then ok: one retry with fresh
ports) fail with the previous behaviour and pass here.

Refs #927.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 21:42:59 -08:00
Languages
Go 84.5%
Rust 7.9%
Shell 2.7%
templ 1.6%
Java 1%
Other 2%