Skip to content

A rule abandoned for its time budget renders as a failed check with a rule-error message #960

Closed

Description

@nc9

What happens

When a page rule runs past its time budget, the first page it times out on is reported as a failed check. The check is named <rule-id>-error and its message is Rule error: exceeded its 1000 ms time budget and was abandoned.

The rule never finished on that page, so nothing was found there. Readers still see it as a failed finding, and an error-severity one for a security rule.

Observed on cloud report 01M5CWW5X3Y358FEE8V33J35BS (scheduled audit on 2026-10-20, 10 pages, engine v0.0.120):

  • security/mixed-content → check security/mixed-content-error, status: "fail", details { "timedOut": true, "budgetMs": 1000, "pages": 1 }
  • checkTallies["security/mixed-content"] counts it as "security/mixed-content-error": { "failed": 1, "failUnits": 1 } next to "mixed-content": { "passed": 9 }
  • siteChecks also has the info row security/mixed-content-timeouts with pagesNotChecked: 1, which says the page was not checked.

So the same report says both "1 page not checked" and "1 failed mixed-content check". On the previous weekly run of the same site (2026-10-13), the rule passed on all 10 pages, so this looks like a slow or busy run, not a hostile page.

Where it comes from

packages/rules/src/runner.ts:

  • errorChecks (around line 515): on the first RuleTimeoutError for a rule, it returns { name: "<id>-error", status: "fail", message: "Rule error: …", details: { timedOut: true, budgetMs, pages: 1 } } (line 547).
    • Later pages for the same rule get status: "skipped" with skipReason: "rule-timed-out" (line 532).
    • So only the first timed-out page is a fail.
  • collectedTimeoutChecks (around line 807): it builds the same status: "fail" -error check for page-time extractors that ran past the budget.
  • timeoutSummaryChecks (around line 787): it adds the -timeouts info check with pagesNotChecked.

docs/rules/index.mdx ("Rule time budget") documents the current behaviour: "The report records it as a failed check named after the rule with -error on the end". So this is a request to change documented behaviour, not a regression.

Expected

A rule abandoned for its time budget is shown the same way as the other not-checked states (see #518 for skipped checks, and the unconfirmed/not-checked work): as not evaluated on that page, not as a failed finding. If it needs its own state, that state does not count as a fail and does not lower the score. The -timeouts info check that already exists can stay the place that surfaces it.

Acceptance Criteria

  • In the report JSON, a rule that times out on a page shows an explicit not-evaluated / timed-out status for that page (for example skipped with skipReason: "rule-timed-out", or a dedicated status). It is not status: "fail", and that includes the first page it timed out on.
  • checkTallies does not count a timed-out page as failed or failUnits for that rule.
  • The health score of an audit where a rule times out on a page equals the score of the same audit with that page left unchecked for that rule. A timeout adds no penalty.
  • Page-time extractors that run past the budget (collectedTimeoutChecks) follow the same rule.
  • The -timeouts info check (with pagesNotChecked) is still emitted, and the text, markdown and HTML reports show the page as not checked, not as an issue.
  • The CLI and cloud audits produce the same statuses for a timed-out rule.
  • docs/rules/index.mdx ("Rule time budget") and the time_budget_ms entry in docs/configuration/rules.mdx describe the new status. make validate passes.
  • A test covers a page rule that times out on its first page and on a later page, and asserts the status, the tallies and that the score is unchanged.

skills: the squirrelscan agent skill may describe -error checks as failures; check it when this lands.

Activity

  1. added
    bug
    size: S
    rules
    on Oct 20, 2026
  2. nc9 commented on Oct 20, 2026

    @nc9
    ContributorAuthor

    Second example, a different rule on a different site: cloud report 01M5DAQ857J9ZK462WFT7JX11Z (scheduled audit, 2026-10-20, 10 pages, engine v0.0.120).

    • content/placeholder-contact gives check content/placeholder-contact-error with status: "fail", Rule error: exceeded its 1000 ms time budget and was abandoned, details { "timedOut": true, "budgetMs": 1000, "pages": 1 }.
    • siteChecks has content/placeholder-contact-timeouts (info, pagesNotChecked: 1), while checkTallies counts the same page as failed: 1, failUnits: 1 beside passed: 9.

    Rate in the cloud reports we sampled: 2 timed-out rule checks in 13 reports since the v0.0.120 engine deployed, against 0 in about 112 reports before it. v0.0.119..v0.0.120 changes no rule-runner, budget, mixed-content or placeholder-contact code (the only rules change is social/asset-divergence, #953). So the timeouts look like wall-clock pressure on busy runs, which is the case the docs already call out, and not a slow pattern. Each one still shows up as a failed finding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugrulessize: S

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions