Repository navigation
fix(audit-engine): a check skipped on a page never resolves its prior finding #508 - #1010
Conversation
|
Review of #1010 (carry findings when a check was skipped on a re-crawled page). The change reads correct. I read the diff and spot-checked
No blocking issues. |
|
Review of #1010 (carry findings when a check was skipped on a page) I read the diff and confirmed that the imported constants and key helpers (
The tests cover each signal variant, the key-dropped case, a clipped folded row and the local merge. I found no correctness, security or performance problems. |
… finding #508 Signed-off-by: Nik Cubrilovic <[email protected]>
…the local merge #508 Signed-off-by: Nik Cubrilovic <[email protected]>
f6a1170 to
30570e5
Compare
|
Review of #1010. The change is well scoped and well documented, and I found nothing that should block merge.
Test coverage is good: it covers the dropped, truncated and healthy signal variants, the scan-truncated case, and a page whose check passed still resolving. |
A page check that was skipped this run (
perf/ttfbwith no timing data,scan-truncated) was protected from a wrong resolve only by the publish resolution signal'snotEvaluatedlist. The skipped checks themselves are now read into evidence the merge consults first, so a prior finding on such a page carries whatever the signal says.What changed:
merge-core.ts:createNotEvaluatedCollectormirrors the signal builder's own definition of "not evaluated": a page that skipped a check (not the noindex verdict, which reads as clean, and not a timeout, which<rule>|*covers) while the check ran on another page, or ascan-truncatedskip. A check skipped on every page gives no evidence, as in the signal. A folded skip row clipped past its cap marks every page of the check.computeMerge/createMergeSessiontake it asnotEvaluatedand carry before any signal or sample logic.merge-promise.ts: sampled publish merge collects it from the published checks (replays excluded).runSmartAuditspasses it tomergeFindings(apps/cli/src/controllers/audit.ts,apps/cli/src/audit/smart-audits.ts).docs/configuration/index.mdxSmart Audits bullet; CHANGELOG bullet.Acceptance criteria:
notEvaluatedover budget: already carried since #2658, now pinned by tests in both.Tests:
packages/audit-engine/tests/not-evaluated-carry-508.test.ts(16; 3 fail with the carry disabled): sampled merge against a healthy, dropped-key and truncated-key signal, all-skipped and noindex staying resolved, clipped folded skip, local merge with and without evidence. Also pass: cloud-merge, merge-session-pages, carried-provenance-merge, bounded-carried-merge, scan-truncated-carry, compact-resolution-merge, complete-store-parity, timeout-no-resolve-968, merge-scoring. tsgo clean in audit-engine and apps/cli;tangly check --strictclean. The CLI sink wiring has no test of its own (one line each, covered by the type check and the computeMerge tests).Review round:
rule-timed-outskip) or threw (failed<rule>-error) as a carry for the pages it names, every page when it names none or its list is clipped. The CLI local merge has no resolution signal, so it would otherwise resolve those. Thrown detection is local to the collector (independent of fix(rules): a rule that threw never resolves its prior findings #999 #1000 #1007), and a replayed (carried or unrendered) row is not counted, which is the fix(rules): a rule that threw never resolves its prior findings #999 #1000 #1007 provenance nit applied here. A rule that later passes clears. Tests cover the local merge for both.core/canonical-headerno Link header,ax/token-weightbelow minimum size,core/doctypeandcore/charsetempty response or parse error) now carry priors on local audits as the cloud already does. Filed smart audits: give page-inapplicable rule skips a not-applicable skipReason so they stop carrying priors #1011 to give them a not-applicable skipReason. The docs bullet says so.Docs: updated. Agent skill (
squirrelscan/skills): not needed.Refs #508