Skip to content

fix(rules): treat an absent sitemap readState as unknown, not complete #1869 - #2042

Merged
nc9 merged 5 commits into
mainfrom
boat/sitemap-readstate-unknown-1869
Nov 18, 2026
Merged

nc9 merged 5 commits into
mainfrom
boat/sitemap-readstate-unknown-1869

Conversation

@nc9

@nc9 nc9 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Closes #1869.

crawl/sitemap-coverage and integrity/orphan-page now treat a discovered sitemap with no recorded readState as unknown: coverage skips the missing-page check (skipReason says the read state is unknown) and orphan-page never escalates to 'likely injected' (review-only). No sitemap discovered keeps the old behaviour.

Acceptance criteria

  • Absent = unknown in both rules: tests 'absent readState (precomputed=true/false) is unknown, not checked' (sitemap-coverage-incomplete-1760.test.ts) and 'absent readState never escalates a hidden page' (integrity.test.ts).
  • Goldens: ran golden-baseline, streaming-collector-rules-golden, site-query-link-rules-golden, noindex dual-path, orphan-page-entry-788 e2e, memory-harness, output-caps-score-parity, publish-cap, product-discovery-sitemap-state: all pass with NO golden changes. The goldens are produced by the real crawler path, which always records readState when a sitemap is found, so none changed and none needed regeneration (no before/after diffs to show).
  • Rules tests cover absent, complete, partial, unreadable (and truncated); the absent tests fail if the guard is reverted to the old check. The integrity fixture now sets readState complete explicitly, as a real producer does.
  • Producers: crawler (classifySitemapReadState, crawler.ts) sets it whenever any sitemap is discovered; adapter.ts forwards it at all 3 sites. Only legacy or cached crawl stats lack it, which is the intended unknown. No gaps found.

Verification

rules: integrity, sitemap-coverage-incomplete-1760, noindex-skip, product-discovery: 124 pass. audit-engine golden suites: 47 + 96 pass, 0 fail. Docs: no user-facing docs change. Agent skill: no change needed.

@nc9
nc9 marked this pull request as ready for review November 16, 2026 12:24
@nc9
nc9 force-pushed the boat/sitemap-readstate-unknown-1869 branch from 7644b93 to 7c7cef7 Compare November 18, 2026 05:00
nc9 added a commit that referenced this pull request Nov 18, 2026
nc9 added a commit that referenced this pull request Nov 18, 2026
@nc9
nc9 force-pushed the boat/sitemap-readstate-unknown-1869 branch 2 times, most recently from 466e937 to 93ff0d5 Compare November 18, 2026 08:09
nc9 added a commit that referenced this pull request Nov 18, 2026
@nc9
nc9 force-pushed the boat/sitemap-readstate-unknown-1869 branch from 93ff0d5 to bfd8bb3 Compare November 18, 2026 11:03
nc9 added a commit that referenced this pull request Nov 18, 2026
@nc9
nc9 added this pull request to the merge queue Nov 18, 2026
@nc9
nc9 force-pushed the boat/sitemap-readstate-unknown-1869 branch from bfd8bb3 to 31995ff Compare November 18, 2026 13:27
@nc9
nc9 merged commit e6912ed into main Nov 18, 2026
16 checks passed
nc9 added a commit that referenced this pull request Nov 18, 2026
@nc9
nc9 deleted the boat/sitemap-readstate-unknown-1869 branch November 18, 2026 13:42
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.

Treat an absent sitemap readState as unknown, not complete (regenerate affected goldens deliberately)

1 participant