Read fragmented HTTP status lines in the job tests - #47
Merged
Merged
Conversation
O6lvl4
marked this pull request as ready for review
October 4, 2026 01:08
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 oversized-request check in
job_server_checks.pyassumes onerecv(4096)returns the HTTP status. In the Ubuntu CI run for #46, it received onlyHTTP/1.1and rejected the response before the status code arrived.Read through the status-line CRLF across TCP fragments, bounded by one 10-second monotonic deadline and 4096 bytes. EOF and timeout remain failures. The request still sends headers only, so the check continues to prove that an oversized body is refused before being read. No server or application code changes are included, and this branch starts from develop independently of #46.
Add 10 deterministic harness tests and run them on both CI platforms before the build. They cover fragmentation within the status and CRLF, early return without the response body or EOF, unexpected status, premature EOF, socket timeout, a shared deadline, and the size bound.
Verification:
recvfails the fragmented-response regression; the new reader passes. A separate localhost TCP test uses a handshake to force the same fragment boundary and also proves old-fail/new-pass without timing sleeps.almide check src/main.almd, Python compilation,git diff --check, and the pinned code-quality gate (90/A) pass.os_sandbox = "required"unchanged. Those attempted checks reused the existing 0.6.17 binary from Escape HTTP error responses as valid JSON #46, whose job service is unchanged. Full platform integration remains for CI.