test(docs): resolve every relative link, and fix the eight that went nowhere - #516
Merged
Conversation
DemchaAV
force-pushed
the
test/docs-link-guard
branch
from
August 5, 2026 08:27
abf5be3 to
a184875
Compare
…nowhere Nothing in this build read a link. No test followed one, no CI step checked one, and there was no link checker anywhere in the tree. A renamed heading silently broke every jump to it; a moved file broke every link into it. Both look harmless in a diff and neither is visible without clicking. DocumentationLinkGuardTest resolves all 1051 relative links across the 99 published pages — docs/, the root pages, every module README. File targets have to exist; anchors have to be produced by a heading in the target page, computed with GitHub's rule rather than a guess at it. External http and mailto targets are left alone: they fail for reasons this repository does not control, and a guard that reddens because somebody else's server is down is one people learn to ignore. It found eight dead anchors, all in the examples catalogue. Five missed by a single hyphen — the em-dash in "CV — single template" is dropped and its surrounding spaces collapse to two hyphens, not one. Three pointed at sections that no longer exist; those rows keep their name and lose the link, since each already carries working PDF and Source links. Getting the anchor rule right took four measurements, and three of them were wrong in ways worth recording in the code: GitHub does not trim the leading hyphen a stripped emoji leaves behind, it keeps the text inside backticks when anchoring a heading, and a link written inside an inline code span is prose about syntax rather than a link. Each mistake produced confident false positives. The test also asserts it examined a floor of links. "No broken links" and "no links read" are the same shade of green, and a regex that quietly stops matching would leave the documentation exactly where it started.
DemchaAV
force-pushed
the
test/docs-link-guard
branch
from
August 5, 2026 08:51
a184875 to
763a617
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Nothing in this build read a link. No test followed one, no CI step checked one, and
there was no link checker anywhere in the tree — I looked for one before writing this,
because the follow-up item was phrased as extending the link guard, and there was
nothing to extend.
That leaves two defects invisible by construction:
Both look harmless in a diff, and neither is visible without clicking. I created one
myself in #502 —
#the-value-label-halo— and nothing would have told me if I had gotthe slug wrong.
What
DocumentationLinkGuardTestresolves 1051 relative links across 99 pages —docs/,the root pages, every module README. File targets must exist; anchors must be produced by
a heading in the target page, computed with GitHub's rule.
External
http(s)andmailto:targets are deliberately untouched: they fail forreasons this repository does not control, and a guard that reddens because somebody
else's server is down is one people learn to ignore.
It found eight dead anchors, all in the examples catalogue:
CV — single templateis dropped and its two surrounding spaces collapse to--, not-Getting the rule right took four measurements
Three were wrong, and each produced confident false positives. They are recorded in the
code so the next reader does not repeat them:
## 🚀 Start hereanchors as
-start-here. Trimming it condemned a working link.## `MissingBackendException` when opening a sessionanchors as
missingbackendexception-…. Stripping code spans from headings invented adifferent anchor and condemned another working link.
`[text](#heading)`-style links— not a link. Two of those were flagged before Istripped inline code from the link scan (but not from headings, per the point above).
The first measurement said 24 broken. The real number is 8.
Tests
./mvnw -B -ntp clean verify→BUILD SUCCESS.Checked from both sides rather than trusted because it went green:
[gone](./no-such-page.md)docs/recipes/charts.md -> ./no-such-page.md = no such file### The value-label halo#the-value-label-halo = no heading in docs/recipes/charts.md anchors thereThe test also asserts a floor on how many links it examined. "No broken links" and "no
links read" are the same shade of green, and a regex that quietly stops matching would
leave the documentation exactly where it started. Verified that assertion can fail by
raising the floor: it reports
only 1051 relative links were examined across 99 pages.Not added to the fast guard job's
-Dtest=list — that list is a curated subset and thereactor gate runs this either way.