Repository navigation
SVGZ inflate gets a trial pass, a disabled File byte cap warns, and the ECH sidecar contract states framing (BACKLOG #1129, #1125) - #2292
Conversation
…arns (BACKLOG #1129) The SVGZ download path bounded its inflate only while keeping output, so markup over the 32 MiB bound was refused after holding up to it. _gunzip_bounded now walks members through the shared bounded_inflate loop. The head sniff and the size check keep no output; a decompressor wrapper notes the first byte past leading noise, so the not-markup clearance is unchanged. Only an admitted body is inflated again. Member cap and size bound unchanged. A File inbound with decompress set and max_decompressed_bytes off (0, None, "0") logs one warning at build, naming the connection and the setting, never a value.
Point 4 of the sidecar contract: keep each request's Content-Length, refuse ambiguous framing, drop the partner connection after a misframed reply. It links to the DEPLOYMENT.md front-proxy section and the CONFIGURATION.md forward-proxy rule rather than restating them. Proposed PR title: SVGZ inflate gets a trial pass, a disabled File byte cap warns, and the ECH sidecar contract states framing (BACKLOG #1129, #1125) Banner #1129: limb fixed, SVGZ trial pass and File cap warning. Banner #1125: limb fixed, ECH sidecar framing clause.
|
QA (BACKLOG #1129/#1125, Builder line): code-review skill xhigh on the branch diff against origin/main before the push, applying docs/REVIEW-STANDARDS.md: no correctness defect (old and new SVGZ behaviour agree; warning wired correctly; anchors resolve; no trailers); 5 non-defect findings, 2 fixed and folded in before the push (stale _MAX_GZIP_MEMBERS comment; per-walk decompressor), 3 declined with reasons in the PR body. |
|
Lander: enqueueing at pinned head 01a2e64. Picked up from the batch 210 Manager's 18:15Z mail. Review proof: the QA line ( |
Batch 210 follow-up from a vault re-read, decided by the batch 210 Manager on 2026-10-12. It gets its own PR because it changes a security control: the SVGZ inflate.
Merge danger
Reversible: yes -- a revert undoes it all.
Blast radius:
messagefoundry/api/svg_sanitize.py(_gunzip_bounded,_vet_gzip),messagefoundry/parsing/_bounded_inflate.py(docstring),messagefoundry/transports/file.py(one build-time WARNING),docs/DANGEROUS-FUNCTIONALITY.md,samples/ech-sidecar/README.md, two changelog fragments, and tests.Behaviour changes:
decompressset andmax_decompressed_bytesoff (0, None or "0") logs one WARNING at build, naming the connection and the setting, never a value. Off withoutdecompresslogs nothing, because the cap is never read then (Manager decision).Evidence
bounded_inflateshow a 40 MiB SVG refused with nokeep_output=Truecall. With the bounds shrunk, an SVGZ at exactly the bound renders and one byte over is refused with no kept pass. Both spy tests fail on main.decompressdo not warn. The three warn cases fail on main.Builder report (condensed). Branch
b210-1129-svgz-cap, head01a2e64d6ab4add670d611aa26282fb9066b5743, rebased onto maineb0674afb4.91d351f46d: SVGZ trial pass and the File cap warning (fix(verify): the self smoke passed on a message the config would have dropped (BACKLOG #1707) #1129).01a2e64d6a: the ECH sidecar framing clause (fix(webconsole): bind the user-update lane to an action-bound step-up (BACKLOG #1737) #1125), linking the DEPLOYMENT.md front-proxy section and the CONFIGURATION.md forward-proxy rule.test_svg_sanitize,test_compressionand name-run 1405 passed, and the transports subset 28 passed. The doc tests touching the changed docs passed._MAX_GZIP_MEMBERScomment, and a decompressor built and discarded per walk. Three were declined: the double inflate of small SVGZ, which keeps the no-kept-call property; the extra full inflate for large admitted SVGZ; and the member-join copy.