Skip to content

Fix broken link checker CI and the broken links it surfaced - #592

Merged
samkim merged 2 commits into
mainfrom
fix/link-checker-ci
Sep 18, 2026
Merged

samkim merged 2 commits into
mainfrom
fix/link-checker-ci

Conversation

@samkim

@samkim samkim commented Sep 18, 2026

Copy link
Copy Markdown
Member

Summary

  • Fixes the link checker workflow, which has been failing on every PR (e.g. run 34430009666) with no vercel deployment found, exiting.... patrickedqvist/wait-for-vercel-preview hardcodes actorName: 'vercel[bot]', but this repo's own vercel-preview.yml/vercel-production.yml create GitHub Deployments as github-actions[bot] (no native Vercel GitHub App integration), so it always timed out. Replaced with an inline actions/github-script step that queries the Deployments API directly by commit sha + environment, mirroring the equivalent step already in authzed/web's test.yml. Also bumps actions/checkout@v3 (node16, deprecated) to the node24 v6 pin already used elsewhere in this repo.
  • With the checker actually running, it surfaced 3 real broken links (/spicedb/getting-started, /authzed/guides, /materialize/getting-started) and ~460 anchor-mismatch warnings. Root-caused both:
    • The 3 broken links come from nextra-theme-docs's breadcrumb component, which links a top-level section's crumb (e.g. "SpiceDB") to its first child folder's bare route when the section has no index page of its own, instead of resolving to a real leaf page. No content links to these bare paths directly, so fixed via redirects in next.config.mjs rather than content edits.
    • The anchor warnings are because Nextra doesn't render heading ids into server-rendered HTML (added client-side after hydration), so the crawler flags every #fragment link as a false-positive missing anchor. link-checker-full.yaml already carries --no-check-anchors for this reason; added it to link-checker.yaml too.
  • Documented all three quirks in a new CLAUDE.md "Known Quirks" section for future reference.

Test plan

  • yamllint -c .yamllint on both workflow files
  • pnpm run format:check (oxfmt)
  • Extracted and syntax-checked the new inline script (wrapped in an async function to match how github-script executes it)
  • Dry-ran the new deployment-lookup query against live GitHub API data for the actual failing PR (docs(authzed): product-availability pill on concept pages; Audit Logging self-hosted section framed as SpiceDB Enterprise #586) and for a recent push-to-main deployment — confirmed it finds the right deployment and environment_url in both cases
  • Built the docs site locally (pnpm build && pnpm start) and ran the exact filiph/linkcheck Docker image the workflow uses against it — before: 3 errors / 461 warnings; after both fixes: 0 errors / 0 warnings, exit code 0
  • Confirmed all three redirects return 308 to the correct destination page
  • Not yet verified live in GitHub Actions (needs this PR's own CI run)

🤖 Generated with Claude Code

samkim and others added 2 commits September 18, 2026 09:55
patrickedqvist/wait-for-vercel-preview hardcodes actorName to
vercel[bot], but this repo's own vercel-preview.yml/vercel-production.yml
create GitHub Deployments as github-actions[bot], so the action always
timed out with "no vercel deployment found, exiting...". That action
also targets the deprecated node20 runtime.

Replace it with an inline actions/github-script (node24) step that
queries the Deployments API directly by commit sha + environment
("Preview (GitHub Actions)" for PRs, "Production" for pushes to main)
and reads the environment_url off a successful deployment status,
mirroring the equivalent step in authzed/web's test.yml. Also bump
actions/checkout@v3 (node16) to the node24 v6 pin already used
elsewhere in this repo.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Nextra's breadcrumb component links a top-level section's crumb (e.g.
"SpiceDB") to its first child folder's bare route when the section has
no index page of its own, rather than resolving to a real leaf page.
Since spicedb/getting-started, authzed/guides, and
materialize/getting-started also have no index page, every page in
those sections rendered a breadcrumb crumb pointing at a 404. No
content ever links to the bare paths directly, so redirect them in
next.config.mjs instead of adding index pages.

Also add --no-check-anchors to link-checker.yaml: Nextra doesn't
render heading ids into server-rendered HTML, so the crawler flagged
every #fragment link as a false-positive missing anchor.
link-checker-full.yaml already carries this flag for the same reason.

Document both quirks, plus the wait-for-vercel-preview fix from the
prior commit, in a new CLAUDE.md "Known Quirks" section.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Preview deployment status for this pull request.

Name Status Preview Updated (UTC)
docs 🟢 Ready Visit Preview Sep 18, 2026 05:33pm

@samkim
samkim merged commit 042b14a into main Sep 18, 2026
12 checks passed
@samkim
samkim deleted the fix/link-checker-ci branch September 18, 2026 17:39
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants