Skip to content

Read fragmented HTTP status lines in the job tests - #47

Merged
O6lvl4 merged 1 commit into
developfrom
fix/job-test-partial-response
Oct 4, 2026
Merged

O6lvl4 merged 1 commit into
developfrom
fix/job-test-partial-response

Conversation

@O6lvl4

@O6lvl4 O6lvl4 commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

The oversized-request check in job_server_checks.py assumes one recv(4096) returns the HTTP status. In the Ubuntu CI run for #46, it received only HTTP/1.1 and 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:

  • All 10 new harness tests and all 17 existing evaluator unit tests pass.
  • Replacing the reader with the original single recv fails 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.
  • The full local job suite and an isolated real-server check stop at startup because this executor has no usable Landlock support (ENOSYS), with 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.

@O6lvl4
O6lvl4 marked this pull request as ready for review October 4, 2026 01:08
@O6lvl4
O6lvl4 merged commit 593f73b into develop Oct 4, 2026
4 checks passed
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