Repository navigation
fix(rules): report a linked but uncrawled privacy policy, not create advice #672 - #743
Merged
Merged
Conversation
…advice #672 eeat/privacy-policy only looked for the policy among crawled pages, so a crawl that excluded `/policies/**` (or hit its page limit first) got "No Privacy Policy page found" and advice to create a page every footer already links to. When no crawled page is the policy, look for a link to one the crawl did not fetch (slug first, then anchor text, as legal/privacy-policy does): info "Privacy Policy linked but not crawled", or a warning "Privacy Policy link returns N" when the internal link probe saw a 4xx/5xx. No new requests. The lookup lives in shared/linked-uncrawled-page.ts so the about and contact rules (#740) can reuse it. Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
marked this pull request as ready for review
October 13, 2026 11:49
|
Reviewed the diff. The change is sound: it reuses the existing
No blocking issues. |
Contributor
Author
|
Review triage (no code change, so no new push or CI round):
|
6 tasks done
nc9
added a commit
that referenced
this pull request
Oct 13, 2026
…g a linked page that was not crawled; only same-host links count #740 (#745) Reuses the shared linked-uncrawled-page helper from #743. The helper now counts only links to the linking page's own host, which also closes a gap in eeat/privacy-policy (a third-party privacy link such as reCAPTCHA's hid a real missing-policy warning). Fixes #740 Signed-off-by: Nik Cubrilovic <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #672.
What changed
eeat/privacy-policylooked for the policy only among crawled pages. When the crawl excluded the policy's path (/policies/**on a Shopify storefront) or reached its page limit first, the rule warnedNo Privacy Policy page foundand advised creating a page that every footer already links to.legal/privacy-policyalready credited the same link, so the two rules disagreed.When no crawled page is the policy, the rule now looks for a link to one that the crawl did not fetch. It uses the same acceptance as
legal/privacy-policy: an href matching a privacy slug anywhere on the site wins, then anchor text.passPrivacy Policy page exists(unchanged)infoPrivacy Policy linked but not crawled, value = link target,details.linkedFromwarnPrivacy Policy link returns N(401, 403 and rate limits stayinfo, as inlinks/broken-links)warnNo Privacy Policy page found/Create /privacy-policy page(unchanged)privacy-linkedstill runs when the link matched a slug. It is skipped for a text-only match, because coverage counts slug links.SiteData.linkTargetStatuses), and the probe never requests an excluded or robots-disallowed path.The lookup and the check builder live in
packages/rules/src/shared/linked-uncrawled-page.ts, soeeat/about-pageandeeat/contact-page(#740) reuse them next.shared/privacy-page.tsnow exportsisPrivacyLinkText, andprivacyLinkHrefuses it, with unchanged behaviour.Acceptance criteria
No Privacy Policy page foundand noCreate /privacy-policy page. It getsinfoPrivacy Policy linked but not crawled.packages/rules/tests/eeat-privacy-policy-not-crawled.test.ts). It also covers a probed 404, 410, 200, 403 and 429, a text-only link, slug over text precedence, a crawled target, a redirect target andmailto:/javascript:links.docs/rules/eeat/privacy-policy.mdxquotes the message templates (the coverage messages were filled examples and now readN%) and has a section on excluded and uncrawled policies.make validatepasses.Verification
bun test packages/rules/tests/eeat-privacy-policy-not-crawled.test.ts packages/rules/tests/eeat-page-detection.test.ts packages/rules/tests/ws4-rule-batches.test.ts: 66 pass.bun test packages/rules/tests/privacy-page-detection.test.ts: 22 pass.bun test packages/audit-engine/tests/streaming-rules-canonical-golden.test.ts: 1 pass. No re-pin; the rule count is unchanged at 308.tsgo --noEmitinpackages/rules: clean. oxfmt and oxlint are clean on the changed files.make validateindocs/: all checks passed.Score effect
An audit whose policy is linked but excluded or past the page limit goes from
warntoinfoonprivacy-policy, and now also gets theprivacy-linkedcoverage check. Nothing that passed before warns.Agent skill
No change needed. The squirrelscan skill does not describe this rule's messages.