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: a whole-audit time budget that writes a partial report instead of being killed #1271
squirrel audit has no overall wall-clock budget. [rules] time_budget_ms bounds one rule on one page, but nothing bounds the whole audit. A slow or throttling site (adaptive backoff from #1829 working as intended) can keep a 30-page audit running for 5+ minutes.
Batch and CI callers have to wrap the CLI in an external timeout and kill it. A killed audit writes nothing, so every page already crawled and every rule already evaluated is lost.
Seen in a 656-site batch on v0.0.140 with a 240 s external timeout: 2 audits were killed (exit 143) with no report. A throttled site that was re-run alone finished after 322 s with 19 of 30 pages.
Acceptance Criteria
squirrel audit --max-duration <secs> (and a matching squirrel.toml key) stops discovery and fetching when the budget is reached, then evaluates rules on the pages already fetched and writes the report as usual.
A report cut short by the budget has status: "partial" with a reason code that names the budget, and lists how many discovered pages were not fetched.
Rule evaluation after the cut-off is bounded too, so the process exits within a stated margin of the budget, and the docs give that margin.
Unset means today's behaviour, with no budget.
Docs (CLI audit reference and configuration) and shell completions are updated in the same PR.
Decision (Nik, 2026-10-29): the cut-off contract is report status partial, reason code max_duration, and a count of unfetched pages. The audit stops launching new work at the budget, finishes in-flight pages, and exits within a margin of max(10% of the budget, 15 s). Documented in the audit reference and exit codes. No budget set means no limit (today's behaviour). Queued with the CLI audit-controls group (#1260, #1258).
Shipped in v0.0.144 (commits 58aa113, 6f0715e, 9988f02, cee2780). Checked every acceptance criterion against current main: --max-duration writes a partial report at the wall-clock budget.
Activity
nc9 commentedon Oct 30, 2026
Decision (Nik, 2026-10-29): the cut-off contract is report status
partial, reason codemax_duration, and a count of unfetched pages. The audit stops launching new work at the budget, finishes in-flight pages, and exits within a margin of max(10% of the budget, 15 s). Documented in the audit reference and exit codes. No budget set means no limit (today's behaviour). Queued with the CLI audit-controls group (#1260, #1258).fix(cli,crawler): max-duration covers the reachability probe and disc…
feat(cli): audit --max-duration stops at a wall-clock budget and writ…
fix(cli,crawler): max-duration covers the reachability probe and disc…
fix(cli): max-duration unreachable reason, docs limits and exit 5, co…
fix(cli): max-duration unreachable reason, docs limits and exit 5, co…
feat(cli): audit --max-duration stops at a wall-clock budget and writ…
fix(cli,crawler): max-duration covers the reachability probe and disc…
fix(cli): max-duration unreachable reason, docs limits and exit 5, co…
fix(cli,crawler): max-duration: stop during the preamble holds, seed …
test(cli): build the credentialed URL at runtime for the secret scan #…
test(cli): build the credentialed URL at runtime for the secret scan #…
test(cli): build the credentialed URL at runtime for the secret scan #…
feat(cli): audit --max-duration stops at a wall-clock budget and writ…
fix(cli,crawler): max-duration covers the reachability probe and disc…
fix(cli): max-duration unreachable reason, docs limits and exit 5, co…
fix(cli,crawler): max-duration: stop during the preamble holds, seed …
test(cli): build the credentialed URL at runtime for the secret scan #…
nc9 commentedon Oct 30, 2026
Shipped in v0.0.144 (commits 58aa113, 6f0715e, 9988f02, cee2780). Checked every acceptance criterion against current main:
--max-durationwrites a partial report at the wall-clock budget.nik