Skip to content

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

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

penielgold-hub wants to merge 6 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.

@truthixify

Copy link
Copy Markdown
Contributor

The inbound scan fix works, and CI now finds the existing broken links. Please resolve or explicitly scope the reported placeholder links, missing pages, and stale anchors so the gate passes. The preview redirect test still needs a real run too.

@penielgold-hub

Copy link
Copy Markdown
Author

Thanks — the CI findings from the broader inbound-link scan have now been resolved in 1310d65.

  • Corrected the reported stale anchors and added stable IDs where appropriate.
  • Restored reference/stellar-event-schemas, which still has current inbound references and no equivalent replacement.
  • Did not restore the historical sdk/stellar-react-hooks page because its API could not be verified against the current repository; the two inbound links now point to current supported documentation instead.
  • Scoped the intentional /guides/my-guide placeholder exception specifically to docs/i18n.md.
  • Added/retained regression coverage for the broader inbound scan and placeholder exclusion.

Validation is green:

  • Redirect/anchor tests: 10 passed, 0 failed
  • Redirect/anchor checker: passed
  • Navigation coverage: passed
  • All 7 current GitHub checks: passed

The remaining item is the real preview redirect run. MINTLIFY_PREVIEW_URL is still not exposed for this PR and there is no preview deployment in the available checks. The test is ready to run as soon as a real Mintlify preview URL is available.

Ready for further review.

@truthixify

Copy link
Copy Markdown
Contributor

The link checks are green, but the restored event schema is inaccurate. The current contract documents v1 topics as announce, scheme ID, and stealth address. V2 requires scheme 2 and metadata kind 1, and its data has no caller. Please align the page with stellar/stealth-announcer/src/lib.rs. The preview run is still pending too.

@penielgold-hub

Copy link
Copy Markdown
Author

Thanks for the review.

I’ve updated reference/stellar-event-schemas.mdx to align with stellar/stealth-announcer/src/lib.rs:

  • v1 topics are now ("announce", scheme_id, stealth_address).
  • v1 data is (caller, ephemeral_pub_key, metadata).
  • v2 is documented with scheme_id = 2 and METADATA_KIND_VIEW_TAG = 1.
  • caller has been removed from the v2 data layout.
  • The non-empty metadata/view-tag bucket rule and query examples were corrected.

Local validation passes:

  • check:redirects-and-anchors — 79 pages, 1 redirect.
  • test:redirects-and-anchors — 10 tests, 0 failures.

Fix commit: acc45e91d22cb27374796c7f2a49fb652e986803

The real Mintlify preview run remains pending because the PR branch has not been deployed.

@truthixify

Copy link
Copy Markdown
Contributor

The event schema is correct now. The only remaining item from #163 is a successful redirect check against a real docs preview. There is still no preview URL or run attached to this PR.

@penielgold-hub

Copy link
Copy Markdown
Author

Thanks for confirming that the event schema is correct.

Understood — the real docs preview redirect check is the only remaining item.

At the moment, GitHub shows that this branch has not been deployed, so there is no preview URL available for me to run the check against. Could you please advise whether there is a maintainer-side workflow/deployment that can generate the required docs preview for this fork PR, or whether there is another approved way for contributors to obtain the preview URL?

Once a real preview URL is available, I can run the redirect check against it and report the result here.

@truthixify

Copy link
Copy Markdown
Contributor

There is no maintainer-side preview workflow for fork PRs right now. A local Mintlify preview is acceptable: run mint dev, then in another shell run MINTLIFY_PREVIEW_URL=http://localhost:3000 pnpm test:preview-redirect and attach the successful output.

@penielgold-hub

Copy link
Copy Markdown
Author

Thanks for the guidance. I’ve now completed the redirect check against a real local Mintlify preview.

The preview was running successfully at http://localhost:51240, and the redirect test produced:

test:preview-redirect
node scripts/check-preview-redirect.mjs

Verified http://localhost:51240/README returns 307 redirect to /introduction.

This confirms that /README redirects to /introduction against the running Mintlify docs preview.

Please let me know if anything else is needed for #163.

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