Repository navigation
fix(rules): robots-meta-conflict counts header noindex and shares one robots.txt decision #556 - #877
Merged
Merged
Conversation
nc9
force-pushed
the
fix/556-robots-meta-conflict
branch
from
October 16, 2026 16:17
24cd3c9 to
94279c5
Compare
nc9
marked this pull request as ready for review
October 16, 2026 16:17
|
Reviewed the diff. The matcher is correct on the cases I traced: longest match, Allow wins a tie,
Test coverage looks good: a shared-verdict test across both rules, header-only and meta noindex, and an unparseable page. |
… robots.txt decision #556 isRobotsTxtDisallowed now follows Google's matching: UA group with * fallback, longest match wins, Allow wins ties, * and $ honoured, query included, percent-encoding normalised. robots-meta-conflict drops its private prefix matcher, reads meta and X-Robots-Tag noindex via isPageIndexable, and lists the pages on redundant-noindex. Signed-off-by: Nik Cubrilovic <[email protected]>
Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
force-pushed
the
fix/556-robots-meta-conflict
branch
from
October 16, 2026 17:17
94279c5 to
2130d13
Compare
Contributor
Author
|
Review triage (94279c5), rebased onto 7bd9bd9 and pushed as 2130d13:
|
|
Reviewed the diff. The matcher logic (longest match, Allow wins tie,
|
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 #556
What changed
isRobotsTxtDisallowed(utils) now decides "blocked by robots.txt" the way Google does: the crawler's UA group (case-insensitive) with a*fallback, longest matchingAllow/Disallowwins,Allowwins a tie,*and trailing$honoured, path matched with its query string, percent-encoding normalised on both sides. The old logic was first-match prefix only, soDisallow: /dir/+Allow: /dir/okblocked/dir/ok, andDisallow: /*.phpmatched nothing.crawl/robots-meta-conflictdrops its private prefix matcher and uses that shared decision, so it andcrawl/indexability-conflictsagree on every URL.isPageIndexable(meta tag orX-Robots-Tag), counting onlymeta:noindex/header:noindex(an unparseable page is not noindex). Header-only noindex is now reported.redundant-noindexlists its pages (reportaffectedPages).Allowplus noindex confusing. Both docs pages describe how blocking is decided.Acceptance criteria
X-Robots-Tag: noindexreported, URL in pagesAllow/Disallow/wildcardsAllowplus noindex as conflictingpackages/rules/tests/robots-meta-conflict.test.ts: header-only reported, meta reported, allowed (meta or header) not reported,Allowvs longerDisallowagree across both rules; plus an unparseable-page caseTests
packages/utils/tests/robots-match-556.test.ts(issue fixture, longest match, tie,$, query, UA case, percent-encoding, linear time)packages/rules/tests/robots-meta-conflict.test.tsapps/cli/tests/utils/robots-txt.test.tsTypecheck (utils, rules), oxlint on changed files, codex review (2 rounds, clean).