Validate and update links (STF-557)#232
Conversation
There was a problem hiding this comment.
Code Review
This pull request integrates the Lychee link checker into the repository. It adds a lychee.toml configuration file, registers the lychee tool and a check-links task in mise.toml (and updates mise.lock), and adds .lycheecache to .gitignore. Additionally, numerous documentation links across markdown files and Ruby source files are updated to their canonical forms (e.g., adding trailing slashes or updating domains) to ensure they pass validation. Feedback on the changes suggests making the GitHub blob URL exclusion regex in lychee.toml more robust to support branch/tag refs and line ranges.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| # Exclude URL patterns from checking (treated as regular expressions) | ||
| exclude = [ | ||
| # GitHub blob URLs with line-number fragments (not parseable as page anchors) | ||
| '^https://github\.com/[^/]+/[^/]+/blob/[0-9a-fA-F]+/.+#L\d+$', |
There was a problem hiding this comment.
The current regular expression for excluding GitHub blob URLs has two limitations:
- It only matches hex commit SHAs (
[0-9a-fA-F]+) and will fail to match URLs that use branch names (likemainormaster) or tags as the ref. - It only matches single line numbers (
#L\d+$) and will fail to match line ranges (like#L10-L15).
We can make this regex more robust by:
- Replacing
[0-9a-fA-F]+with[^/]+to support any ref (branch, tag, or SHA). - Updating the anchor pattern to
#L\d+(?:-L\d+)?$to support both single lines and line ranges.
| '^https://github\.com/[^/]+/[^/]+/blob/[0-9a-fA-F]+/.+#L\d+$', | |
| '^https://github\.com/[^/]+/[^/]+/blob/[^/]+/.+#L\d+(?:-L\d+)?$', |
There was a problem hiding this comment.
This GitHub-blob exclude is taken verbatim from the dev-site lychee config and is intentionally narrow — it only skips unverifiable blob/<sha>#L.. line-fragment links. Branch-ref blob links are checked normally and resolve fine in these repos, so we kept the shared pattern.
— Claude (posted on Greg's behalf)
Part of STF-557. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- https://dev.maxmind.com/minfraud?lang=en -> https://dev.maxmind.com/minfraud/?lang=en (and the bare /minfraud variant -> /minfraud/) - https://dev.maxmind.com/minfraud/api-documentation/requests?lang=en#... -> .../requests/?lang=en#... (trailing slash) - https://dev.maxmind.com/minfraud/report-a-transaction?lang=en -> .../report-a-transaction/?lang=en (and bare variant -> trailing slash) - https://dev.maxmind.com/minfraud/track-devices?lang=en -> .../track-devices/?lang=en - https://dev.maxmind.com/minfraud/api-documentation/responses/schema--response--risk-score-reason--multiplier-reason -> .../responses/#schema--response--risk-score-reason--multiplier-reason (canonical fragment form) - https://tools.ietf.org/html/rfc3339 -> https://datatracker.ietf.org/doc/html/rfc3339 - https://contributor-covenant.org -> https://www.contributor-covenant.org/ - https://opensource.org/licenses/MIT -> https://opensource.org/license/MIT - https://www.maxmind.com/en/support -> https://support.maxmind.com/knowledge-base Also excludes the JS-rendered responses-page fragment from lychee, since the schema anchor is injected client-side and absent from the static HTML. Part of STF-557. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resolves zizmor ref-version-mismatch warnings on hash-pinned actions whose version comments omitted the leading v (the pinned commits already match the corresponding vX.Y.Z tags). Comment-only change. Part of STF-557. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds a lychee link checker config and a CI workflow, and fixes stale/redirecting links across the docs and source.
Tooling
lychee.toml: shared config mirroring the dev-site/blog-site settings (max_redirects = 0,500..=599accepted, segment-anchoredexclude_path)..github/workflows/links.yml: runs lychee via mise (install: false+MISE_AUTO_INSTALL: falseso only lychee is installed, not the full Ruby toolchain), on push/PR, weekly cron, and manual dispatch.mise.toml: pinslychee = "0.23.0"and adds acheck-linkstask scanning'./**/*.md' './lib/**/*.rb' './*.gemspec'.mise.lockupdated with all-platform lychee entries..gitignore: ignores.lycheecache.Link fixes (old -> new)
https://dev.maxmind.com/minfraud?lang=en->https://dev.maxmind.com/minfraud/?lang=en(and bare/minfraud->/minfraud/)https://dev.maxmind.com/minfraud/api-documentation/requests?lang=en#...->.../requests/?lang=en#...https://dev.maxmind.com/minfraud/report-a-transaction?lang=en->.../report-a-transaction/?lang=en(and bare variant -> trailing slash)https://dev.maxmind.com/minfraud/track-devices?lang=en->.../track-devices/?lang=enhttps://dev.maxmind.com/minfraud/api-documentation/responses/schema--response--risk-score-reason--multiplier-reason->.../responses/#schema--response--risk-score-reason--multiplier-reason(canonical fragment form, matching the other minFraud client libraries)https://tools.ietf.org/html/rfc3339->https://datatracker.ietf.org/doc/html/rfc3339https://contributor-covenant.org->https://www.contributor-covenant.org/https://opensource.org/licenses/MIT->https://opensource.org/license/MIThttps://www.maxmind.com/en/support->https://support.maxmind.com/knowledge-baseThe responses-page schema anchor is rendered client-side, so its fragment is absent from the static HTML lychee fetches (the page itself is a 200). That single fragment is excluded in
lychee.toml.Final lychee run:
52 Total, 48 OK, 0 Errors, 4 Excluded. RuboCop passes on all edited files.Part of STF-557.
🤖 Generated with Claude Code