Skip to content

Validate and update links (STF-557)#185

Merged
horgh merged 4 commits into
mainfrom
greg/stf-557
Jun 5, 2026
Merged

Validate and update links (STF-557)#185
horgh merged 4 commits into
mainfrom
greg/stf-557

Conversation

@oschwald
Copy link
Copy Markdown
Member

@oschwald oschwald commented Jun 4, 2026

Adds a lychee link checker (config + Links GitHub Actions workflow, installed via mise) and fixes one stale/redirecting link surfaced by the check.

Link checker setup

  • lychee.toml with max_redirects = 0 so moved links surface and get updated to canonical destinations.
  • mise.toml pins lychee = "0.23.0" and defines a check-links task scanning ./**/*.md, ./lib/**/*.rb, and ./*.gemspec.
  • .github/workflows/links.yml runs on push, pull request, weekly, and manual dispatch; installs only lychee via mise.
  • .lycheecache added to .gitignore.

Links updated (old -> new)

  • README.md: https://www.maxmind.com/en/support -> https://support.maxmind.com/knowledge-base

Final lychee run: 15 OK, 0 errors, 3 excluded.

Part of STF-557.

🤖 Generated with Claude Code

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request integrates the Lychee link checker by adding its configuration file, updating the gitignore, updating a support link in the README, and defining a link-checking task in mise.toml. Feedback highlights two issues: the specified lychee version in mise.toml does not exist and should be changed to a valid version, and the status code ranges in lychee.toml should use standard exclusive syntax to prevent parsing errors.

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.

Comment thread mise.toml Outdated
@@ -0,0 +1,6 @@
[tools]
lychee = "0.23.0"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The version 0.23.0 for lychee does not exist. The latest stable version of the lychee CLI is currently 0.15.1 (or 0.16.0). Specifying a non-existent version will cause mise to fail during installation. Please update this to a valid version.

Suggested change
lychee = "0.23.0"
lychee = "0.15.1"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

lychee 0.23.0 does exist (released 2026-02-13) and is the version dev-site pins; mise install resolves it and the Links workflow runs green here. This looks like an outdated assumption about the latest version.

— Claude (posted on Greg's behalf)

Comment thread lychee.toml
# 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"]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Lychee's status code range parser expects standard exclusive ranges (e.g., 200..300) rather than inclusive Rust-style ranges with = (e.g., 200..=299). Using ..= may result in parsing errors. It is safer to use the standard exclusive range syntax.

Suggested change
accept = ["100..=103", "200..=299", "403", "429", "500..=599", "999"]
accept = ["100..104", "200..300", "403", "429", "500..600", "999"]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

200..=299 (inclusive ..=) is valid lychee syntax — it's used by the dev-site/blog-site configs and this workflow runs green, so no change is needed.

— Claude (posted on Greg's behalf)

oschwald and others added 3 commits June 4, 2026 22:00
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. lychee is installed via mise so
the version is pinned in mise.toml.

Part of STF-557.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Validated all links with lychee and updated the one that redirected:

- www.maxmind.com/en/support -> support.maxmind.com/knowledge-base

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>
Comment thread lychee.toml
@@ -0,0 +1,63 @@
# Lychee link checker configuration
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.

[nit] New config files ship inside the published gem The gemspec uses s.files = Dir['**/*'].difference([...]) and the exclusion list does not exclude lychee.toml, mise.toml, mise.lock, or .gitignore, so these get packaged into the maxmind-db gem. This is a pre-existing packaging pattern (the gemspec is NOT modified by this PR) and matches the rest of the fleet, but the newly added mise/lychee files now ride along in releases. Optional: add them to the gemspec difference list.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done in 2c9b3df — added lychee.toml, mise.toml, mise.lock, and .gitignore to the gemspec's difference exclusion list so they no longer ship in the published gem. Made the same change in GeoIP2-ruby and minfraud-api-ruby for consistency. (Confirmed the published npm and PyPI packages don't ship these — npm uses a files: [dist] allowlist, and the uv/setuptools sdists only include their declared source lists.)

— Claude (posted on Greg's behalf)

The gemspec packages Dir['**/*'] minus an exclusion list, which didn't cover
the link-checking config added in this PR, so lychee.toml/mise.toml/mise.lock
(and .gitignore) would ship in the published gem. Add them to the exclusion.

Part of STF-557.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@horgh horgh merged commit 13e1b9a into main Jun 5, 2026
38 checks passed
@horgh horgh deleted the greg/stf-557 branch June 5, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants