Skip to content

Fix dead links and gate the docs build in CI - #1066

Open
prk-Jr wants to merge 2 commits into
mainfrom
fix/docs-dead-links
Open

Fix dead links and gate the docs build in CI#1066
prk-Jr wants to merge 2 commits into
mainfrom
fix/docs-dead-links

Conversation

@prk-Jr

@prk-Jr prk-Jr commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Changes

File Change
.github/workflows/format.yml Run npm run build in the format-docs job. That job already runs on pull_request, already installs the docs dependencies, and is already a required status check, so dead links become a merge blocker with no ruleset change.
docs/superpowers/specs/2026-07-20-ssat-debug-comment-config-design.md Twelve links pointed into the source tree via ../../../crates/.... Those targets sit outside the VitePress root and can never resolve. Rewritten as inline code spans, e.g. (`publisher.rs:950`), matching the 172 source references already written that way under docs/superpowers/.
docs/superpowers/archive/2026-08-08-esi-cacheable-root-validation-design.md Two sibling links kept a ./ prefix after the document moved into archive/. Retargeted to ../specs/.
docs/superpowers/archive/2026-08-10-1009-esi-validation-spike.md Five sibling links likewise retargeted to ../plans/. Every target already existed one directory over.

Closes

No linked issue — this repairs a build that is red on main right now.

Test plan

  • Docs format: cd docs && npm run format — all matched files use Prettier code style
  • Docs lint: cd docs && npm run lint — clean
  • Docs build: cd docs && npm run buildbuild complete in 10.91s (was [vitepress] 19 dead link(s) found)
  • cargo fmt --all -- --check
  • Other: verified the new gate fails closed. A deliberate dead link exits 1 with [vitepress] 1 dead link(s) found; the build completes once removed.
  • cargo test-fastly && cargo test-axum — not run, no Rust source changed
  • cargo clippy-fastly && cargo clippy-axum — not run, no Rust source changed
  • JS tests / JS format — not run, no JS source changed

Checklist

  • Changes follow CLAUDE.md conventions
  • No unwrap() in production code — no Rust changed
  • Uses tracing macros (not println!) — no Rust changed
  • New code has tests — the CI gate is itself the regression test, and it was verified to fail closed
  • No secrets or credentials committed

Note on the two fix sets

The two halves have different origins, worth separating for anyone reading
git log later:

prk-Jr added 2 commits August 22, 2026 11:40
The VitePress build on main has been failing since #943 landed, and PR #1013
added more breakage on top of it. Nineteen dead links across three files:

- Twelve links in the SSAT debug comment design point into the source tree
  via `../../../crates/...`. Those targets sit outside the VitePress root, so
  they can never resolve. Rewrite them as inline code spans, matching the 172
  source references already written that way under `docs/superpowers/`.
- Seven links in the archived ESI spike documents kept a `./` prefix after the
  documents moved into `superpowers/archive/`. Every target exists one
  directory over, in `superpowers/plans/` or `superpowers/specs/`.

`npm run build` in `docs` now completes instead of reporting dead links.
The VitePress build is the only check that catches dead links, and
`deploy-docs.yml` runs it on push to main alone. Docs breakage therefore stays
invisible until it has already landed, which is how nineteen dead links
accumulated across two merges.

Run the build in the existing `format-docs` job instead. That job already runs
on pull requests, already installs the `docs` dependencies, and is already one
of the required status checks, so dead links become a merge blocker with no
ruleset change. Leaving `deploy-docs.yml` alone also keeps its `pages: write`
permission off pull request events.

Verified the gate fails closed: a deliberate dead link exits 1 with
`[vitepress] 1 dead link(s) found`, and the build completes once removed.
@prk-Jr prk-Jr self-assigned this Aug 22, 2026
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.

2 participants