Repository navigation
fix(indexnow): send only URLs changed since the last successful submission - #103
Merged
Merged
Conversation
…ssion Every deploy resent all ~35 sitemap URLs (171 submissions in 8 hours on Bing's report), docs-only deploys included. The script now diffs the live sitemap against the last successfully submitted one, kept in the CI cache (restored before the ping, saved only when it succeeds), and sends new URLs and moved lastmods only - nothing when none moved. Baselining on the last success, not the pre-deploy sitemap, keeps pages from a deploy whose smoke failed in the next submission. No cache: everything, once, logged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…only # Conflicts: # decisions.md # learning.md
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.
Bing's IndexNow report showed 171 submissions in 8 hours: every deploy resent all ~35 sitemap URLs, docs-only deploys included. Now a deploy sends only URLs that are new or whose
<lastmod>changed — and nothing when none did. (SEO build brief 2026-10-09, "Infra"; D49.)How
scripts/indexnow.mjs: a purechangedUrls(previousXml, currentXml)diff (new URL or moved lastmod → send; removed → not sent; no usable previous sitemap → send all, with the reason logged). LogsIndexNow: N changed of Mand the URLs when there are ≤10. The script only runsmainwhen executed, so tests import the functions.ci.yml: the baseline is the sitemap of the last successful submission, kept in the Actions cache — restored before the ping (restore-keys: indexnow-), saved onlyif: steps.indexnow.outcome == 'success'.Why not "save the live sitemap before deploy" (the brief's wording)
A deploy whose smoke fails skips the ping. With a pre-deploy baseline, the next deploy's "before" already contains those pages, so they'd never be announced. #95 did exactly this today (its smoke failed on a stale pin). Baselining on the last success keeps them in the next submission (L38).
Expected
lastmodis the singleCONTENT_UPDATEDdate (D35), so a copy change that bumps it still sends every page. Per-page dates are the upgrade, out of scope.Verified
tests/indexnow.test.ts: 5 tests (docs-only deploy → nothing; new URL + moved lastmod → exactly those two; removed URL → not sent; empty / non-XML / empty<urlset>previous → all, with reason; plus the existing key test). Full suite 2024/2024, eslint and tsc clean.[]; one new page + one moved lastmod → those two URLs; no previous → 35 with the reason.no previous sitemap — submitting every URL, and the one after saysN changed of 35.🤖 Generated with Claude Code