Repository navigation
fix(core-contracts): raise runPerPageMs to 7200 so a 500-page full audit gets the 1h budget - #222
Merged
Merged
Conversation
…dit gets the 1h budget A 474-page rendered crawl of ~1MB Shopify pages takes ~27min to crawl and ~16min of rules on the cloud container; with the 500-page preset pinned to the 2400s base it timed out at 310/474 pages with memory to spare. The scalar is shared by the container runtime cap and the API reaper, so both move together. quick/surface presets are unaffected. Signed-off-by: Nik Cubrilovic <[email protected]>
7 tasks done
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.
Why
A 500-page full-coverage cloud audit of a site with ~1 MB HTML pages (drscholls.com, Shopify, ~820 KB inline script per page) takes ~27 min to crawl with rendering and ~16 min in the rules phase on the container.
runPerPageMs = 4_800pinned the 500-page preset to exactly the 2400 sfullbase, so the run timed out at 310/474 pages after the memory problem (private #1862) had already been fixed.What
runPerPageMs: 4_800 → 7_200. A 500-page full audit now scales to the existing 1 h ceiling (maxRunTimeoutMs).quick(25 × 7.2 s = 180 s) andsurface(100 × 7.2 s = 720 s) stay below their base budgets, so nothing changes for them. Crawl-phase budget scales with the same extra (worker-agentCRAWL_PHASE_EXTRA_FRACTION = 0.75): 1800 s + 900 s = 45 min for the 500-page preset, above the observed 27 min crawl. The container hard-kill (runtime + 180 s) and the API reaper (staleRunThresholdMs75 min) already assume the 1 h cap.The rule cost itself is tracked in private #1864; this PR only stops the budget from being the thing that fails.
Verification
No public test pins the constant (grep
runPerPageMs/4_800in packages/ and apps/ is only the definition). Private worker-agent/api timeout tests are updated in the gitlink-bump PR.