The Windows smoke test waits until /status is Healthy and picks ports Windows does not refuse #378

Merged
claude merged 2 commits from feature/377-smoke-health-race into develop 2026-11-12 06:11:32 -05:00
Owner

The Windows smoke test now waits until /status reports Healthy, up to the start-up limit, instead of judging the first answer it got.

  • Failure: develop run 1458, job "Smoke Test the Windows Binary": /status reports 'Unhealthy', not Healthy. The health check said DNS-over-QUIC was not listening yet; the log shows no QUIC error.

  • Cause: the script kept the first /status answer with code 200 from step 1 and read its body again in step 6. /status answers before the last listener is bound, so on a busy runner that answer can still say Unhealthy.

  • Fix: step 6 asks again every 500 ms until the status is Healthy, and fails with the last answer when the start-up time (120 s by default) is used up or the process exits.

  • Second failure, same job (runs 1464 and 1465): Smoke test FAILED: No free port found. The script asked for a TCP port on port 0 and then bound UDP on the same number, 20 tries. Windows hands out port-0 ports in sequence and keeps separate excluded ranges per protocol, so every try can be refused (the cause found in #375). The script now picks random ports in the dynamic range and binds them explicitly, up to 2000 picks, and never returns the same port twice.

Verified:

  • The changed script passed against the published Windows build of develop (72904c2) on lofnheim under Windows PowerShell 5.1 and under PowerShell 7 (which also sends a real DNS-over-QUIC query).
  • The verifier accepted the first commit; the second (the port picks) was not sent to the verifier.
  • The job does not run in pull requests, so the first proof on CI is the develop run after the merge.

Closes #377

🤖 Generated with Claude Code

https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK

The Windows smoke test now waits until `/status` reports Healthy, up to the start-up limit, instead of judging the first answer it got. - **Failure:** `develop` run 1458, job "Smoke Test the Windows Binary": `/status reports 'Unhealthy', not Healthy`. The health check said DNS-over-QUIC was not listening yet; the log shows no QUIC error. - **Cause:** the script kept the first `/status` answer with code 200 from step 1 and read its body again in step 6. `/status` answers before the last listener is bound, so on a busy runner that answer can still say Unhealthy. - **Fix:** step 6 asks again every 500 ms until the status is Healthy, and fails with the last answer when the start-up time (120 s by default) is used up or the process exits. - **Second failure, same job (runs 1464 and 1465):** `Smoke test FAILED: No free port found.` The script asked for a TCP port on port 0 and then bound UDP on the same number, 20 tries. Windows hands out port-0 ports in sequence and keeps separate excluded ranges per protocol, so every try can be refused (the cause found in #375). The script now picks random ports in the dynamic range and binds them explicitly, up to 2000 picks, and never returns the same port twice. **Verified:** - The changed script passed against the published Windows build of `develop` (72904c2) on lofnheim under Windows PowerShell 5.1 and under PowerShell 7 (which also sends a real DNS-over-QUIC query). - The verifier accepted the first commit; the second (the port picks) was not sent to the verifier. - The job does not run in pull requests, so the first proof on CI is the `develop` run after the merge. Closes #377 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
The Windows smoke test waits until /status reports Healthy instead of failing on a first answer taken before the last listener was up
All checks were successful
Build / Build Binary (linux-amd64) (pull_request) Successful in -1m23s
Build / Build Binary (linux-arm64) (pull_request) Successful in -1m4s
Build / Build Binary (macos-amd64) (pull_request) Successful in -48s
Build / Build Binary (macos-arm64) (pull_request) Successful in -18s
Build / Build Binary (windows-amd64) (pull_request) Successful in -35s
Build / Smoke Test the Windows Binary (pull_request) Successful in 16s
Build / Build Arch Linux Packages (pull_request) Successful in -2m15s
Build / Build and Push Image (pull_request) Successful in -2m29s
Build / Build and Test Deb and RPM Packages (pull_request) Successful in 30s
Build / Publish Release (pull_request) Successful in -2m33s
Build / Pipeline (pull_request) Successful in 0s
Build / Build Binary (macos-arm64) (push) Successful in -20s
Build / Build Binary (windows-amd64) (push) Successful in -15s
Build / Smoke Test the Windows Binary (push) Successful in 17s
Build / Build Arch Linux Packages (push) Successful in -1m59s
Build / Build and Push Image (push) Successful in -2m27s
Build / Build and Test Deb and RPM Packages (push) Successful in 15s
Build / Publish Release (push) Successful in -2m33s
Build / Pipeline (push) Successful in 0s
Build / Test .NET on Windows (pull_request) Has been skipped
Build / Compute Version (pull_request) Successful in -2m33s
Build / Lint and Script Tests (pull_request) Successful in -1m50s
Build / Windows Test Gate (pull_request) Successful in -2m37s
Build / Test Admin Console (pull_request) Successful in -12s
Build / Test .NET (pull_request) Successful in 5m31s
Build / Stage Draft Release (pull_request) Successful in -2m30s
Build / Pack and Push NuGet Packages (common) (pull_request) Successful in -2m19s
Build / Pack and Push NuGet Packages (dhcp) (pull_request) Successful in -2m0s
Build / Pack and Push NuGet Packages (dns-core) (pull_request) Successful in -1m58s
Build / Pack and Push NuGet Packages (dns-server) (pull_request) Successful in -1m50s
7e2aa4ed1e
Closes #377

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
The Windows smoke test picks its ports at random from the dynamic range, so a port reserved for the other protocol on Windows no longer fails it with "No free port found"
All checks were successful
Build / Pack and Push NuGet Packages (dns-server) (push) Successful in -1m26s
Build / Build Binary (linux-amd64) (push) Successful in -16s
Build / Build Binary (linux-arm64) (push) Successful in -42s
Build / Build Binary (macos-amd64) (push) Successful in -23s
Build / Build Binary (macos-arm64) (push) Successful in -43s
Build / Windows Test Gate (pull_request) Successful in -2m37s
Build / Test .NET (pull_request) Successful in 6m2s
Build / Stage Draft Release (pull_request) Successful in -2m33s
Build / Pack and Push NuGet Packages (common) (pull_request) Successful in -2m8s
Build / Build Binary (windows-amd64) (push) Successful in -1m3s
Build / Smoke Test the Windows Binary (push) Successful in 15s
Build / Pack and Push NuGet Packages (dns-core) (pull_request) Successful in -1m45s
Build / Pack and Push NuGet Packages (dhcp) (pull_request) Successful in -2m2s
Build / Pack and Push NuGet Packages (dns-server) (pull_request) Successful in -1m58s
Build / Build Binary (linux-amd64) (pull_request) Successful in -57s
Build / Build Binary (macos-amd64) (pull_request) Successful in -46s
Build / Build Binary (linux-arm64) (pull_request) Successful in -1m6s
Build / Build Arch Linux Packages (push) Successful in -1m53s
Build / Build Binary (windows-amd64) (pull_request) Successful in -45s
Build / Build Binary (macos-arm64) (pull_request) Successful in -36s
Build / Build and Push Image (push) Successful in -2m30s
Build / Smoke Test the Windows Binary (pull_request) Successful in 15s
Build / Build Arch Linux Packages (pull_request) Successful in -2m20s
Build / Build and Push Image (pull_request) Successful in -2m30s
Build / Build and Test Deb and RPM Packages (push) Successful in -12s
Build / Build and Test Deb and RPM Packages (pull_request) Successful in 42s
Build / Publish Release (push) Successful in -2m30s
Build / Pipeline (push) Successful in 0s
Build / Publish Release (pull_request) Successful in -2m33s
Build / Pipeline (pull_request) Successful in 0s
bb3c86ec8e
Refs #377

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
claude changed title from The Windows smoke test waits until /status is Healthy to The Windows smoke test waits until /status is Healthy and picks ports Windows does not refuse 2026-11-12 05:38:20 -05:00
claude merged commit 675914ae2d into develop 2026-11-12 06:11:32 -05:00
claude deleted branch feature/377-smoke-health-race 2026-11-12 06:11:33 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lantea-one/ninlil!378
No description provided.