You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs: make validate does not catch broken #anchor links #649
Found while writing pub#648. make validate in docs/ passes when an in-page or cross-page #anchor link points at a heading that no longer exists. The private app links to explicit {#id} anchors on guides/failed-audits and cloud/firewall (failure email, bell, dashboard, MCP), so a heading rename would break those links with CI green. The author verified the new anchors with a one-off script.
Acceptance Criteria
make validate fails when any [text](#id), [text](/path#id) or <Link href=".../path#id"> targets an anchor that does not exist on the target page
A test fixture with a broken anchor proves it fails, and a fixture with a valid explicit {#id} and a heading-derived id passes
The anchors the private app links to are listed in one file the check treats as required (failure docs anchors in failure-explanation.ts), so removing one fails CI
Checked against current main (ad95fb2): STILL TRUE, and the cause is wider than anchors.
make validate is only bun x tangly check --strict (docs/Makefile, docs/package.jsoncheck, run by docs:check at .github/workflows/ci.yml:230). I ran tangly 0.5.0 (the pinned version) and 0.5.2 (the npm latest) against a three-page fixture. Both printed "All checks passed" for all four of these:
[x](/rules/perf/real#no-such-anchor): a dead anchor on a page that exists
[d](/rules/performance/real): a dead page
[r](./nope-rel): a dead relative link
<Card href="/nope-card">: a dead component href
In tangly 0.5.0, dist/cli/commands/check.js only collects manifest (config and navigation) warnings and MDX parse errors. It declares a --no-links flag but never reads it, so no body link is checked at all. An anchor check therefore needs our own script, and it can share one with the dead-page check in #322.
Fixed in #876 (bb528c3). The check computes the ids each page renders: explicit {#id} at the end of a heading, otherwise github-slugger over the rendered heading text, plus id= and <a name>. These match the live site on all 435 pages. It fails on a [text](#id), [text](/path#id) or JSX href anchor that does not exist on its target. docs/scripts/required-anchors.json lists the failed-audits and firewall anchors the cloud links to, and removing one fails CI. It found and fixed three dead anchors on main.
Activity
nc9 commentedon Oct 11, 2026
Checked against current main (ad95fb2): STILL TRUE, and the cause is wider than anchors.
make validateis onlybun x tangly check --strict(docs/Makefile,docs/package.jsoncheck, run bydocs:checkat.github/workflows/ci.yml:230). I ran tangly 0.5.0 (the pinned version) and 0.5.2 (the npmlatest) against a three-page fixture. Both printed "All checks passed" for all four of these:[x](/rules/perf/real#no-such-anchor): a dead anchor on a page that exists[d](/rules/performance/real): a dead page[r](./nope-rel): a dead relative link<Card href="/nope-card">: a dead component hrefIn tangly 0.5.0,
dist/cli/commands/check.jsonly collects manifest (config and navigation) warnings and MDX parse errors. It declares a--no-linksflag but never reads it, so no body link is checked at all. An anchor check therefore needs our own script, and it can share one with the dead-page check in #322.build(docs): fail docs:check on dead internal links, dead #anchors, m…
build(docs): link check skips only the top-level scripts dir, matches…
build(docs): link check strips tags without a regex, reads only Type/…
build(docs): fail docs:check on dead internal links, dead #anchors, m…
build(docs): link check skips only the top-level scripts dir, matches…
build(docs): link check strips tags without a regex, reads only Type/…
nc9 commentedon Oct 16, 2026
Fixed in #876 (bb528c3). The check computes the ids each page renders: explicit
{#id}at the end of a heading, otherwise github-slugger over the rendered heading text, plusid=and<a name>. These match the live site on all 435 pages. It fails on a[text](#id),[text](/path#id)or JSXhrefanchor that does not exist on its target.docs/scripts/required-anchors.jsonlists the failed-audits and firewall anchors the cloud links to, and removing one fails CI. It found and fixed three dead anchors on main.