758e915bbb
patchedWrite applies isStreamingContentType / MAX_BUFFER_BYTES bypass checks before buffering; patchedEnd does not, since a single-call res.end(chunk) is not a streaming pileup scenario. These tests pin that contract by verifying byte integrity for the two shapes a single-call end can take: - octet-stream body via res.end(binary) — all 512 bytes spanning the 0-255 range round-trip byte-perfect - 80KB JSON body via res.end(buffer) — payload intact, no truncation or mangling from being buffered past the cap Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>