Repository navigation
fix(lint): raise interpreter scaling cap to 15 s (DRO-4114) - #21
Merged
Merged
Conversation
The v0.4.1 Publish run failed in lint-spec: the `pwd:` interpreter attack took 10.7 s at 1 MB alone, over the 10 s absolute cap. It grows ~9x from 100 KB to 1 MB (allowed 30x), so this is runner variance, not a ReDoS: the same attack passed at ~8.8 s on the PR branch's CI. 15 s leaves headroom; the growth check is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unblocks the v0.4.1 release. Linear: DRO-4114. No version bump: after merge,
v0.4.1moves to the merge commit and Publish runs again. Nothing was published for 0.4.1.Why it failed
The Publish run failed in
bun tools/lint-spec.tswith one problem:pwd:(about 250,000 keys) and runs the redactor over it.pwd:is the slowest attack because it is the shortest key.Strange that it passed before?
No. The same attack passed on the PR CI at ~8.8 s (#19) and before that at ~8.5 s. It measured 10.7–10.9 s on main and in Publish. The cap left only ~15% headroom, so a small runner slowdown was just enough to cross it. #20 looked green because it didn't touch the spec, so
spec-scalingwas skipped; Publish always runs the full lint.pwd:at 1 MBChange
tools/lib/scaling-run.ts:MAX_INTERPRETER_MS_AT_LARGE10 s → 15 s, with a comment saying why. The 30x growth check is unchanged.tools/lib/scaling-run.test.ts: new test pins 12 s (linear) as passing and 16 s as still failing.spec/SPEC.md: the scaling section now says 15 s. Not hashed;tools/sync-spec --checkpasses.Verification
bun test tools/lib: 29 pass.tsc --noEmitclean.bun tools/lint-spec.ts --only-scalingpasses locally (a faster Mac; this PR'sspec-scalingjob is the real runner check).Follow-up (not in this PR)
spec/SPEC.mdsays retries take "the best time per size"; the interpreter run actually keeps the whole attempt with the fewest problems.Change brief (private): https://app.notion.com/p/424ad8f2ae5781ad8aa8d3413b21cc6c