Repository navigation
fix(rules): a rule abandoned for its time budget is not evaluated, never a failed check #960 - #969
Conversation
…ver a failed check #960 Signed-off-by: Nik Cubrilovic <[email protected]>
|
Reviewed the diff. The change is coherent: timed-out rules become skipped
|
Signed-off-by: Nik Cubrilovic <[email protected]>
|
Review of #969 (timed-out rule becomes a skipped check, not a fail). The change is coherent. The test coverage is good: it uses the real runner and the real scorer, and covers the first-page and later-page cases plus the resolution-signal carry. I read the diff only and did not run the tests.
|
Signed-off-by: Nik Cubrilovic <[email protected]>
|
Reviewed the diff: the runner, the page-time extractor path, the site-rule path, docs, changelog and tests. I didn't run the test suite.
|
What
A rule abandoned for its time budget is now an explicit not-evaluated state, never a failed check:
<rule>-errorisskippedwithskipReason: "rule-timed-out"(new shared constant in core-contracts) on EVERY page it times out on, the first included (wasfailon the first). Site-rule timeouts too. Thrown errors stayfail.collectedTimeoutChecks): a skipped row per timed-out page, same shape.<rule>-timeoutsinfo row (pagesNotChecked) kept, and now also emitted for extractor timeouts, since the per-page row is a skip.details.timedOutstays on every row, so the rule-result cache still refuses to replay a timed-out page; template fan-out still keys on the-errorname.What I traced
calculateRuleScore/addChecksToTallyignoreskipped(and a rule with only skips is excluded from scoring), so a timeout adds no fail, no failUnits and no score change. Newrule-timeout-score-960.test.tsruns the real RuleRunner and scorer: first-page and later-page timeout givefailed/failUnits0 and the sameoverallas the audit with that page left unchecked.notEvaluatedand its prior finding carries (new test inresolution-compact.test.ts).Codex pass: 3 findings, fixed (site-timeout gate, per-page extractor skips); the all-pages gap is #968.
Visibility of a timed-out security rule
rule-timed-outis now inNOT_CHECKED_SKIP_REASONS, so every report printsNot checked: <rule>. ... A timed-out rule did not check those pages, so no finding there is not a clean result. Run the audit again, or raise [rules] time_budget_ms if the machine was busy.(CLI console in yellow, text, markdown, HTML, XML, LLM, editor summary), not only the-timeoutsinfo row. Test renders a timed-outsecurity/leaked-secretsthrough the text and markdown renderers. Side effects of that membership, both intended: the publish cap pins these rows (like the other not-checked rows), and a rule whose every check timed out is not listed as a locked cloud rule. Caveat: info-severity rules are left out of the line by design, and a rule timing out on thousands of pages pins one small row per page.Elapsed time
RuleTimeoutErrormeasures wall-clock ms; each timed-out row carriesruleId,budgetMs,elapsedMs(diagnostic only, never scored or tallied) and the-timeoutsrow carriesmaxElapsedMs; extractor timeouts carry it through the collected signal. Details pass through the publish step untouched.Docs
rules/index#rule-time-budget,configuration/rules#time_budget_ms, CHANGELOG Fixed; tangly check passes. Rule verdicts unchanged apart from this status; audit-engine goldens (rule-cache-replay, streaming canonical) pass.skills: no change in this repo's skill files found (
skills/is a separate repo); the squirrelscan skill may describe-errorchecks as failures, to be checked there.Closes #960