Repository navigation
Description
crawl/sitemap-lastmod-churn warns on any site that publishes a Google News sitemap, which is the
correct thing for a publisher to have.
A Google News sitemap contains, by specification, only articles from roughly the last 48 hours. Its
lastmod values therefore always collapse onto 1–2 distinct days. The rule pools lastmod values
across every discovered sitemap and warns at <= 2 distinct days over >= 20 URLs, so a news sitemap
alone satisfies the accusation.
Reproduced on allrecipes.com (pre-release smoke for v0.0.86):
warn :: 38 sitemap URL(s) with lastmod collapse onto 2 distinct day(s): 2026-08-18, 2026-08-19
That is byte-for-byte the content of https://www.allrecipes.com/google-news-sitemap.xml: 38 URLs,
38 lastmods, 2 distinct days. The whole finding came from the news sitemap.
The site's real sitemap (/sitemap.xml → 4 children) contributed nothing, because those children
are bot-protected and return an HTML error page. So the pool was 100% news-sitemap URLs.
Two distinct defects, and the second is the one that generalises:
- News sitemaps must not count toward lastmod churn at all. They are a rolling 48-hour window by
design. Any publisher with one gets accused of build-stamping theirlastmod, and publishers are
exactly the audience that cares about this field. - The rule cannot tell a small pool from a representative one. It pools across sitemaps and never
asks where the URLs came from, so a partial ingest (blocked children, a fetch failure, a cap) is
indistinguishable from a real site-wide collapse.SitemapDataalready carries the sitemap's own
url, so per-sitemap grouping is available today.
The rule's own tests pass, CI was green on the PR, and the golden corpus is byte-identical. Fixtures
encode the cases someone thought of; none of them was a news sitemap.
Acceptance Criteria
- URLs from a Google News sitemap are excluded from the churn calculation, detected from the
xmlns:newsnamespace declaration (not from the filename, which is convention rather than spec) -
SitemapDatacarries whether the sitemap declared the news namespace, set during sitemap parsing
inpackages/crawler/src/sitemaps.ts, and the field is threaded through the core-contracts type - A site whose ONLY lastmod-carrying sitemap is a news sitemap produces a
skippedcheck naming
that reason, never awarn - The rule reports which sitemap(s) the offending lastmod values came from, so the finding is
actionable rather than a bare count - Fixture: a news sitemap with 38 URLs across 2 days alongside a blocked/empty regular sitemap —
skipped, not warned (this is the allrecipes.com shape) - Fixture: a regular sitemap with 40 URLs all stamped one day — still warns, message unchanged
- Fixture: a news sitemap PLUS a regular sitemap with well-spread lastmod values — passes, and the
news URLs are absent from the counted total - Existing
sitemap-lastmod-churntests still pass unchanged -
packages/audit-engine/tests/streaming-rules-canonical-golden.test.tsstill passes, or is updated
with a comment naming this change as the cause if the fixture corpus contains a news sitemap - Docs rule page updated to state that news sitemaps are excluded
Activity
fix(rules): exclude news sitemaps from lastmod churn #115 (#116)
fix(crawler): renumber the site-chrome migration to v22 after the #115 …
feat(rules): add social/asset-divergence, site chrome that disagrees …