Skip to content

Commit 05c5e18

Browse files
d-csclaude
andcommitted
test(webapp): neutralize comment on single-call res.end byte-integrity tests
Rewords the test-block comment to describe the contract being pinned without referencing the external reviewer that prompted the tests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1e4ee41 commit 05c5e18

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

apps/webapp/test/apiErrorBoundary.test.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,12 @@ describe("apiErrorBoundary", () => {
238238
expect(response.body).toEqual({ part1: "hello", part2: "world" });
239239
});
240240

241-
// CodeRabbit raised a concern that patchedEnd doesn't re-apply the
242-
// isStreamingContentType / MAX_BUFFER_BYTES bypass checks for single-call
243-
// `res.end(chunk)` paths. The bypasses exist for streaming pileup; a
244-
// single-call end isn't streaming, so the body is fully assembled either
245-
// way. These two tests lock in that no harm occurs: bytes flow through
246-
// unchanged for the scenarios CodeRabbit named (octet-stream content-type
247-
// and >64KB body via single-call res.end).
241+
// patchedWrite applies the isStreamingContentType / MAX_BUFFER_BYTES
242+
// bypass checks before buffering; patchedEnd does not, because a
243+
// single-call `res.end(chunk)` is one-shot rather than streaming
244+
// pileup — the body is fully assembled either way. These tests pin
245+
// the byte-integrity contract for that single-call shape: octet-stream
246+
// bodies and >64KB bodies both flow through unchanged.
248247
test("preserves bytes for octet-stream body delivered via single-call res.end(chunk)", async () => {
249248
const app = buildApp();
250249
// Construct binary bytes that span the full 0-255 range to catch any

0 commit comments

Comments
 (0)