You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Parity tests: Cap divergence for request and response bodies #987
The inbound-request-overflow fixture (#937) covers extproc + reverseproxy at their shared 1 MiB cap. Two adjacent caps have no coverage today, and each is a real divergence between deployment shapes:
Direction
extproc
reverseproxy
forwardproxy
Request body
1 MiB
1 MiB
10 MiB
Response body
1 MiB
1 MiB
10 MiB
Why it matters
A body between 1 MiB and 10 MiB (agent egress with concatenated history + tool manifest, LLM streaming response) is accepted on the laptop path (forwardproxy) and rejected on the Kubernetes envoy-sidecar path (extproc). The two caps have grown independently in authbridge/authlib/listener/{extproc,forwardproxy}/server.go — nothing forces the operator-visible contract to be either "same cap" or "documented gap."
Anthropic Claude Code sessions produce 5 MiB request bodies (measured in PR #904); response bodies follow suit.
Fix
Two fixtures, one shape:
Outbound request-body overflow — body between 1 MiB and 10 MiB, direction: pipeline.Outbound. Forwardproxy accepts (pipeline runs, wire status 200); extproc rejects (pipeline refused pre-run, wire status 413).
Response-body overflow — upstream serves a body between 1 MiB and 10 MiB. Same asymmetric outcome: forwardproxy accepts, extproc + reverseproxy reject with 502.
Both are asymmetric-per-listener — not a naive assertParity call. Options:
Add an expectPerListener map[string]expectedBehavior field to the fixture, or
Use per-listener sub-tests rather than the shared harness.
changed the title [-]Parity tests: cap divergence for request and response bodies[/-][+]Parity tests: Cap divergence for request and response bodies[/+]on Sep 14, 2026
One correction to the table, found while building the body-mutation fixture (#938): the forwardproxy request cap is 32 MiB, not 10 MiB. The two directions use two different constants there, and only the response one is 10 MiB:
maxRequestBodySize = 32 << 20 — core/listener/forwardproxy/server.go:59, applied at :380 via http.MaxBytesReader
maxBodySize = 10 << 20 — core/listener/forwardproxy/server.go:79, applied to the response at :1185
Both proxies' request caps are enforced in different places and the reverseproxy has only the one constant (maxBodySize = 1 << 20, reverseproxy/server.go:47) covering both directions, which is why the asymmetry is easy to miss. Corrected table:
Direction
extproc
reverseproxy
forwardproxy
Request body
1 MiB
1 MiB
32 MiB
Response body
1 MiB
1 MiB
10 MiB
This makes the issue's case stronger rather than weaker: the undocumented request-body gap between deployment shapes is 1 MiB → 32 MiB, 3× wider than the table claims. The proposed fixture body ("between 1 MiB and 10 MiB") still works unchanged, since 10 MiB is under the real cap — but a fixture sized from the table would silently stop testing near the boundary, and anyone reading this issue to decide whether the caps should be unified would be reasoning from the wrong number.
Worth noting for whoever picks this up: #938 added an opt-in expectedUpstream to the parity harness, which pins what each listener actually forwarded rather than only what it recorded. It does not solve the asymmetric-expectation problem this issue raises — assertParity still requires every listener in the set to agree — but it is a precedent for the "absolute per-listener expectation" shape, which is the direction the first of the two proposed options points.
Activity
[-]Parity tests: cap divergence for request and response bodies[/-][+]Parity tests: Cap divergence for request and response bodies[/+]cwiklik commentedon Oct 7, 2026
One correction to the table, found while building the body-mutation fixture (#938): the forwardproxy request cap is 32 MiB, not 10 MiB. The two directions use two different constants there, and only the response one is 10 MiB:
maxRequestBodySize = 32 << 20—core/listener/forwardproxy/server.go:59, applied at:380viahttp.MaxBytesReadermaxBodySize = 10 << 20—core/listener/forwardproxy/server.go:79, applied to the response at:1185Both proxies' request caps are enforced in different places and the reverseproxy has only the one constant (
maxBodySize = 1 << 20,reverseproxy/server.go:47) covering both directions, which is why the asymmetry is easy to miss. Corrected table:This makes the issue's case stronger rather than weaker: the undocumented request-body gap between deployment shapes is 1 MiB → 32 MiB, 3× wider than the table claims. The proposed fixture body ("between 1 MiB and 10 MiB") still works unchanged, since 10 MiB is under the real cap — but a fixture sized from the table would silently stop testing near the boundary, and anyone reading this issue to decide whether the caps should be unified would be reasoning from the wrong number.
Worth noting for whoever picks this up: #938 added an opt-in
expectedUpstreamto the parity harness, which pins what each listener actually forwarded rather than only what it recorded. It does not solve the asymmetric-expectation problem this issue raises —assertParitystill requires every listener in the set to agree — but it is a precedent for the "absolute per-listener expectation" shape, which is the direction the first of the two proposed options points.Assisted-By: Claude (Anthropic AI) <[email protected]>
test: Pin the body-cap divergence between deployment shapes