Skip to content

Frontend inflight body wrapping loses framing and flakes oversized upload responses #18175

Open

Description

@xianlubird

Problem

The frontend inflight middleware converts every response body through into_data_stream() and Body::from_stream(). This discards the body's exact size hint and HTTP trailer frames. Fixed-size JSON rejection responses become chunked on HTTP/1.1.

The oversized audio upload regression can receive HTTP 413 and then fail reading the JSON body with hyper::Error(Body, "connection error"). The upload is still in progress when the multipart size limit rejects it. Preserving the original body framing is a narrowly scoped candidate fix.

CI evidence and observed impact

The scan starts at the transcription test's merge into main, 2026-11-03 06:24:23 UTC, and ends at the 2026-11-05 scan snapshot. It enumerated 1,220 Pre Merge runs and inspected 143 failed workspace Rust jobs, including historical attempts and cancelled runs. The exact test and connection-error signature occurred 47 times: 41 failures across 37 distinct PRs, 5 on main, and 1 on release/1.7.0. These are observed job failures in that snapshot, not a repository-wide failure rate.

PR #17923 was hit twice:

An affected main run:

Proposed fix

Use a response-body wrapper that owns the inflight permit and forwards poll_frame, size_hint, and is_end_stream. Preserve the existing response lifecycle while allowing Hyper to frame fixed-size responses correctly. Validate the actual Dynamo HTTP path, streaming/trailers and permit cleanup.

Activity

  1. added
    language::rustIssues/PRs that reference Rust code
    bugSomething isn't working
    runtimeCODEOWNER area -> @ai-dynamo/dynamo-runtime-codeowners
    dynamo-runtimeRelates to the dynamo-runtime component
    frontend`python -m dynamo.frontend` and `dynamo-run in=http|text|grpc`
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdynamo-runtimeRelates to the dynamo-runtime componentfrontend`python -m dynamo.frontend` and `dynamo-run in=http|text|grpc`language::rustIssues/PRs that reference Rust coderuntimeCODEOWNER area -> @ai-dynamo/dynamo-runtime-codeowners

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions