Skip to content

tooling: add redirect destination auditor - #1801

Open
huklaa wants to merge 10 commits into
base:masterfrom
huklaa:agent/audit-broken-redirect-destinations
Open

tooling: add redirect destination auditor#1801
huklaa wants to merge 10 commits into
base:masterfrom
huklaa:agent/audit-broken-redirect-destinations

Conversation

@huklaa

@huklaa huklaa commented Aug 12, 2026

Copy link
Copy Markdown

PR Description

What changed? Why?

Adds a focused redirect destination auditor for "docs/docs.json".

The tool:

  • validates internal redirect destinations against the current MDX route tree,
  • follows redirect chains,
  • detects redirect cycles,
  • groups repeated broken destinations so large redirect migrations can be audited efficiently.

This helps address the broken redirect debt tracked in #1783 without guessing replacement targets or making unrelated redirect changes.

Notes to reviewers

This PR intentionally adds tooling only. It does not rewrite existing redirect destinations.

The default mode is report-only so the current known redirect debt does not break normal workflows. A "--strict" mode is included for targeted validation or future CI use once the redirect tree is clean.

How has it been tested?

  • Added focused Node.js tests for:
    • direct valid destinations,
    • redirect chains,
    • missing terminal destinations,
    • redirect cycles,
    • external destinations,
    • path normalization.
  • Verified the auditor against the current docs route tree.

@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/2
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 1
Sum 2

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