Skip to content

Validate and update links (STF-557)#387

Open
oschwald wants to merge 4 commits into
mainfrom
greg/stf-557
Open

Validate and update links (STF-557)#387
oschwald wants to merge 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 (lychee.toml) and a CI workflow
(.github/workflows/links.yml), then fixes the stale/redirecting links it
surfaced. The config uses max_redirects = 0 so any moved link is surfaced and
updated to its canonical destination.

Links updated (old -> new):

  • pyproject.toml: https://www.maxmind.com/ -> https://www.maxmind.com/en/home
  • pyproject.toml: https://minfraud.readthedocs.org/ -> https://minfraud.readthedocs.io/en/latest/
  • CLAUDE.md: https://minfraud.readthedocs.io/ -> https://minfraud.readthedocs.io/en/latest/
  • CLAUDE.md: dev.maxmind.com/minfraud/report-a-transaction -> .../report-a-transaction/
  • README.dev.rst: https://pypi.python.org/pypi/minfraud -> https://pypi.org/project/minfraud/
  • README.rst: dev.maxmind.com/minfraud/report-a-transaction?lang=en -> .../report-a-transaction/?lang=en
  • README.rst: dev.maxmind.com/minfraud/api-documentation/requests?lang=en -> .../requests/?lang=en
  • README.rst: https://minfraud.readthedocs.io/ -> https://minfraud.readthedocs.io/en/latest/
  • README.rst: https://www.maxmind.com/en/account -> https://www.maxmind.com/en/accounts/current/people/current
  • README.rst: https://www.maxmind.com/en/support -> https://support.maxmind.com/knowledge-base
  • models.py: https://tools.ietf.org/html/rfc3339 -> https://datatracker.ietf.org/doc/html/rfc3339
  • models.py: dev.maxmind.com/minfraud/track-devices?lang=en -> .../track-devices/?lang=en
  • models.py: dev.maxmind.com/minfraud/api-documentation/responses?lang=en#schema--response--warning -> .../responses/?lang=en#schema--response--warning
  • webservice.py: dev.maxmind.com/minfraud/api-documentation/requests?lang=en -> .../requests/?lang=en
  • webservice.py: dev.maxmind.com/minfraud/report-a-transaction?lang=en -> .../report-a-transaction/?lang=en
  • webservice.py: dev.maxmind.com/minfraud/report-transaction/#Request_Body (404) -> .../report-a-transaction/?lang=en

Excluded as false positives:

  • http://www.amazon.com/ — an example referrer_uri value in a docstring/doctest, not a documentation link.
  • dev.maxmind.com/minfraud/api-documentation/responses/...# fragments — the dev-site API docs are a JS-rendered single-page app, so in-page anchors aren't present in the static HTML lychee fetches. The pages are verified without the fragment.

Final lychee run: 32 Total, 26 OK, 0 Errors, 6 Excluded. ruff format/ruff check pass on the edited source files.

Part of STF-557.

🤖 Generated with Claude Code

Comment thread .github/workflows/links.yml Fixed
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 configures the Lychee link checker by adding a lychee.toml configuration file, ignoring its cache in .gitignore, and updating various documentation links across the codebase to use canonical, non-redirecting URLs. Feedback on these changes highlights that setting max_redirects = 0 in the Lychee configuration is overly restrictive and forces fragile URLs; allowing a few redirects is recommended. Additionally, there are broken RST hyperlink syntax errors and typos ('Transations') in the docstrings for the report methods in src/minfraud/webservice.py that need to be corrected.

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 lychee.toml

# Don't allow any redirects, so links that have moved are surfaced and can be
# updated to their canonical destination.
max_redirects = 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.

medium

Setting max_redirects = 0 makes the link checker extremely sensitive to standard, benign redirects (such as trailing slashes, HTTPS upgrades, or locale-based redirection like https://www.maxmind.com/ -> https://www.maxmind.com/en/home). This forces the use of fragile, over-specific, and verbose URLs in the documentation (like https://www.maxmind.com/en/accounts/current/people/current instead of https://www.maxmind.com/en/account), which are harder to maintain and may break if internal routing changes.

Consider allowing a small number of redirects (e.g., max_redirects = 3 or 5) to balance link health with maintenance overhead.

Suggested change
max_redirects = 0
max_redirects = 3

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.

Intentionally keeping max_redirects = 0. Surfacing moved/redirecting links is the goal of this change (STF-557), and it matches the dev-site and blog-site lychee configs; redirects are resolved by updating the link to its canonical target.

— Claude (posted on Greg's behalf)

Comment thread src/minfraud/webservice.py Outdated
to the Report Transations web service as specified in the `REST API`
documentation
<https://dev.maxmind.com/minfraud/report-a-transaction?lang=en>_.
<https://dev.maxmind.com/minfraud/report-a-transaction/?lang=en>_.
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

The RST hyperlink formatting here is broken because the opening backtick on line 391 was closed early (i.e., `REST API` instead of leaving it open). This leaves the URL on line 393 with a dangling trailing underscore _, which is invalid RST syntax and won't render the link correctly.

Additionally, there is a typo on line 391: "Transations" should be "Transactions".

To fix both issues, please update the docstring block in your editor to:

        :param report: A dictionary containing the transaction report to be sent
          to the Report Transactions web service as specified in the `REST API
          documentation
          <https://dev.maxmind.com/minfraud/report-a-transaction/?lang=en>`_.

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.

Good catch — fixed in a separate commit: the link-text backtick was closed early and the closing `_ was missing, so the URL rendered as plain text.

— Claude (posted on Greg's behalf)

Comment thread src/minfraud/webservice.py Outdated
to the Report Transations web service as specified in the `REST API`
documentation
<https://dev.maxmind.com/minfraud/report-transaction/#Request_Body>_.
<https://dev.maxmind.com/minfraud/report-a-transaction/?lang=en>_.
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

The RST hyperlink formatting here is broken because the opening backtick on line 655 was closed early (i.e., `REST API` instead of leaving it open). This leaves the URL on line 657 with a dangling trailing underscore _, which is invalid RST syntax and won't render the link correctly.

Additionally, there is a typo on line 655: "Transations" should be "Transactions".

To fix both issues, please update the docstring block in your editor to:

        :param report: A dictionary containing the transaction report to be sent
          to the Report Transactions web service as specified in the `REST API
          documentation
          <https://dev.maxmind.com/minfraud/report-a-transaction/?lang=en>`_.

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.

Good catch — fixed in a separate commit: the link-text backtick was closed early and the closing `_ was missing, so the URL rendered as plain text.

— Claude (posted on Greg's behalf)

@oschwald oschwald force-pushed the greg/stf-557 branch 2 times, most recently from a0f7f01 to 78065b9 Compare June 4, 2026 20:36
Comment thread .github/workflows/release.yml Fixed
@oschwald oschwald force-pushed the greg/stf-557 branch 4 times, most recently from d88b8e7 to 3ff3873 Compare June 4, 2026 21:41
oschwald and others added 4 commits June 4, 2026 22:00
Part of STF-557.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- pyproject.toml: https://www.maxmind.com/ -> https://www.maxmind.com/en/home
- pyproject.toml: https://minfraud.readthedocs.org/ -> https://minfraud.readthedocs.io/en/latest/
- CLAUDE.md: https://minfraud.readthedocs.io/ -> https://minfraud.readthedocs.io/en/latest/
- CLAUDE.md: dev.maxmind.com/minfraud/report-a-transaction -> .../report-a-transaction/
- README.dev.rst: https://pypi.python.org/pypi/minfraud -> https://pypi.org/project/minfraud/
- README.rst: dev.maxmind.com/minfraud/report-a-transaction?lang=en -> .../report-a-transaction/?lang=en
- README.rst: dev.maxmind.com/minfraud/api-documentation/requests?lang=en -> .../requests/?lang=en
- README.rst: https://minfraud.readthedocs.io/ -> https://minfraud.readthedocs.io/en/latest/
- README.rst: https://www.maxmind.com/en/account -> https://www.maxmind.com/en/accounts/current/people/current
- README.rst: https://www.maxmind.com/en/support -> https://support.maxmind.com/knowledge-base
- models.py: https://tools.ietf.org/html/rfc3339 -> https://datatracker.ietf.org/doc/html/rfc3339
- models.py: dev.maxmind.com/minfraud/track-devices?lang=en -> .../track-devices/?lang=en
- models.py: dev.maxmind.com/minfraud/api-documentation/responses?lang=en#... -> .../responses/?lang=en#...
- webservice.py: dev.maxmind.com/minfraud/api-documentation/requests?lang=en -> .../requests/?lang=en
- webservice.py: dev.maxmind.com/minfraud/report-a-transaction?lang=en -> .../report-a-transaction/?lang=en
- webservice.py: dev.maxmind.com/minfraud/report-transaction/#Request_Body (404) -> .../report-a-transaction/?lang=en

Also excluded the amazon.com referrer_uri example value and the
JS-rendered dev.maxmind.com responses-schema fragments (verified at the
page level) from link checking.

Part of STF-557.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Add missing 'v' prefix to action pin version comments (ref-version-mismatch).
- Disable uv caching in the release workflow (cache-poisoning); dependency
  caching is unnecessary for one-off release builds.

Part of STF-557.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The link text backtick was closed early and the closing `_ was missing, so
the report-a-transaction URL rendered as plain text. Pre-existing; fixed here
while validating links.

Part of STF-557.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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