Repository navigation
test(llm): check the transcription 413 in memory, not over TCP - #18578
jthomson04 wants to merge 1 commit into
Conversation
upload_too_large_for_the_request_plane_returns_payload_too_large posted a 24 MiB upload over TCP. The route stops reading at its 23 MiB limit and answers 413. Hyper drains only what is already buffered, so the server resets the connection while the client is still uploading. When the client's next body write hits the reset, hyper's client aborts the connection and the 413 body it already received is lost. response.json() then fails with hyper::Error(Body, "connection error"). The old test failed 47 of 200 runs locally. Move the check into the transcriptions unit tests. It drives the real transcriptions_router with oneshot and asserts the same 413 naming the transcription limit. It runs with DYN_HTTP_BODY_LIMIT_MB unset under temp_env, whose lock serializes it with the service_v2 tests that lower that limit in the same binary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. WalkthroughThe transcription tests now share streamed multipart request construction. An in-memory router test checks the response to an upload that exceeds the transcription request-plane limit. The external test for the same limit was removed. ChangesTranscription upload limit tests
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk:
|
✅ Dynamo PR CI passed — run 42973670067 (attempt 1) on
|
|
Your trace matches what I see on macOS, and it isn't only this test. #18175 explains why the body is lost. |
|
Closing in favor of #18177. That PR keeps the response's Content-Length in |
Overview
upload_too_large_for_the_request_plane_returns_payload_too_largeflakes in Pre Mergerust-tests (.). It failed on three main pushes on 2026-11-10 and on #18553. The test posts a 24 MiB upload over TCP. The route stops reading at its 23 MiB limit and answers 413, then the server resets the connection while the client is still uploading. If the client's next body write hits the reset, hyper's client aborts the connection and drops the 413 body it had already received.response.json()then fails withhyper::Error(Body, "connection error"). This PR checks the same thing in memory against the real route, with no TCP connection.response.json()unwrapDYN_HTTP_BODY_LIMIT_MBcargo test -p dynamo-llm --test http-transcriptionsKey Changes
transcriptions.rsunit tests. It drivestranscriptions_routerwithoneshotand makes the same assertions: a 24 MiB upload gets a 413 whose message names the transcription limit.DYN_HTTP_BODY_LIMIT_MBunset undertemp_env::async_with_vars. temp_env's lock serializes it with the twoservice_v2tests in the same binary that set that limit to 1 MiB.tests/http-transcriptions.rs.parse_statusintopost_form, so both tests share it.Validation
Root cause, from running the old test in a network namespace:
TcpEstabResets200). In 154 the server closed with unread request bytes (TCPAbortOnClose). In 46, request bytes arrived after the close (TCPAbortOnData).strace, the client's last request-bodywritevreturnedEPIPE. Hyper's client dispatcher then fails the pending response body with"connection error"(proto/h1/dispatch.rs,poll_catch).poll_drain_or_close_read), so every oversized upload ends this way.Clippy is clean. Its only error is the existing
model_eoscompile error instreaming_tool_dispatch_http.Issues and Ongoing Work
streaming_tool_dispatch_httpuntil fix(llm): set model_eos in the tool-dispatch stream test #18553 merges.Pull Request Checklist
/pr-checklistskill.🤖 Generated with Claude Code
Summary by CodeRabbit
Content-Lengthheader.