fix(network): preserve pipelined requests after chunked inspection - #3861
Conversation
Stop chunked MCP and JSON-RPC body reads at each framing boundary so the connection reader retains the next request for independent inspection. Keep payload reads bounded by the remaining chunk length and scan framing lines incrementally. Cover buffered prefixes, fragmented framing, trailers, and malformed input. Verify allowed and denied pipelined requests through both relay entry paths. Signed-off-by: Shiju <shiju@nvidia.com>
Remove GraphQL's duplicate chunk decoder so all buffered HTTP inspectors preserve the next request on a persistent connection. Keep GraphQL's header checks, configured body limit and query classification. Cover GraphQL trailers and fragmented framing, and exercise subsequent request authorization for REST, GraphQL, MCP and JSON-RPC through both persistent relay entry paths. Signed-off-by: Shiju <shiju@nvidia.com>
johntmyers
left a comment
There was a problem hiding this comment.
gator-agent
PR Review Status
This focused network-proxy correctness fix is project-valid, and the full initial review found no blocking defects. The architecture note documents the corrected HTTP message boundary; required E2E dispatch is the remaining step before pipeline monitoring begins.
Blocking findings:
- No blocking findings remain
Carried findings:
- None
Non-blocking suggestions:
- None
Gator metadata
- Validation: Localized correction to existing HTTP body readers with a clear failure mode and regression coverage
- Docs: Direct Fern docs are not needed; the internal message-boundary contract is documented in architecture/sandbox.md
- Checks: Baseline branch, Helm, Trivy, and DCO checks are green; required E2E dispatch is pending
- E2E: test:e2e required for network proxy behavior and is being dispatched for the current head
- Head SHA:
560f647ef6f20a4e17fda7d76e2ce4b7ac270b92 - Base SHA:
cfcc3733bd9177f29b3c2aceec9c052b8814422b - Merge base SHA:
cfcc3733bd9177f29b3c2aceec9c052b8814422b - Patch ID:
937b0d24590396bd00bdcdcdb714324f85d11850 - Gator payload:
9 - Review mode:
initial - Previous reviewed SHA: none
- Review budget exhausted: no
- Maintainer decision required: no
- Next state:
gator:in-review
|
Label |
Monitoring CompleteMonitoring is complete because this PR has merged. Final status: Gator review found no blocking defects, the required E2E suite passed, and maintainer approval was present before merge. I removed the active |
Summary
Prevent inspection of one chunked HTTP request from discarding the next pipelined request. Reads now stop at the current message boundary, leaving the next request for its own policy decision. GraphQL uses the corrected shared reader alongside MCP and generic JSON-RPC, and relay regressions also cover REST's existing streaming behavior.
Related Issue
No issue required: this is a localized correction to existing HTTP body readers.
Changes
Testing
mise run pre-commitpassesChecklist