Skip to content

fix(cli): local incremental re-audit counts carried findings in the full audit's check units - #2159

Merged
nc9 merged 2 commits into
mainfrom
boat/incremental-carried-units-2097
Nov 20, 2026
Merged

nc9 merged 2 commits into
mainfrom
boat/incremental-carried-units-2097

Conversation

@nc9

@nc9 nc9 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Closes #2097

Local incremental re-audits now count carried findings the way the engine does after repo#3360.

  • smart-audits.ts: runSmartAudits takes the run's per-check-name tallies (checkTallies) and passes carriedChecksPerPage (engine checksPerPageFromTallies, now exported) to the scorer. The audit controller's page sink accumulates them via addPageCheckTallies.
  • reconstruct.ts: new countUnionTotals skips carried continuation (extra item) rows and adds clean carried passes, so passed/warnings/failed match a full audit.

Acceptance criteria

  • Same totals and score as a full audit: test 'a re-audit of two pages matches the full audit's totals and score' (apps/cli/tests/audit/smart-audits.test.ts)
  • Checks-per-page passed, continuation rows skipped: code above; mutation (checks-per-page forced to 1) turns the test red
  • Multi-check rule with multi-item findings on carried pages, parity asserted: same test (2 checks per page, 3 items per failing page)

Gates (apps/cli): format:check, lint, typecheck pass; cli suite 4567 pass 0 fail. audit-engine: typecheck pass; suite 2364 pass, 1 fail in leaked-secrets-residency-1552 (heap measurement flake under load; passes alone on this branch and on base).

Agent skill change needed: no.

@nc9
nc9 force-pushed the boat/incremental-carried-units-2097 branch from 152d756 to 782372b Compare November 20, 2026 20:52
@nc9
nc9 marked this pull request as ready for review November 20, 2026 21:07
@nc9
nc9 merged commit 3e299c4 into main Nov 20, 2026
8 of 15 checks passed
@nc9
nc9 deleted the boat/incremental-carried-units-2097 branch November 20, 2026 22:39
nc9 added a commit that referenced this pull request Nov 20, 2026
nc9 added a commit that referenced this pull request Nov 21, 2026
* origin/main:
  test(audit-engine): carriedCheckAsFailure keeps the continuation mark #2098 (#2166)
  fix(rules): correct zoom-disabled 1.4.4 wording, related criteria for wcagNone rules #2115 (#2174)
  refactor(cli): list bash completion flags one per line #2116 (#2175)
  feat(rules): waive a public Supabase table by bare name in security/supabase-rls #2103 (#2177)
  test(rules): every site rule emits a check on a clean site, with a shrinking baseline #1741 (#2179)
  feat(rules): report each 5xx page as its own crawl/server-errors finding #2130 (#2181)
  fix(rules): one finding per leaked field across json-sensitive-fields and auth-endpoint-disclosure, deduped by the runner #2083 (#2154)
  fix(cli): report --input keeps meta.partialAudit and publishes with it #2102 (#2153)
  fix(cli): local incremental re-audit counts carried findings in the full audit's check units (#2159)
  fix(crawler): cap stored entity refs and edges, skip corrupt refs rows #2135 (#2158)
  fix(crawler): a quick crawl fetches the start URL when a sitemap lists it past maxPages #2127 (#2157)
  fix(rules): security/exposed-actuator reads a 5xx through isUnverifiedReply, never part of a pass #2101 (#2151)
  fix(rules): hold large text to 3:1 in a11y/color-contrast #2105 (#2155)
  fix(cli): size the report list date column from rendered dates #2095 (#2152)

Signed-off-by: Nik Cubrilovic <[email protected]>
nc9 added a commit that referenced this pull request Nov 21, 2026
* origin/main:
  test(audit-engine): carriedCheckAsFailure keeps the continuation mark #2098 (#2166)
  fix(rules): correct zoom-disabled 1.4.4 wording, related criteria for wcagNone rules #2115 (#2174)
  refactor(cli): list bash completion flags one per line #2116 (#2175)
  feat(rules): waive a public Supabase table by bare name in security/supabase-rls #2103 (#2177)
  test(rules): every site rule emits a check on a clean site, with a shrinking baseline #1741 (#2179)
  feat(rules): report each 5xx page as its own crawl/server-errors finding #2130 (#2181)
  fix(rules): one finding per leaked field across json-sensitive-fields and auth-endpoint-disclosure, deduped by the runner #2083 (#2154)
  fix(cli): report --input keeps meta.partialAudit and publishes with it #2102 (#2153)
  fix(cli): local incremental re-audit counts carried findings in the full audit's check units (#2159)
  fix(crawler): cap stored entity refs and edges, skip corrupt refs rows #2135 (#2158)
  fix(crawler): a quick crawl fetches the start URL when a sitemap lists it past maxPages #2127 (#2157)
  fix(rules): security/exposed-actuator reads a 5xx through isUnverifiedReply, never part of a pass #2101 (#2151)
  fix(rules): hold large text to 3:1 in a11y/color-contrast #2105 (#2155)
  fix(cli): size the report list date column from rendered dates #2095 (#2152)

Signed-off-by: Nik Cubrilovic <[email protected]>
nc9 added a commit that referenced this pull request Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cli: local incremental re-audit still counts carried findings in pre-#3360 units

1 participant