Repository navigation
fix(rules): a rule that throws is reported once as not evaluated, not as a failure per page #1291 - #1342
Closed
nc9 wants to merge 2 commits into
Closed
fix(rules): a rule that throws is reported once as not evaluated, not as a failure per page #1291#1342nc9 wants to merge 2 commits into
nc9 wants to merge 2 commits into
Conversation
|
Review of #1342. The change is coherent and the tests cover the main path. I read the diff only and did not run the tests. Findings:
|
… as a failure per page #1291 Signed-off-by: Nik Cubrilovic <[email protected]>
…l-on counts a rule that threw, docs #1291 Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
force-pushed
the
fix/engine-robustness
branch
from
October 30, 2026 08:34
fbf3c91 to
52dadbc
Compare
|
Review of #1342 (thrown rule reported as not evaluated). The approach is sound and reuses the timeout path cleanly. I read the diff and the surrounding runner code but did not run the tests.
No critical or high issues found. |
Contributor
Author
|
Landed in v0.0.144 as nik |
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.
Closes #1291
A rule that threw was recorded as a failed
<rule>-errorwith the rule's own severity on every page, so one defect in squirrel read as N failures and lowered the score. It is now handled like a rule that ran out of time (#960): a skipped<rule>-error(not evaluated; skipReasonrule-timed-out, so merge, resolution and carry already treat it as a gap) withdetails.errored, the first error (clipped to 200 characters, it can quote page content) and the page count, plus one<rule>-errorsinfo row per audit. The report prints aNot checked:line saying it is a squirrelscan defect, and--fail-oncounts a thrown security rule as one warning like a timeout.Score on a fixture (one rule, 26 pages, throws on 20): before 9, after 100, equal to the 6 good pages alone. Test:
packages/audit-engine/tests/rule-throws-score-1291.test.ts(single check set, no fail tally, score equal to the audit without those pages), plus report and updated runner tests.Design note: reuses
rule-timed-outas the skip reason (markederrored: true) rather than a new one, so older dashboards and carry logic treat it as not evaluated without a release; wording branches ondetails.errored.Docs:
docs/rules/index.mdx(new "A rule that throws" section) and CHANGELOG under Unreleased. Skill: none.