Repository navigation
test(native): tolerate a reused port in the loopback probe test - #644
Conversation
The free-port half of the loopback probe test reprobed the exact port it had just released. A parallel test can bind that ephemeral port first, and a loaded runner can time out the connect; both read as in use. The test now accepts the first of several freshly released ports the probe clears. Refs HACK-1946 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three tests in doctor-fix-noninteractive used Bun's 5 s default while the rest of the file already allows 30 s. A loaded CI runner finished the stale-daemon-pid case about 60 ms past 5 s. Refs HACK-1721 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
provider::publication::port_probe_tests::loopback_probe_refuses_exact_and_wildcard_listeners_and_accepts_a_free_portfails intermittently onnextCI withpublished_port_in_use. It has been seen on macOS-latest and on ubuntu-latest, the latter on #642, which changes no Rust.Cause: the free-port half of the test released a listener and then probed that same port. A parallel test can bind the ephemeral port in between, and a loaded runner can time out the 250 ms connect. The probe treats either case as "in use", which is correct for the product but makes this test flaky.
Change: test only. The test now releases up to 20 fresh ephemeral ports and passes as soon as the probe clears one. It still fails if the probe never accepts a free port. The exact-listener, wildcard-listener and port-0 assertions are unchanged, and
require_loopback_port_freeis untouched.Validation:
cargo +1.97.1 fmt --check,cargo +1.97.1 clippy --all-targets -D warnings, and the focused test pass locally on macOS. Gitleaks found no leaks. CI on this PR covers Linux.Also in this PR (HACK-1721): three
doctor --fixtests intests/doctor-fix-noninteractive.test.tsused Bun's 5 s default, while the rest of the file already allows 30 s. They now allow 30 s too. On this PR's first CI run, the stale-daemon-pid case finished about 60 ms after the 5 s limit. Locally, all 27 tests in that file pass.Refs HACK-1946, HACK-1721
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.