Skip to content

fix(rules): content/word-count skips noindex pages #841 - #1021

Closed
nc9 wants to merge 1 commit into
mainfrom
fix/841-page-type-thin-content
Closed

nc9 wants to merge 1 commit into
mainfrom
fix/841-page-type-thin-content

Conversation

@nc9

@nc9 nc9 commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Refs #841 (partial: the noindex half). Not Closes: the contact and legal half cannot be built on public main yet, see below.

What this PR does

  • content/word-count declares skipOnNoindex, so the runner skips it on a page kept out of search (robots meta or X-Robots-Tag), recording Skipped: page is set to noindex via <source>. Same guard as the other index-presentation rules: only on a site whose homepage is indexable, so a staging or preview host still gets thin-content findings. The skipped check carries foldKey: "noindex" like the others, so a report can say why the page was not judged.
  • noindex-skip.test.ts now lists content/word-count in the gated set (skip naming the meta tag and header, indexable page runs, noindex homepage keeps running) and the explicit skip-list test expects four rules.
  • Docs: content/word-count page and the "Pages kept out of search" section of rules/index.mdx (nine rules became ten). CHANGELOG bullet.

Decisions per rule (also to be recorded on the issue)

  • content/word-count: skips noindex (this PR). Page-type relaxation (contact, legal) deferred.
  • core/meta-description (short), core/meta-title (short), core/h1: already skip noindex since Index rules should skip noindex pages, and core/robots-meta should report X-Robots-Tag: noindex #457; unchanged.
  • content/thin-vs-site-norm: unchanged. It is a site rule that compares each page type's word count with the site's own norm via the streaming siteQuery; leaving noindex pages out of those groups needs a streaming-query change, worth its own issue.
  • content/keyword-stuffing, content/reading-level: unchanged. They judge the text itself, not a search snippet or a length floor, and a noindex page can still be stuffed or unreadable for visitors.
  • eeat/* author and date rules: unchanged, pending a trusted page type.

Why the contact and legal half is not here
The model-sourced ParsedPage.classification.pageType and schema/expected-type the issue describes are not on public main (only the held Treetop branch has them). The public ParsedPage.pageType is derived from schema and URL patterns, which is exactly the "rules-fallback" label the issue says must never relax a verdict, so I did not use it. Once the classification lands in public, word-count can read it through a small helper (model source and confidence at or above 0.9 only) and count skippedByType.

Not done: the before and after on three real audits (the contact and legal effect needs the classifier). The noindex effect is covered by the runner tests.

Tests: noindex-skip.test.ts, template-verdict-page-independence.test.ts, content-without-js.test.ts, thin-vs-site-norm.test.ts, capped-rescore.test.ts, apps/cli/tests/rules/loader.test.ts all pass; tsgo packages/rules clean; tangly check --strict passes. Agent skill: no change needed.

@claude

claude Bot commented Oct 22, 2026

Copy link
Copy Markdown

Reviewed the diff: a one-line skipOnNoindex: true on content/word-count, plus the matching docs, changelog and the explicit skip-list test. It uses the same mechanism as core/meta-title, core/meta-description and core/h1, and I found no problems that should block merge. I only read the diff and did not run the tests.

  • (nit) docs/rules/index.mdx: the count changed from "Nine rules" to "Ten rules". Check that the list still adds up to ten.
  • (nit) CHANGELOG.md: there is an extra blank line before ## v0.0.127.
  • (low) Tests: noindex-skip.test.ts only checks that the rule declares the flag. Its existing GATED runner tests should now cover word-count, but I did not confirm that they exercise the thin-content path. Check that a noindex page, and a noindex homepage on a staging site, are covered for this rule.

nc9 added a commit that referenced this pull request Oct 22, 2026
…nt, skip reasons, link phrases (#1034)

Batch of six reviewed PRs landed through one branch and one CI run:
- #1032 Bun 1.4.4 pin (CA blocklist for the eight compromised eMudhra intermediates, NSS 3.131.1 roots)
- #1030 nested CSS evidence for the style reader (repro from #1014 by @dbdefault)
- #1025 page-intrinsic skips use a not-applicable reason so priors resolve
- #1019 generic link phrases in ten more languages for link-text and anchor-text
- #1021 content/word-count skips noindex pages
- #1023 retirement of abandoned crawls uses the crawl lease
Plus a test fix for the residency probe on Bun 1.4.4 linux-x64.

Closes #840
Closes #946
Closes #1011
Closes #1013
Refs #841

Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9

nc9 commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

Landed through integration PR #1034 (squash merge 4dc22a9 on main), released in v0.0.128. Closing as superseded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant