Skip to content

perf/content-in-js-bundle: all-rendered audits read as clean; calibrate single-page severity with a real MDX positive control #1329

Closed

Description

@nc9

Follow-ups from the independent review of public PRs #1304 (perf/framework-data-payload) and #1307 (perf/content-in-js-bundle).

Why

  1. If every page of an audit is browser-rendered, feat(rules): perf/content-in-js-bundle finds page content compiled into a JS chunk (#1200) #1307 collects no sentences, searches nothing and passes with "No page content found". Nothing was judged, but it reads as clean.
  2. feat(rules): perf/content-in-js-bundle finds page content compiled into a JS chunk (#1200) #1307's single-page finding is info only, and info checks never reach the JSON or LLM output (pub#669), so agents never see it. The sitewide warn is visible. Promoting the single-page finding to warn when the chunk is mostly prose (for example at least 50% prose share) would make the true MDX-in-bundle case visible, but the threshold is unmeasured: the real-site smoke run found only hard-coded route components (0 to 11% prose share) and no real eager-MDX site.

Acceptance Criteria

  • An audit where every page was browser-rendered reports perf/content-in-js-bundle as not judged (an info check or skip with the reason), never as a clean pass
  • At least one real MDX-on-Vite (or similar eager MDX glob) site is run as a positive control and its prose share, chunk size and page count are recorded in the rule docs
  • The single-page finding's severity is decided from that data (promote to warn above a documented prose share, or keep info) and the docs state the decision
  • pub#669 (info-level checks absent from JSON and LLM output) is linked as the visibility dependency

Activity

  1. added
    enhancement
    size: S
    rules
    on Oct 30, 2026
  2. added theissue type on Oct 30, 2026
  3. nc9 commented on Oct 30, 2026

    @nc9
    ContributorAuthor

    Evidence for the acceptance criteria (PR #1354), with the method stated plainly:

    • AC1: an audit where every page was browser-rendered now returns one skipped content-in-js-bundle check saying so (tests for both engines, and for a partly rendered audit).
    • AC2: measured on a real eager-MDX TanStack Start site (132 MDX files) built in a scratch copy with an eager glob over every module: entry chunk 1,474 KB, the first paragraphs of 124 of the 132 files found in it, prose share 47%. The same site with server-rendered bodies: 603 KB chunk, none of the content in it, prose share 37%. This was measured by running the rule's matcher functions on the built chunks with paragraphs taken from the MDX sources, not by auditing the rendered site, so the rule's size floor, chunk and page caps and sitewide finding were not exercised on the real chunk. Recorded in the rule docs without hostnames.
    • AC3: the single-page finding stays info. The prose share does not separate the cases (47% vs 37%), and the 50% line came from the example in this issue, not from code; what separates them is the page count.
    • AC4: linked report: info-level checks never appear in the JSON or LLM output #669 in the docs.

    nik

  4. nc9 commented on Oct 30, 2026

    @nc9
    ContributorAuthor

    Shipped in v0.0.145 (df5e36e8 7c1ebb79 36f970f0 a99872b3), verified against main: every acceptance criterion is met. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.145

    nik

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

    enhancementrulessize: S

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions