Skip to content

ci: prevent new broken documentation redirects#1725

Open
realmehmetali wants to merge 1 commit into
base:masterfrom
realmehmetali:agent/prevent-broken-redirects
Open

ci: prevent new broken documentation redirects#1725
realmehmetali wants to merge 1 commit into
base:masterfrom
realmehmetali:agent/prevent-broken-redirects

Conversation

@realmehmetali

@realmehmetali realmehmetali commented Jul 18, 2026

Copy link
Copy Markdown

What changed? Why?

Added a dependency-free redirect validator and PR check for docs/docs.json. It resolves direct pages, multi-hop redirects, wildcard/dynamic routes, external destinations, and cycles.

The current default branch already contains redirect debt tracked in #1426 and #1599. Comparing each PR with its base revision lets CI reject newly broken redirects or page deletions without forcing unrelated contributors to repair the existing backlog.

Notes to reviewers

  • This changes no redirect destinations or documentation content.
  • A redirect that was already invalid on the base revision remains non-blocking.
  • A new invalid redirect, a changed redirect that becomes invalid, a new cycle, or deletion of a redirect target fails CI.
  • The workflow follows the repository's existing pinned checkout and runner-hardening actions.

How has it been tested?

  • node --test scripts/validate-redirects.test.js — 5/5 passing
  • node scripts/validate-redirects.js --base-ref master — passing
  • node --check on both JavaScript files
  • git diff --check

AI disclosure: Codex assisted implementation and testing. I reviewed the current public repository, public redirect issues, test behavior, and final diff. No private code, data, credentials, or internal product details were used or included.

Validate redirect chains against the docs tree while baselining existing redirect debt.
@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@realmehmetali
realmehmetali marked this pull request as ready for review July 18, 2026 09:08
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