Repository navigation
Closed
Closed
Findings on every page of one page type say so ("all 9 documentation pages") instead of listing them#857
Feature
Copy link
Labels
Description
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 dataOn 9 of 11 documentation pageswhen 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
scopeobject 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
scopewith 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-typeis 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.mdxand theschema/expected-typerule page describe the page type scope, andmake validatepasses indocs/
Activity
nc9 commentedon Oct 31, 2026
Closing. Checked against main (5387823):
scopein json and xml, the 80% share of the pages of that type with a two page minimum, thestructure.pageTypesdenominator and the fallback to today's rows without it (packages/report/src/page-type-scope.ts,page-type-scope-857.test.ts37 tests,console-page-type-scope-857.test.ts4 tests), plain plurals, docs indocs/reports.mdxanddocs/rules/schema/expected-type.mdx.Audit engine golden testsjob is green on main at 5387823 (CI run 41154915491), andmake validatepasses indocs/.schema/expected-typesetsdetails.pageTypetogether withdetails.pageTypeSource: "model"(packages/rules/src/schema/expected-type.ts:260), the label the page classifier counts instructure.pageTypes, and it is the only rule that gets the page type scope.content/thin-vs-site-normalso puts apageTypeon 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