Skip to content

test(core): over-long body input is refused on length, asserted structurally instead of by a 50 ms bound - #985

Merged
jimhoyd merged 1 commit into
mainfrom
claude/body-limit-timing
Sep 29, 2026
Merged

jimhoyd merged 1 commit into
mainfrom
claude/body-limit-timing

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

A body-validation test bounded a 100,000-character check at 50 ms (test/body-validation-limits.test.ts). It failed once while the machine was under load (seen during PR #984's local verify) and passed on reruns. That is a timing flake in the same file that already raised its other ceiling to 2 s for hosted runners.

The test now asserts the behaviour, not the time:

  • the over-long string yields only must be at most 128 characters, so the declared pattern is never evaluated; maxLength is checked before pattern and validation stops at the first failure;
  • a short string yields does not match the declared pattern, which shows the pattern does apply within the bound.

The per-pattern ceiling test (2 s, hosted runners) is unchanged.

🤖 Generated with Claude Code

…0 ms

The body-validation limits test bounded a 100,000-character check at 50 ms; it failed once under load (PR #984's verify).
It now asserts the outcome: only the maxLength issue, so the pattern is never evaluated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jimhoyd
jimhoyd enabled auto-merge (squash) September 29, 2026 22:07
@jimhoyd
jimhoyd merged commit 0940fcb into main Sep 29, 2026
22 checks passed
@jimhoyd
jimhoyd deleted the claude/body-limit-timing branch September 29, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant