Skip to content

fix(core): decline index coverage on a partial sitemap read - #88

Closed
k2kirov wants to merge 1 commit into
mainfrom
fix/discovery-coverage-truncated-sitemap
Closed

k2kirov wants to merge 1 commit into
mainfrom
fix/discovery-coverage-truncated-sitemap

Conversation

@k2kirov

@k2kirov k2kirov commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

machine-discovery/discovery-index-coverage failed a large retail site for an unindexed homepage. The homepage is listed in sitemap_4.xml.

The shared sitemap walk keeps at most 500 entries and reads at most 10 child sitemaps. the site's index lists a 2455-URL product sitemap first, which filled the cap. The one-URL sitemap holding the homepage was read, but its entry was dropped, and the audit never checked tree.truncated.

A page missing from a partial read may be listed in the part the walk skipped. The audit now returns na in that case. A page found in the partial read still passes; a page missing from a complete read still fails.

Changes

  • discovery-index-coverage.ts: decline the verdict when truncated or scopeIncomplete is set and a page is uncovered.
  • Two tests: the the site shape (na), and a complete read that still fails.
  • Dossier: new state row, implementation deviation, and a ## Deferred section (5 MB body cut is unflagged; walk keeps fetching children after the entry cap).
  • Patch changeset. The dossier already listed truncation as a false-positive risk.

Verification

  • New test fails on the old code and passes with the fix.
  • build, test (AL_SKIP_NETWORK=1), typecheck, lint, check:dossiers, check:requires, check:audit-map, format:check all pass.
  • Rescan of a large retail site: coverage fail -> na; overall 59 -> 60.

The sitemap walk caps entries at 500 and child sitemaps at 10. A page
missing from the part it read may be listed in the part it skipped, so
discovery-index-coverage now returns notApplicable instead of failing.
Found on a large retail site whose 2455-URL product sitemap filled the
cap before the one-URL sitemap that lists the homepage.
@k2kirov
k2kirov force-pushed the fix/discovery-coverage-truncated-sitemap branch from d8ffb42 to 53b65e4 Compare October 6, 2026 09:17
@k2kirov

k2kirov commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Consolidated into #109. This branch's commits were merged into staging/false-positive-fixes, which ships to main through #109.

@k2kirov k2kirov closed this Oct 6, 2026
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.

1 participant