Skip to content

Reject incomplete sitemap generation and recover after source failures - #1267

Open
tannerlinsley wants to merge 1 commit into
taren/docs-freshness-uifrom
taren/sitemap-completeness
Open

Reject incomplete sitemap generation and recover after source failures#1267
tannerlinsley wants to merge 1 commit into
taren/docs-freshness-uifrom
taren/sitemap-completeness

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Sep 12, 2026

Copy link
Copy Markdown
Member

A failed or empty documentation manifest could produce a 200 sitemap with an entire library missing. Sitemap generation now fails explicitly with 503, no-store headers, and Retry-After instead of publishing that reduced result. Logs identify the failed library or catalog and record successful generation after recovery.

GitHub directory fallback now visits all depths and rejects a listed child directory that disappears. Cached trees with unvisited directories are rejected, and the manifest cache key changes so old depth-limited manifests are rebuilt. Local directory reads use the same complete traversal. Local-only one-millisecond file/tree caching was removed after the HTTP recovery test demonstrated that it kept serving an empty tree after the fixture was restored. Production GitHub cache behavior remains in place.

Stacked on #1264, which supplies the freshness metadata already used by sitemap entries.

Validation:

  • Full pnpm test passed: 525 tests passed, 4 opt-in skips, TypeScript and lint clean. The commit hook repeated the final checks successfully.
  • New remote fallback regression proves a missing child rejects without caching a partial tree, then recovers through an old incomplete cache with a deeply nested document intact.
  • Real local HTTP integration passed with fixtures for all 18 sitemap-enabled documentation libraries. Removing the Start fixture and corrupting its frontmatter each produce an uncached 503; restoring each source immediately restores every expected library URL. Server logs name Start and show recovery.
  • The integration uses the existing published/cached Charts catalog. It does not claim to simulate a catalog-service outage.
  • sitemap-testing.md and scripts/prepare-sitemap-test.ts make the HTTP check reproducible.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: feba07d5-9f42-4133-bb6e-0aeb9554b47b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 12, 2026

Copy link
Copy Markdown

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
tanstack-com 2808922 Commit Preview URL

Branch Preview URL
Sep 12 2026, 12:42 AM

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