fix(ci): harden llm-test mock HTTP server against stalled connections - #10
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
macos-buildjob has been failing since the Junemacos-latestrunner image update:http_native_test.llmtimed out (exactly curl's 30sCURLOPT_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 PythonHTTPServerbeing 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):ThreadingHTTPServerwithdaemon_threadsand a 5s per-connection timeout, so one silent connection can't serialize the accept loop.sleep 0.5with an active readiness probe (up to 10s) that dumpslsofport state if the server never answers.Verified:
./llm-test23/23 locally and in CI.macos-buildsince May;http_native_test.llmpasses with no stall.🤖 Generated with Claude Code