Skip to content

ci(docs): Validate static-sites links against route changes - #18896

Draft
sentry-junior[bot] wants to merge 4 commits into
masterfrom
feat/cross-repo-doc-link-validator
Draft

ci(docs): Validate static-sites links against route changes#18896
sentry-junior[bot] wants to merge 4 commits into
masterfrom
feat/cross-repo-doc-link-validator

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a cross-repo docs link contract check so docs route/redirect changes cannot silently 404 static-sites consumer links (the agents dashboard singular/plural failure mode).

Design

  • One dependency-free Node resolver owned by sentry-docs (scripts/lib/doc-link-contract.mjs + scripts/check-doc-link-contract.mjs).
  • Docs CI: resolves a committed path inventory of static-sites www-astro docs.sentry.io links against the candidate docs route graph. No private checkout required (static-sites is private and SENTRY_INTERNAL_APP is not installed there).
  • Runs only when route topology changes (pages/redirects/middleware/config/inventory).
  • Fails only on newly broken final paths vs PR base; existing unresolved paths are informational.
  • static-sites CI companion: https://github.com/getsentry/static-sites/pull/4624 extracts live consumer links and fails only on newly introduced broken URLs.

Inventory

  • scripts/data/static-sites-www-astro-docs-paths.json (543 paths today)
  • regenerate: node scripts/check-doc-link-contract.mjs --consumer-root <static-sites>/packages/www-astro --write-links-file scripts/data/static-sites-www-astro-docs-paths.json

Test plan

Co-Authored-By: Shannon Anahata <shannon.anahata@sentry.io>
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview Jul 30, 2026 9:08pm
sentry-docs Ready Ready Preview Jul 30, 2026 9:08pm

Request Review

sentry-junior Bot and others added 3 commits July 30, 2026 20:49
CI runs vitest, not node:test. Match the existing .mjs vitest pattern so
the suite is discovered.

Co-Authored-By: Shannon Anahata <shannon.anahata@sentry.io>
Default GITHUB_TOKEN cannot read getsentry/static-sites (private), so the
cross-repo check failed at checkout with repository not found. Mint a
scoped Sentry internal app token for the consumer checkout only.
SENTRY_INTERNAL_APP is not installed on private static-sites, so docs CI
cannot checkout the consumer repo. Commit the www-astro docs.sentry.io
path inventory and resolve against that instead. Keep live consumer
extraction on the static-sites side.
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.

0 participants