Skip to content

smart audits: cloud coverage counts understate carried pages; fails from pages outside the crawl carry indefinitely #1031

Closed

Description

@nc9

Summary

Smart-audit coverage counts understate carried pages in cloud reports. A capped scheduled run that audits 10 pages reports knownPages = auditedPages = 10 but carriedFindings = 183: 150 of those are carried a11y/form-labels fails (50 on each of 3 pages that are not among the 10 audited; last seen 1 to 2 weeks earlier). No exact duplicates, and pagesWithStaleCarry is empty. The same site's previous weekly run showed the same pattern with 148 carried rows on 2 out-of-crawl pages, so the carried set grows by about 50 rows per run as the capped crawl rotates pages.

The documented smart-audit invariant says carriedFindings > 0 implies knownPages > auditedPages. That holds for the CLI path; in cloud, knownPages appears to count only this run's crawl, so the invariant breaks and consumers cannot tell that findings from pages outside the crawl are being carried forward.

Possibly related to #497 (bound the complete-store merge by the run, not the site's open-findings history).

Acceptance Criteria

  • In a cloud/sampled publish merge, knownPages includes every page that has a carried finding, so carriedFindings > 0 implies knownPages > auditedPages (or the invariant is restated and documented with the real semantics)
  • pagesWithStaleCarry (or an equivalent count) reports pages whose carried findings come from pages outside this run's crawl
  • A test builds a capped second run over a rotated page set and asserts the coverage counts include the out-of-crawl carried pages
  • Decide and document whether carried fails on pages outside the crawl should expire after N runs or days; if so, a test covers the expiry
  • Docs for smart audits / coverage describe the counts; CHANGELOG entry

Activity

  1. added
    bug
    size: M
    rules
    on Oct 22, 2026
  2. nc9 commented on Oct 26, 2026

    @nc9
    ContributorAuthor

    Docs restated in #1173 (what audited, known and carried mean; carried findings do not expire until the page is re-crawled or removed). Engine behaviour is unchanged: when carried pages have active page records, knownPages already includes them (cloud-merge.test). In production the case is not systematic: of 31,840 pages holding open findings, 2 pages on 1 site have no page record at all (90 carried rows, last seen 2026-10-02). The root cause is being investigated privately as squirrelscan/repo#3509; the engine-side count (a distinct-carried-pages floor on knownPages) waits on whether that shows a systematic gap.

  3. added theissue type on Oct 28, 2026
  4. 10 remaining items

  5. nc9 commented on Nov 13, 2026

    @nc9
    ContributorAuthor

    The CLI and engine side shipped in squirrel v0.0.180 (see the v0.0.180 section of CHANGELOG.md). Kept open until the hosted (cloud) side meets the remaining acceptance criteria.

  6. nc9 commented on Nov 15, 2026

    @nc9
    ContributorAuthor

    Public side done on main d41e1fb: the invariant (carriedFindings > 0 implies knownPages > auditedPages) is in docs/configuration/index.mdx and the CHANGELOG; coverage.carriedPagesOutsideCrawl is in merge-promise.ts (a69e2a3), opt-in via countCarriedPagesOutsideCrawl; covered by cloud-merge.test.ts 'a capped run over a rotated page set...' and canonical-variants-merge-1350 (44 pass). The remaining hosted-side work (the store-side count of recordless pages holding open findings, and enabling the flag) is private, tracked in squirrelscan/repo#3509. Closing.

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: M

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions