Skip to content

fix(seo-check): skip mock query on sitemap endpoints (unblocks sitemap 7.6 bump)#135

Merged
TheMeinerLP merged 1 commit into
mainfrom
claude/review-launchpad-prs-5NyKU
May 16, 2026
Merged

fix(seo-check): skip mock query on sitemap endpoints (unblocks sitemap 7.6 bump)#135
TheMeinerLP merged 1 commit into
mainfrom
claude/review-launchpad-prs-5NyKU

Conversation

@TheMeinerLP
Copy link
Copy Markdown
Collaborator

Problem

The Renovate PRs that bump @nuxtjs/sitemap to 7.6.0 (#123) and @nuxtjs/seo to 3.4.0 (#122, which bundles sitemap 7.6.0) both fail the "Meta + sitemap + robots" CI gate.

Root cause is a behaviour change in @nuxtjs/sitemap ≥ 7.5:

  • 7.4.11: sitemap endpoints ignored query strings and returned content.
  • 7.6.0: any query string on a sitemap endpoint yields an empty HTTP 204 (?foo=bar → 204, no query → 200), and /sitemap.xml?… answers with an HTML meta-refresh instead of a 307 redirect.

scripts/seo-check.mjs appends ?mockProductionEnv to every localhost request (to force the production robots/sitemap path out of the dev no-index lock). With 7.6.0 that query makes the sitemap look empty → 9 errors.

Verified locally: the failure reproduces on both #123 (sitemap alone) and #122 (seo bundle); it is not a lockfile/flaky issue.

Fix

Skip the ?mockProductionEnv query for sitemap URLs only (/sitemap*.xml, /sitemap_index.xml, /__sitemap__/*). The sitemap output is environment-independent here — verified the no-mock sitemap is fully populated (8 URLs per locale, correct redirect chain). robots.txt and page-meta checks still use the production mock, so coverage is unchanged.

Validation

Ran the patched scripts/seo-check.mjs against a local dev server built with @nuxtjs/sitemap 7.6.0:

Summary: 0 error(s), 0 warning(s), 10 route(s) checked.

(Previously: 9 errors — empty sitemap + all indexable routes missing.)

Follow-up

Once this lands, #123 and #122 should be rebased and will pass the SEO gate. #116 (@nuxt/content) is unrelated and unaffected.

Test plan


Generated by Claude Code

@nuxtjs/sitemap >= 7.5 returns an empty 204 (and a meta-refresh instead
of a 307 redirect) whenever a sitemap endpoint is requested with any
query string. The SEO gate appended ?mockProductionEnv to every
localhost request, which made the sitemap appear empty and failed the
check after the sitemap dependency bump. The sitemap output is
environment-independent, so the mock query is now skipped for sitemap
URLs while robots.txt and page meta still exercise the production mock.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying launchpad with  Cloudflare Pages  Cloudflare Pages

Latest commit: cff91d8
Status:🚫  Build failed.

View logs

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 16, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
launchpad cff91d8 Commit Preview URL

Branch Preview URL
May 16 2026, 10:43 AM

@TheMeinerLP TheMeinerLP merged commit 8e3d09b into main May 16, 2026
4 of 5 checks passed
@TheMeinerLP TheMeinerLP deleted the claude/review-launchpad-prs-5NyKU branch May 16, 2026 14:35
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