Skip to content

perf/content-in-js-bundle changes its count and its verdict between audits of the same site #1761

Closed

Description

@nc9

Five cloud audits of the public demo site nutshop.squirrelscan.com (repo squirrelscan/nut-shop) ran within 45 minutes on 2026-11-11. Between them, small faults were switched on and off on a handful of pages; the way the site ships its content did not change, and the rule reported the same chunk size (182 KB) every time. The site-level check gave five different answers:

Audit Check Status Message
1 content-in-js-bundle-sitewide warn carries the content of 6 pages (182 KB) in every page's bundle
2 content-in-js-bundle-sitewide warn carries the content of 4 pages
3 content-in-js-bundle only info 1 JS chunk(s) contain the page's own content as script
4 content-in-js-bundle-sitewide warn carries the content of 5 pages
5 content-in-js-bundle-sitewide warn carries the content of 3 pages

In audit 3 the site-wide warning disappeared, so anything tracking findings across audits (the comparison, an issue list) saw the problem as fixed, and saw it come back as new in audit 4. Nobody fixed or broke anything.

The count looks like it depends on which pages happened to be compared against the chunk, or on a threshold that the same site sits on either side of.

Expected: the same site gives the same verdict. The number of pages stated is either the real number of pages whose text is in the chunk, or it is described as a sample.

Acceptance Criteria

  • Two audits of an unchanged site give the same status for content-in-js-bundle-sitewide and the same page count, shown by a test that runs the rule twice over the same crawl data with pages supplied in a different order.
  • The cause of the 6, 4, none, 5, 3 sequence on the demo site is stated in the PR (sampling, page order, a threshold, or something else), with the fix aimed at that cause.
  • If the rule compares a sample of pages, the message says so ("at least N pages" or "N of M pages checked") and the verdict does not depend on which pages were sampled once any qualifying page is found.
  • A site that sits near the threshold does not alternate between warn and no finding: the rule either uses a margin or reports the measured value in both cases.
  • The existing positive control (MDX content site) and the all-rendered case still behave as they do today.

Activity

  1. added
    bug
    size: M
    rules
    on Nov 11, 2026
  2. added theissue type on Nov 11, 2026
  3. nc9 commented on Nov 12, 2026

    @nc9
    ContributorAuthor
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