Skip to content

Findings on every page of one page type say so ("all 9 documentation pages") instead of listing them #857

Closed

Description

@nc9

Problem

A finding that applies to every page of one kind lists every page. The expected-schema check (schema/expected-type) on a SaaS site with a documentation section reports "Reads as a documentation page but declares no Article, TechArticle, HowTo or FAQPage structured data" and then prints nine page URLs, all the same template. #846 fixed this for page regions ("In the site footer, on 49 of 53 pages"); the same applies to page types. The reader wants "all 9 documentation pages", not nine rows.

The audit already knows each page's type (the page type classifier) and the count of pages per type (structure.pageTypes).

Expected

When a finding sits on (nearly) all the pages of one page type, say so once:

  • On all 9 documentation pages: reads as a documentation page but declares no Article, TechArticle, HowTo or FAQPage structured data
  • On 9 of 11 documentation pages when it is most but not all of them.
  • A finding spread across types, or on a few pages of a type, keeps today's page rows.
  • Compact formats (markdown, text, llm, console) drop the page list for a scoped finding; html keeps it collapsed; json and xml keep the bounded page list plus a scope object naming the page type and counts.
  • Same threshold idea as regions: a share of the pages OF that type (not of all pages), and at least two pages.
  • No change to detections, severities or scores.

Acceptance Criteria

  • A check whose affected pages are all of one page type and cover at least 80% of the audited pages of that type reads "On all N " (or "On N of M ") in markdown, text, llm and console, with no per-page URL list
  • html keeps the page list inside a collapsed element; json and xml keep the bounded page list and add scope with the page type, affected pages and pages of that type
  • A finding on pages of mixed types, on fewer than two pages, or below the share shows the same page rows as today
  • The denominator is the pages classified as that type in structure.pageTypes; a report without structure data (older stored crawl, classifier off) shows today's rows
  • schema/expected-type is the first rule covered; the pull request lists which other rules carry a page type on their items and which were left out
  • Page type names read as plain plurals ("documentation pages", "product pages", "contact pages", "blog posts") and respect the audit language rules (no em-dashes, sentence case)
  • Unit tests cover the threshold edge, the denominator, mixed types and the not-classified case; per-renderer snippets are asserted; the golden baseline numbers do not move
  • docs/reports.mdx and the schema/expected-type rule page describe the page type scope, and make validate passes in docs/

Activity

  1. added
    enhancement
    size: M
    rules
    on Oct 16, 2026
  2. added theissue type on Oct 28, 2026
  3. nc9 commented on Oct 31, 2026

    @nc9
    ContributorAuthor

    Closing. Checked against main (5387823):

    • Met, with code and tests: the "On all N / On N of M " wording in markdown, text, llm and console, the collapsed list in html, scope in json and xml, the 80% share of the pages of that type with a two page minimum, the structure.pageTypes denominator and the fallback to today's rows without it (packages/report/src/page-type-scope.ts, page-type-scope-857.test.ts 37 tests, console-page-type-scope-857.test.ts 4 tests), plain plurals, docs in docs/reports.mdx and docs/rules/schema/expected-type.mdx.
    • Golden baseline: the Audit engine golden tests job is green on main at 5387823 (CI run 41154915491), and make validate passes in docs/.
    • The criterion that the pull request lists which other rules carry a page type and which were left out was not done in the merged PR (feat(report,rules): link sections, component-aware findings, fix rollups, Page structure (3/3 of #926) #1181), so here is the list, from the code. Only schema/expected-type sets details.pageType together with details.pageTypeSource: "model" (packages/rules/src/schema/expected-type.ts:260), the label the page classifier counts in structure.pageTypes, and it is the only rule that gets the page type scope. content/thin-vs-site-norm also puts a pageType on its items, but from a different label space (a schema and URL based guess), so it is deliberately never scoped (page-type-scope.ts:21-25, covered by the test "a check from another rule that names a page type is not scoped"). No other rule carries a page type on its items; a rule that should be scoped later sets both fields.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions