Skip to content

fix(rules): report linked but uncrawled About and Contact pages, not create advice #740 - #745

Merged
nc9 merged 2 commits into
mainfrom
fix/eeat-about-contact-linked-uncrawled-740
Oct 13, 2026
Merged

nc9 merged 2 commits into
mainfrom
fix/eeat-about-contact-linked-uncrawled-740

Conversation

@nc9

@nc9 nc9 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Closes #740.

What changed

eeat/about-page and eeat/contact-page had the same early return that #672 / #743 fixed in eeat/privacy-policy. A crawl that excluded the About or Contact path, or reached its page limit first, got advice to create a page the site already links to.

Both rules now reuse packages/rules/src/shared/linked-uncrawled-page.ts from #743. When no crawled page is the About or Contact page, they look for a link whose href matches the rule's own URL patterns (EEAT_PAGE_PATTERNS.about / .contact) and whose target was not crawled.

Case about-page / contact-page
A crawled page matches (slug or AboutPage/ContactPage schema) unchanged
Linked, not crawled info About page linked but not crawled / Contact page linked but not crawled, value = link target, details.linkedFrom
Linked, not crawled, and the internal link probe saw a 4xx/5xx warn About page link returns N / Contact page link returns N (401, 403 and rate limits stay info)
No page and no link warn No About page found / No Contact page found with the create advice (unchanged)

Acceptance criteria

  • A linked About/Contact page that was excluded or not crawled gives info "linked but not crawled", or warn when the probe saw a 4xx/5xx, not the create advice.
  • A genuinely missing page still warns with the create advice.
  • A crawled, valid page passes.
  • Mirrors the eeat/privacy-policy recommends creating an existing excluded policy #672 fix through the shared helper from fix(rules): report a linked but uncrawled privacy policy, not create advice #672 #743.
  • Tests for the three cases per rule: packages/rules/tests/eeat-about-contact-not-crawled.test.ts. It also covers a probed 404 and 403, external links at a matching slug, a redirect target, text-only links, a crawled slug page, and no methods check for an uncrawled contact page. A privacy test pins policies.google.com/privacy.
  • docs/rules/eeat/about-page.mdx and contact-page.mdx quote the message templates. The about page's filled example 84 words - consider expanding now reads N words - consider expanding. make validate passes.

Verification

  • bun test packages/rules/tests/eeat-about-contact-not-crawled.test.ts packages/rules/tests/eeat-page-detection.test.ts packages/rules/tests/eeat-privacy-policy-not-crawled.test.ts: 52 pass.
  • bun test packages/rules/tests/ws4-rule-batches.test.ts: 34 pass.
  • bun test packages/audit-engine/tests/streaming-rules-canonical-golden.test.ts: 1 pass. No re-pin; the rule count is unchanged.
  • tsgo --noEmit in packages/rules: clean. oxfmt and oxlint are clean on the changed files.
  • make validate in docs/: all checks passed.

Score effect

A linked but uncrawled About or Contact page goes from warn to info. Nothing that passed before warns.

Agent skill

No change needed. The squirrelscan skill does not describe these rules' messages.

@nc9
nc9 marked this pull request as ready for review October 13, 2026 12:05
@claude

claude Bot commented Oct 13, 2026

Copy link
Copy Markdown

Review of #745: the change is small and well tested. I read the diff and the shared helper; I did not run the tests.

  • (medium) packages/rules/src/shared/linked-uncrawled-page.ts (findLinkedUncrawledPage): it never checks that the link target is on the site's origin. isAboutPath and isContactPath only test the pathname. A footer link to an external URL such as https://twitter.com/about or https://partner.example/contact therefore counts as a linked-but-uncrawled About or Contact page. The rule then emits info where it should warn No About page found, which hides a real gap. It could also report link returns N for someone else's site. Restricting matches to the same origin or host as site.baseUrl would fix this. A test with an external /about link would cover it.
  • (low) eeat-about-contact-not-crawled.test.ts: add a case for a link to a redirecting page, where the crawled finalUrl matches the link target. It would exercise the crawled set built from finalUrl in the helper.
  • (nit) The pub#740 comments in the rule files are fine, but the CHANGELOG entry is long for one bullet.

nc9 added a commit that referenced this pull request Oct 13, 2026
…740

Review of #745: the pathname-only slug match took a footer link to
another site's page (linkedin.com/company/x/about, reCAPTCHA's
policies.google.com/privacy) as this site's About, Contact or privacy
page, turning a real "not found" warning into info. Accept only links
to the page's own host, the parser's own internal-link test. Adds the
external-link and redirect cases the review asked for.

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

nc9 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

Review triage, fixed in 9b6ac44:

  • (medium) no same-origin check: fixed. The helper now accepts only links whose host is the linking page's host, which is the parser's own isInternal test. A footer link to https://social.example/about, /contact or /privacy now leaves the rule at No ... found.
    • This also closes the same gap in eeat/privacy-policy, which fix(rules): report a linked but uncrawled privacy policy, not create advice #672 #743 shipped with the shared helper. reCAPTCHA's "Google Privacy Policy" link (policies.google.com/privacy) matched the /privacy slug and would have turned the missing-policy warning into info. It is pinned by a new test in eeat-privacy-policy-not-crawled.test.ts.
    • The privacy, about and contact docs now say only same-host links count.
  • (low) redirect finalUrl case: added. For both rules, a crawled page whose finalUrl is the link target is never reported as linked but not crawled. The test asserts that, not the follow-on verdict: the about and contact rules match their slug on page.url only, which this PR leaves as it was.
  • (nit) long CHANGELOG bullet: shortened, and it now mentions the same-host restriction.

Local gates at 9b6ac44: the eeat tests (52 pass), streaming-rules-canonical-golden (pass, no re-pin), rules tsgo clean, oxfmt and oxlint clean on the changed files, make validate passes.

@claude

claude Bot commented Oct 13, 2026

Copy link
Copy Markdown

Review of #745: the change is small, reuses the #743 helper cleanly, and has good test coverage. I read the diff only and did not run the tests. No blocking issues.

  • (low) packages/rules/src/shared/linked-uncrawled-page.ts sameSiteUrl: the host test is a strict hostname === comparison against the linking page's URL. A www.example.com page that links to example.com/about (or the reverse) is now treated as external. The rule then falls back to the 'No About page found' warning, which is the false advice this PR removes. The parser's internal-link test may treat www and apex as the same host. If it does, reusing it, or stripping a leading www. on both sides, would be consistent. A test for this case would be useful either way.
  • (low) sameSiteUrl: it resolves links against page.url. If a crawled page redirected to another host, finalUrl might be the better base for both the resolution and the host comparison. Please confirm which one the parser uses for internal-link classification.
  • (nit) about-page.ts and contact-page.ts: isAboutPath and isContactPath are duplicated in shape. A pathMatcher(patterns) helper next to the shared module would remove that, but it is fine as is.
  • (nit) Tests: there is no case for a same-host link to a matching slug on a subdomain (for example blog.shop.example/about). Pinning the intended behaviour would document the same-host decision.
  • (nit) Docs and changelog: the wording is clear. The doc for privacy-policy now says same host only, which matches the code.

No security concerns, and no new requests are made.

@nc9

nc9 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

Round 2 triage, no code change:

  • (low) www vs apex: kept strict, on purpose. The parser's internal-link test is the same strict comparison (new URL(url).hostname === baseUrlObj.hostname in packages/parser/src/html.ts), so the helper agrees with what every other link rule calls internal. The failure mode is safe: a www/apex link falls back to the warning the rule gave before fix(rules): report a linked but uncrawled privacy policy, not create advice #672 #743, and is never a false "linked" info. Folding www. belongs in the parser's own definition if we want it, not in one rule.
  • (low) resolving against page.url: this matches the slug metrics these rules already use (pageLinksToPrivacyHref and privacyLinkHref resolve against page.url), and the parser classifies against the URL it was handed for the page. A cross-host redirect therefore resolves the same way here as in the existing coverage check.
  • (nit) isAboutPath / isContactPath duplication: two one-line closures over different pattern lists. Left as is.
  • (nit) subdomain case: blog.shop.example is a different host from shop.example, so it is external by the same rule, which the social.example test already covers.

nc9 added 2 commits October 13, 2026 23:23
…create advice #740

eeat/about-page and eeat/contact-page had the same early return as
eeat/privacy-policy (#672): an About or Contact page the pages link to
but the crawl excluded (or never reached) got advice to create it.

Reuse shared/linked-uncrawled-page.ts: a link whose href matches the
rule's URL patterns and whose target was not crawled gives info "<label>
linked but not crawled", or a warning "<label> link returns N" when the
internal link probe saw a 4xx/5xx. Anchor text alone does not count.
The contact methods check is skipped for a page that was never read.

Signed-off-by: Nik Cubrilovic <[email protected]>
…740

Review of #745: the pathname-only slug match took a footer link to
another site's page (linkedin.com/company/x/about, reCAPTCHA's
policies.google.com/privacy) as this site's About, Contact or privacy
page, turning a real "not found" warning into info. Accept only links
to the page's own host, the parser's own internal-link test. Adds the
external-link and redirect cases the review asked for.

Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9
nc9 force-pushed the fix/eeat-about-contact-linked-uncrawled-740 branch from 9b6ac44 to bfb481c Compare October 13, 2026 12:23
@claude

claude Bot commented Oct 13, 2026

Copy link
Copy Markdown

Reviewed the diff. The logic is a small, consistent reuse of the shared helper, and the tests cover the three cases per rule plus the edge cases. I found nothing blocking.

  • (low) packages/rules/src/shared/linked-uncrawled-page.ts (sameSiteUrl): the strict hostname === match is consistent with the parser's isInternal. It means a page crawled at example.com that links to https://www.example.com/about (or the reverse) is now treated as external. The rule then falls back to "No About page found" with create advice, which is the false positive this PR sets out to remove. This also changes eeat/privacy-policy. Consider treating a leading www. as equivalent, or note the limitation in the docs. A test for the www/apex case would pin whichever behaviour you choose.
  • (nit) The about and contact tests include "a crawled page at a matching slug" and "a target the crawl reached through a redirect" cases that assert only not.toContain("not crawled"). Asserting the actual status or message would catch regressions in the crawled path.
  • (nit) The comment in sameSiteUrl cites "pub#745 review". Review-round references age badly in source, so you could describe the reason without the reference.
  • (nit) The solution strings in about-page.ts and contact-page.ts now include the linked-but-not-crawled explanation. That reads like rule behaviour more than fix advice, and the docs already cover it.

@nc9
nc9 merged commit bb3e372 into main Oct 13, 2026
15 checks passed
@nc9
nc9 deleted the fix/eeat-about-contact-linked-uncrawled-740 branch October 13, 2026 12:37
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.

eeat/about-page, eeat/contact-page: advise creating a page that is linked but excluded from the crawl

1 participant