Skip to content

fix(ci): harden llm-test mock HTTP server against stalled connections - #10

Merged
paulprogrammer merged 1 commit into
mainfrom
fix/macos-ci-mock-server
Jul 16, 2026
Merged

fix(ci): harden llm-test mock HTTP server against stalled connections#10
paulprogrammer merged 1 commit into
mainfrom
fix/macos-ci-mock-server

Conversation

@paulprogrammer

Copy link
Copy Markdown
Owner

The macos-build job has been failing since the June macos-latest runner image update: http_native_test.llm timed out (exactly curl's 30s CURLOPT_TIMEOUT) against the mock HTTP server, while the identical request from the very next test binary succeeded instantly. That signature — plus the fact that CI was green through May 29 with zero commits before the June 17 failures — points to the single-threaded Python HTTPServer being wedged by a stray idle connection (e.g. a port prober on the runner), not to any compiler/runtime change.

Changes (test infrastructure only, llm-test):

  • Switch the mock server to ThreadingHTTPServer with daemon_threads and a 5s per-connection timeout, so one silent connection can't serialize the accept loop.
  • Replace the blind sleep 0.5 with an active readiness probe (up to 10s) that dumps lsof port state if the server never answers.

Verified:

  • Linux: ./llm-test 23/23 locally and in CI.
  • macOS: workflow_dispatch run 29529311641 — first green macos-build since May; http_native_test.llm passes with no stall.

🤖 Generated with Claude Code

macos-latest runner images updated in June and http_native_test.llm began
timing out (30s curl timeout) against the mock server while the very next
test passed instantly - the signature of the single-threaded HTTPServer
being wedged by a stray idle connection. Switch to ThreadingHTTPServer
with daemon threads and a 5s per-connection timeout, and replace the
blind 0.5s sleep with an active readiness probe that dumps port state
diagnostics when the server fails to answer.

Test-infrastructure only; no compiler or runtime changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@paulprogrammer
paulprogrammer merged commit 36b0cdb into main Jul 16, 2026
4 checks passed
@paulprogrammer
paulprogrammer deleted the fix/macos-ci-mock-server branch July 16, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant