Skip to content

Make the Mint broken-link check required - #202

Open
innovativedesign-lab wants to merge 1 commit into
wraith-protocol:developfrom
innovativedesign-lab:make-mint-broken
Open

innovativedesign-lab wants to merge 1 commit into
wraith-protocol:developfrom
innovativedesign-lab:make-mint-broken

Conversation

@innovativedesign-lab

Copy link
Copy Markdown

Close: #185

Here's what was done and why each decision was made:

What was built

check-broken-links.mjs
— a standalone Node.js checker (no mint CLI required) with three check categories:

Internal routes — resolves every link against the set of real .md/.mdx files, accounts for redirect sources in docs.json, and explicitly checks /assets/* paths
Heading anchors — slugifies headings the same way Mintlify does and verifies #fragment links point at real headings or id= attributes
External URLs — HEAD→GET fallback, up to 3 retries with exponential back-off + jitter, classifies each failure as PERMANENT (4xx, ENOTFOUND, ECONNREFUSED) or RETRYABLE (5xx, 429, 503, timeout); exits 1 only on permanent failures
--no-external flag — runs instantly with zero network calls, used by the PR step.

Two new npm scripts in package.json:

check:broken-links # full check (internal + external)
check:broken-links:internal # internal only (fast, offline-safe)
New broken-links job in snippets.yml:

No needs: dependency — runs in parallel with the other jobs
No continue-on-error — it's a required check that fails the PR
Internal check on every PR and push; external check only on push (keeps PR feedback fast)

@drips-wave

drips-wave Bot commented Oct 17, 2026

Copy link
Copy Markdown

@innovativedesign-lab 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 truthixify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new required job fails on eight internal links, so the branch does not leave the gate green. More importantly, the external checker performs unrestricted fetch(..., redirect: follow) for repository-controlled URLs without rejecting private, loopback, link-local, mapped IPv6, or redirect destinations. On the post-merge push job this is a CI SSRF path. Fix or explicitly model the eight shipped targets, resolve and pin only globally routable addresses, follow redirects manually while revalidating every hop, and add private-address/DNS-rebinding tests.

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 10][Carryover] Make the Mint broken-link check required

2 participants