You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
audit --max-duration: bound the CPU cost of one very large page #1332
Follow-up to #1271 (PR #1324). --max-duration cannot interrupt synchronous work: a single very large page (a 30 MB HTML file) blocks the event loop while it is parsed, during the crawl as well as in the rules phase. The budget timer then fires late, and a loaded run was seen taking 109 s against a 15 s budget.
Acceptance Criteria
In a budgeted run, a page whose body exceeds a documented size is not parsed or evaluated past the deadline: either a size cap for budgeted runs, or a deadline check before the parse, and the skipped page is counted in maxDuration.pagesTooLarge and listed in maxDuration.tooLargePages (pagesNotEvaluated stays 0 by design)
A real-CLI test with a local site serving one very large page and a small budget exits within budget plus the documented margin
A run without --max-duration is unchanged
The "Limits" paragraph in docs/cli/audit.mdx is updated to match
Verified against main after v0.0.145. Met: criteria 2, 3 and 4 (a 6 MiB page finishes inside the budget, a run without the flag is unchanged, the docs describe the cap). Open: criterion 1 says the skipped page counts in pagesNotEvaluated, but it is reported in its own pagesTooLarge and tooLargePages fields (pagesNotEvaluated stays 0). Either the criterion needs amending to the shipped fields or the count should also go into pagesNotEvaluated. Leaving this open for that decision.
Activity
fix(audit-engine,crawler,cli): a budgeted run does not parse or evalu…
fix(audit-engine,crawler,cli): a budgeted run does not parse or evalu…
fix(audit-engine,crawler,cli): the parse cap holds in every pass, own…
fix(audit-engine,crawler,cli): a budgeted run does not parse or evalu…
fix(audit-engine,crawler,cli): the parse cap holds in every pass, own…
nc9 commentedon Oct 30, 2026
Verified against main after v0.0.145. Met: criteria 2, 3 and 4 (a 6 MiB page finishes inside the budget, a run without the flag is unchanged, the docs describe the cap). Open: criterion 1 says the skipped page counts in
pagesNotEvaluated, but it is reported in its ownpagesTooLargeandtooLargePagesfields (pagesNotEvaluatedstays 0). Either the criterion needs amending to the shipped fields or the count should also go intopagesNotEvaluated. Leaving this open for that decision.nik
nc9 commentedon Oct 30, 2026
Shipped in v0.0.145 (
ec1a5b7831f5bacb), verified against main: every acceptance criterion is met. Criterion 1 now names the shipped fields: a skipped large page is counted inmaxDuration.pagesTooLargeand listed inmaxDuration.tooLargePages, andpagesNotEvaluatedstays 0 by design. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.145nik