Consent bomb test: pin the inflate output cap, not a wall-clock bound #13

Merged
heimdall merged 1 commit from heimdall/consent-bomb-deterministic into main 2026-11-13 07:15:10 +00:00
Member

Closes follow-up flaky-joystick-consent-timing.

tests/joystick-consent.test.ts timed a 300 MB bomb refusal against 1500 ms and measured 3330 ms under parallel load. The property is that the consent wording is inflated under the 16 KB cap (src/app.ts:323). The test now wraps node:zlib's inflateRawSync, records its options, and asserts every inflate carried maxOutputLength <= 16 KB; the bomb is 4 MiB (no 300 MB allocation).

Mutant: dropping maxOutputLength in src/app.ts fails this test (checked). Full suite 659 passed, tsc clean. Test-only; no deploy.

🤖 Generated with Claude Code

Closes follow-up flaky-joystick-consent-timing. tests/joystick-consent.test.ts timed a 300 MB bomb refusal against 1500 ms and measured 3330 ms under parallel load. The property is that the consent wording is inflated under the 16 KB cap (src/app.ts:323). The test now wraps node:zlib's inflateRawSync, records its options, and asserts every inflate carried maxOutputLength <= 16 KB; the bomb is 4 MiB (no 300 MB allocation). Mutant: dropping maxOutputLength in src/app.ts fails this test (checked). Full suite 659 passed, tsc clean. Test-only; no deploy. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The 1500 ms bound measured 3330 ms under parallel load. What the test proves is that
a decompression bomb is read under the 16 KB cap; record the inflate options and assert
maxOutputLength directly. Mutant (drop the cap) fails the test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/Heimdall!13
No description provided.