Validate and update links (STF-557)#444
Conversation
There was a problem hiding this comment.
Code Review
This pull request configures the Lychee link checker by adding a lychee.toml configuration file, ignoring .lycheecache in .gitignore, and updating several outdated URLs in the documentation. The review feedback suggests anchoring the regular expressions in exclude_path to prevent over-broad exclusions (such as 't/' matching any path containing t/) and removing HTTP 5xx status codes from the accept list to avoid silently ignoring permanently broken links.
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_path = [ | ||
| '\.git', | ||
| # Build / generated directories | ||
| 'build', | ||
| '\.libs', | ||
| 'autom4te\.cache', | ||
| 'generated', | ||
| # Generated Hugo site output | ||
| 'docs/public', | ||
| # Vendored submodules and test harness/fixtures | ||
| 'maxmind-db', | ||
| 't/libtap', | ||
| 't/', | ||
| # Changelog: historical entries are preserved as-is, not rewritten | ||
| 'Changes\.md', | ||
| ] |
There was a problem hiding this comment.
The regular expressions in exclude_path are unanchored, which can lead to accidental exclusions of valid files.
Specifically, 't/' matches any path containing the substring t/. This will exclude any directory or file path that ends with t followed by a slash, such as docs/content/, docs/layouts/, src/test/, or any path containing words like client/, asset/, project/, net/, etc. This silently disables link checking for a large portion of the repository.
Similarly, 'build' will match any path containing the word build (e.g., dev-bin/build-release.sh or any other file with build in its name).
To prevent these over-broad matches, anchor the regular expressions to the start of the path (^) and ensure directory boundaries are respected.
exclude_path = [
'^\.git/',
# Build / generated directories
'^build/',
'^\.libs/',
'^autom4te\.cache/',
'^generated/',
# Generated Hugo site output
'^docs/public/',
# Vendored submodules and test harness/fixtures
'^maxmind-db/',
'^t/',
# Changelog: historical entries are preserved as-is, not rewritten
'^Changes\.md$',
]
There was a problem hiding this comment.
Fixed — the exclude_path patterns are now segment-anchored as (^|/)dir/, so short names like t no longer match unintended paths.
— Claude (posted on Greg's behalf)
| # 429: Too Many Requests | ||
| # 500-599: Server errors (temporary issues shouldn't fail CI) | ||
| # 999: LinkedIn's custom status code | ||
| accept = ["100..=103", "200..=299", "403", "429", "500..=599", "999"] |
There was a problem hiding this comment.
Including "500..=599" in the accept list means that any HTTP 5xx server errors (such as 500 Internal Server Error, 502 Bad Gateway, or 503 Service Unavailable) will be treated as successful checks.
While this prevents temporary server issues from failing the CI build, it also silently ignores permanently broken links where the hosting server is misconfigured or down.
Instead of accepting 5xx status codes globally, it is recommended to rely on Lychee's retry mechanism or exclude specific flaky domains if necessary.
| accept = ["100..=103", "200..=299", "403", "429", "500..=599", "999"] | |
| accept = ["100..=103", "200..=299", "403", "429", "999"] |
There was a problem hiding this comment.
Keeping 500..=599 in accept, matching the dev-site and blog-site configs — transient upstream 5xx shouldn't fail link-checking CI.
— Claude (posted on Greg's behalf)
c936d5c to
75939a2
Compare
Adds a lychee configuration and a Links GitHub Actions workflow so that stale or redirecting links are caught automatically going forward. The checker runs on push, pull request, and weekly to catch external link rot. max_redirects is 0 so links that have moved are surfaced and can be updated to their canonical destination. The configured globs cover Markdown docs plus C sources and headers, which is where links appear in this repository. Vendored submodules (maxmind-db, t/libtap), the test harness under t/, build/generated directories, the Hugo site output, and the Changes.md changelog are excluded. Part of STF-557. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Validated all links with lychee and updated those that redirected elsewhere to their canonical destinations: - help.launchpad.net/Packaging/PPA -> documentation.ubuntu.com /launchpad/user/Packaging/PPA/ - github.com/Homebrew/homebrew-core/edit/master/Formula/libmaxminddb.rb -> .../blob/main/Formula/lib/libmaxminddb.rb (formula relocated under Formula/lib/ and default branch is now main; "Edit the file" step still applies from the blob page) - ports.macports.org/port/libmaxminddb -> .../libmaxminddb/ (trailing slash) Part of STF-557. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Validated every link in the repository with lychee (
max_redirects = 0, so any redirect surfaces as an error) and updated those that were out of date or redirecting.CI setup
lychee.tomltuned for this C library (Markdown docs + C sources/headers; excludes vendored submodules, thet/test harness, build/generated dirs, the Hugo site output, and theChanges.mdchangelog).LinksGitHub Actions workflow (.github/workflows/links.yml) that runs on push, pull request, weekly schedule, and manual dispatch; opens an issue on scheduled failures..lycheecacheto.gitignore.Link fixes
README.dev.md
https://help.launchpad.net/Packaging/PPA->https://documentation.ubuntu.com/launchpad/user/Packaging/PPA/https://github.com/Homebrew/homebrew-core/edit/master/Formula/libmaxminddb.rb->https://github.com/Homebrew/homebrew-core/blob/main/Formula/lib/libmaxminddb.rb(formula relocated underFormula/lib/, default branch renamedmaster->main; the original/edit/URL also forced a login redirect, so theblobpage is used and the surrounding "Edit the file" instruction still applies)README.md
https://ports.macports.org/port/libmaxminddb->https://ports.macports.org/port/libmaxminddb/(trailing slash)No changelog entries were modified.
Final lychee result
26 Total, 22 OK, 0 Errors, 4 ExcludedPart of STF-557.
🤖 Generated with Claude Code