Skip to content

feat(docs): add redirect and anchor checks for renamed pages - #173

Open
penielgold-hub wants to merge 4 commits into
wraith-protocol:developfrom
penielgold-hub:feat/wave-9-redirect-anchor-checks
Open

penielgold-hub wants to merge 4 commits into
wraith-protocol:developfrom
penielgold-hub:feat/wave-9-redirect-anchor-checks

Conversation

@penielgold-hub

Copy link
Copy Markdown

Summary

  • add Git rename detection for renamed Markdown/MDX documentation pages
  • require redirects for renamed documentation URLs
  • validate internal documentation links and anchors
  • detect stale inbound links to renamed pages
  • add focused tests for redirects, anchors, encoded fragments, and renamed links
  • run the new check in the existing documentation CI workflow
  • add the /README → /introduction redirect

Validation

  • npm.cmd run test:redirects-and-anchors
  • npm.cmd run check:redirects-and-anchors
  • npm.cmd run check:nav-coverage
  • git diff --check

All passed locally.

closed #163

@drips-wave

drips-wave Bot commented Sep 25, 2026

Copy link
Copy Markdown

@penielgold-hub Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@truthixify

Copy link
Copy Markdown
Contributor

The unit tests for path and anchor parsing pass, but the issue also requires testing redirects in the docs preview. Please add a preview or browser check that requests an old URL and verifies the real redirect destination.

1 similar comment
@truthixify

Copy link
Copy Markdown
Contributor

The unit tests for path and anchor parsing pass, but the issue also requires testing redirects in the docs preview. Please add a preview or browser check that requests an old URL and verifies the real redirect destination.

@penielgold-hub

Copy link
Copy Markdown
Author

Thanks for the review. I’ve addressed the preview-validation request.

Added a real HTTP smoke check that:

  • requests /README from the actual Mintlify preview without following redirects;
  • requires a 3xx response and Location header;
  • verifies that Location resolves to /introduction.

The check is available as pnpm run test:preview-redirect, with the Mintlify preview URL supplied through MINTLIFY_PREVIEW_URL. I also documented the procedure in docs/CONTRIBUTING.md.

The existing PR workflow does not expose the per-PR Mintlify preview URL, so the check is documented to run against the actual preview once it is available.

The latest commit is 6fe89f9.

@truthixify

Copy link
Copy Markdown
Contributor

The smoke script is useful, but it is not run in CI and there is no successful run against the PR preview. Please wire the preview URL into CI or attach a successful run from the actual Mintlify preview.

@penielgold-hub

penielgold-hub commented Sep 26, 2026 •

Copy link
Copy Markdown
Author

Thanks for the clarification.

I investigated the preview path further. PR #173 is a fork-based PR (penielgold-hub/docs), and the Wraith repository currently does not expose a Mintlify preview URL to the PR or to its GitHub Actions workflow.

The smoke check is implemented and ready to run against a real preview, but I cannot truthfully attach a successful preview run without access to a Mintlify deployment for this fork's commit.

Mintlify's fork-preview limitation means an upstream maintainer would need to make the PR commit available on an upstream branch and create/trigger the corresponding preview. Once that preview URL is available, I can run:

pnpm run test:preview-redirect

against it and attach the successful result here.

I have not claimed a preview run that I could not actually perform.

@truthixify

Copy link
Copy Markdown
Contributor

The preview redirect script is added, but the workflow still never runs test:preview-redirect or supplies MINTLIFY_PREVIEW_URL. Please wire that command into CI against the real preview.

@penielgold-hub

Copy link
Copy Markdown
Author

Thanks. I’ve confirmed that the current Wraith workflow does not expose a Mintlify preview URL for this fork PR or provide a preview deployment status for commit 6fe89f9.

The HTTP smoke test is implemented and ready to run once the real preview URL is available. Please provide or enable the Mintlify preview for this PR (or an upstream branch containing 6fe89f9), and I’ll run the check against that deployment and attach the successful result.

@penielgold-hub
penielgold-hub force-pushed the feat/wave-9-redirect-anchor-checks branch from 6fe89f9 to 82f959b Compare October 1, 2026 20:43
@truthixify

Copy link
Copy Markdown
Contributor

There is another gap in the checker: when a heading changes, it only scans links inside changed pages. Unchanged pages that still point to the old anchor are skipped. Scan all shipped pages when docs change and add a fixture for an unchanged inbound link. The preview redirect test also still needs a real CI run.

@penielgold-hub

Copy link
Copy Markdown
Author

Thanks for the continued review.

The redirect/anchor validation has now been updated to address the inbound-link scenario, including coverage for unchanged pages that reference anchors on documentation pages being changed.

The local validation and focused tests have been run, and the PR is ready for further attention from the maintainer. The remaining preview-related validation depends on access to an actual Mintlify preview for this fork PR, as discussed.

Please let me know if there is any further adjustment or validation you would like us to make.

This branch has not been deployed

No deployments
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.

[Wave 9] Add redirect and anchor checks for renamed docs pages

2 participants