Skip to content

eeat/privacy-policy recommends creating an existing excluded policy #672

Closed

Description

@deniskern

Independently reviewed before filing. Related wording in closed #21 involved redirects; this fixture uses HTTP 200 and no redirects.

Summary. When a linked privacy page is intentionally excluded from the crawl, eeat/privacy-policy reports No Privacy Policy page found and recommends Create /privacy-policy page. The rule has not checked the excluded page. A bounded or excluded crawl should not turn an unverified existing destination into advice to create a duplicate. This report does not ask the crawler to bypass exclusions or assert that every privacy link is valid.

Live examples. Both pages were independently opened and returned HTTP 200 on 2026-10-12 +07:

Our Shopify crawler template excludes /policies/**. The fresh 75-page sweep therefore reports the missing-policy warning on all 15 completed Shopify reports. These two live examples demonstrate that the blanket missing-policy interpretation is not reliable; they do not establish the content of every other shop's policy.

Server fixture. Three independent root origins: genuinely missing policy; linked HTTP-200 policy with crawling allowed; identical linked HTTP-200 policy excluded by configuration.

const http=require('node:http');let ready=0;
['missing','allowed','excluded'].forEach((name,index)=>http.createServer((req,res)=>{
 if(req.url==='/robots.txt'){res.setHeader('Content-Type','text/plain');res.end('User-agent: *\nDisallow:\n');return;}
 const isPrivacy=req.url==='/policies/privacy-policy';
 if(req.url!=='/'&&!(isPrivacy&&name!=='missing')){res.statusCode=404;res.end('Not found');return;}
 res.setHeader('Content-Type','text/html; charset=utf-8');const link=name==='missing'?'':'<a href="/policies/privacy-policy">Privacy Policy</a>';
 const title=isPrivacy?'Privacy Policy':'Example storefront';res.end('<!doctype html><html lang="en"><head><meta charset="utf-8"><title>'+title+'</title></head><body><main><h1>'+title+'</h1><p>This is the '+title+' page of an isolated test fixture.</p></main><footer>'+link+'</footer></body></html>');
}).listen(8790+index,'127.0.0.1',()=>{if(++ready===3)console.log('READY');}));

Excluded configuration, excluded.toml:

[crawler]
exclude = ["/policies/**"]
[rules]
enable = ["eeat/privacy-policy"]
disable = []

Commands (after starting the server):

squirrel audit http://127.0.0.1:8790/ --http --refresh --offline --verbose --debug -m 2 --rule-include eeat/privacy-policy -f json -o missing.json
squirrel audit http://127.0.0.1:8791/ --http --refresh --offline --verbose --debug -m 2 --rule-include eeat/privacy-policy -f json -o allowed.json
squirrel audit http://127.0.0.1:8792/ --config-file excluded.toml --http --refresh --offline --verbose --debug -m 2 --rule-include eeat/privacy-policy -f json -o excluded.json

Actual (spark, squirrel 0.0.108, 2026-10-12 +07):

Case entities.pages passed / warnings / failed Result
Missing, 8790 1 0 / 1 / 0 No Privacy Policy page found; creation advice.
Allowed, 8791 2 2 / 0 / 0 Policy found and linked; no issues.
Excluded, 8792 1 0 / 1 / 0 No Privacy Policy page found; same creation advice despite linked, existing policy.

Skips are zero. All fetched fixture HTML pages return HTTP 200; there is no redirect or WAF.

Expected. When a policy destination is linked but excluded/not observed, make the presence assessment inconclusive or describe its limited crawl scope. Keep footer-link evidence separate from verified page availability; an unvisited link is not proof of a valid policy. Preserve the missing case and the allowed positive control. Respect exclusions without adding discovery requests.

Source context. In v0.0.108 eeat/privacy-policy.ts, the !findPrivacyPage(pages) branch returns creation advice before pageLinksToPrivacyHref is examined.

Local action. No local suppression, policy exception, or rule disable added.

Acceptance Criteria

  • When a linked privacy page is excluded from the crawl by config or robots, eeat/privacy-policy does not report No Privacy Policy page found or recommend Create /privacy-policy page; it reports that the policy link exists but was not checked (info, or a distinct message).
  • When no privacy link exists and the policy is genuinely missing, the rule still fails with the create advice (fixture "missing").
  • When the linked page is crawled and valid (HTTP 200), the rule passes (fixture "allowed").
  • Fixture "excluded" (same page, excluded by config) yields the not-checked outcome, not a fail.
  • The three-origin server fixture from the report is turned into unit tests.
  • The rule's doc page quotes the message template and describes the excluded case (make validate).

Activity

  1. added
    bug
    P2
    rules
    size: S
    on Oct 13, 2026
  2. nc9 commented on Oct 13, 2026

    @nc9
    Contributor

    Spec prep

    Verdict: confirmed on current main (e95e0f5, v0.0.112). Read from source.

    • packages/rules/src/eeat/privacy-policy.ts:38-48: findPrivacyPage(pages) (shared/privacy-page.ts) only credits a crawled page, matched by slug, title or h1. When none is crawled, the rule warns No Privacy Policy page found with the value Create /privacy-policy page and returns before any link is looked at.
    • The excluded target is never seen. The internal link probe (packages/audit-engine/src/adapter.ts, mayProbe, around lines 1081-1105) skips targets outside include/exclude or robots and counts them as outOfScope. That is correct; the rule just has to stop reading "not crawled" as "missing".
    • The two privacy rules already disagree. legal/privacy-policy.ts:42-50 credits a linked policy through privacyLinkHref even when it was not crawled, so the reporter's excluded fixture passes legal/privacy-policy and warns eeat/privacy-policy.

    Change (rule only, no new requests)

    When findPrivacyPage returns null, take the first privacy link on any crawled page with privacyLinkHref(page): slug first, then anchor text, as the legal rule does.

    • Link found, target not crawled: emit privacy-policy at info with Privacy Policy linked but not crawled and the URL as value.
      • If ctx.site.linkTargetStatuses holds that URL (it was in scope but past the page budget, so the probe checked it), put its status in details.
      • A probed 4xx or 5xx becomes a warn, for example Privacy Policy link returns 404.
      • Do not give the create advice.
    • No link at all: keep today's warn and the create advice.
    • Crawled page found: unchanged.
    • Keep the privacy-linked coverage check in the linked-but-not-crawled case. It measures linking, not existence (see open questions).
    • The rule cannot see the crawl's include/exclude config today (SiteData has no scope), so the message should say "not crawled" without claiming why. Plumbing scope into SiteData is a separate, larger change.

    Tests

    New packages/rules/tests/eeat-privacy-policy-not-crawled.test.ts, or extend the eeat/privacy-policy block in eeat-page-detection.test.ts, which has the siteCtx and page helpers. The reporter's three origins become SiteData fixtures:

    1. Missing: one page, no link. warn, No Privacy Policy page found, value Create /privacy-policy page.
    2. Allowed: a homepage linking /policies/privacy-policy, plus the crawled policy page titled Privacy Policy. pass, and privacy-linked passes.
    3. Excluded: only the homepage, linking /policies/privacy-policy. info, Privacy Policy linked but not crawled, and no create advice.

    Also cover:

    • a probed 404 through linkTargetStatuses: warn;
    • an anchor-text-only link (<a href="/rechtliches/dsgvo">Datenschutz</a>): info.

    Re-run ws4-rule-batches.test.ts (the legal sibling) unchanged. An optional by-hand CLI replay with the reporter's server and excluded.toml is fine before the PR; it does not belong in CI.

    Docs, skills, completions

    • docs/rules/eeat/privacy-policy.mdx (line 17 lists the checks): add the new info and broken-link warn outcomes, quoting the message templates, and a sentence on excluded or page-capped crawls. Run make validate.
    • No skill or completion change.

    Risks

    • Score: the excluded case moves from warn to info, so Shopify audits with /policies/** excluded score higher. That is intended.
    • Rule count is unchanged. The canonical golden runs the same code on both sides, so I expect it green.

    Open questions for the maintainer

    1. eeat/about-page (No About page found / Create /about or /about-us page) and eeat/contact-page (No Contact page found / Create /contact page) have the same early return. Fix them in this PR through a shared "linked but not crawled" helper, or file a separate issue? I recommend a separate issue, since each has its own slug and schema fallbacks.
    2. Should privacy-linked run when the policy itself was not crawled? I recommend yes.
    3. Should a probed 2xx count as pass rather than info? I recommend info: a HEAD 200 is not proof of a policy.

    Recommended session

    Sonnet, medium effort. Size S confirmed.

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

    P2bugrulessize: S

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions