shutdown::tests::in_flight_request_finishes_after_shutdown_fires failed twice on CI today (#350, #352) with hyper::Error(IncompleteMessage). Both PRs passed on a re-run, and neither touches shutdown.rs.
The test fired shutdown a fixed 100 ms after sending the request. On a busy runner the connection can be accepted before its request has been read. Graceful shutdown rightly closes such an idle connection, so the client saw an incomplete message, although no request that had reached a handler was dropped.
What
The handler signals once it has started. The test waits for that signal (up to 5 s) before firing shutdown, so it now checks what its name says: a request that is being handled finishes during the drain.
Test-only; serve is unchanged.
Verification
Run with the CI feature set (-p compliance-core -p compliance-agent --lib shutdown::tests): 5 times, all passing.
Then the test binary 40 times, four copies at a time: 0 failures.
I did not rebuild the old version to reproduce the failure locally. The diagnosis rests on the CI error (the connection closed before the response) and on the fixed test holding under load.
## Why
`shutdown::tests::in_flight_request_finishes_after_shutdown_fires` failed twice on CI today (#350, #352) with `hyper::Error(IncompleteMessage)`. Both PRs passed on a re-run, and neither touches `shutdown.rs`.
The test fired shutdown a fixed 100 ms after sending the request. On a busy runner the connection can be accepted before its request has been read. Graceful shutdown rightly closes such an idle connection, so the client saw an incomplete message, although no request that had reached a handler was dropped.
## What
The handler signals once it has started. The test waits for that signal (up to 5 s) before firing shutdown, so it now checks what its name says: a request that is being handled finishes during the drain.
Test-only; `serve` is unchanged.
## Verification
- Run with the CI feature set (`-p compliance-core -p compliance-agent --lib shutdown::tests`): 5 times, all passing.
- Then the test binary 40 times, four copies at a time: 0 failures.
- I did not rebuild the old version to reproduce the failure locally. The diagnosis rests on the CI error (the connection closed before the response) and on the fixed test holding under load.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
in_flight_request_finishes_after_shutdown_fires failed twice on CI (#350,
#352) with hyper's IncompleteMessage. It fired shutdown a fixed 100 ms
after sending the request. On a busy runner the connection could be
accepted before its request was read; graceful shutdown rightly closes
such an idle connection, and the test failed although no in-flight
request was dropped.
The handler now signals when it has started, and shutdown fires only
then, so the test checks what its name says: a request being handled
finishes during the drain.
Verified: 40 runs, four at a time, all pass.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang
merged commit 88495f0c77 into main2026-09-23 15:46:49 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why
shutdown::tests::in_flight_request_finishes_after_shutdown_firesfailed twice on CI today (#350, #352) withhyper::Error(IncompleteMessage). Both PRs passed on a re-run, and neither touchesshutdown.rs.The test fired shutdown a fixed 100 ms after sending the request. On a busy runner the connection can be accepted before its request has been read. Graceful shutdown rightly closes such an idle connection, so the client saw an incomplete message, although no request that had reached a handler was dropped.
What
The handler signals once it has started. The test waits for that signal (up to 5 s) before firing shutdown, so it now checks what its name says: a request that is being handled finishes during the drain.
Test-only;
serveis unchanged.Verification
-p compliance-core -p compliance-agent --lib shutdown::tests): 5 times, all passing.🤖 Generated with Claude Code
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p