docs: write README links absolute so they resolve on PyPI - #172
Merged
Conversation
Benchmark gate✅ gate passed
Gated (fails the build): |
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.
Implements modern-python/.github#85 for this repo.
Why
README.mdis this package's PyPI long description, and PyPI does not rewrite relative links: itresolves them against
https://pypi.org/project/<name>/. Relative links here therefore 404 on thepackage page while resolving correctly in the checkout, which is why the offline link gate is green
on them and always has been. The gate answers a different question than the package page asks.
Verified against a live rendered PyPI page rather than inferred from renderer behaviour. Measured
org-wide, 23 of 25 published packages carry relative README links, all dead on their package pages.
Design
Relative links become absolute
blob/main/self-links, ortree/main/for a directory. The--remapadded in modern-python/.github#82 resolves those against the working tree, so the gatekeeps checking them rather than excluding them as external. Coverage is unchanged.
mainrather than a release tag: a tag would stay correct in each frozen long description, butmodern-python/.github#82 deliberately excludes tag-pinned URLs from the gate, and writing the tag in
needs release-time substitution this repo does not have.
mainbounds the rot to old releases whilekeeping every link checked.
The rule goes in
AGENTS.mdas an instruction rather than a test.CLAUDE.mdimportsAGENTS.mdhere, so it is loaded into every agent turn, which makes it enforcement rather than documentation.
If a relative link appears in a README after this, that judgement is falsified and a test is the
answer. The
<repo>placeholder keeps the paragraph byte-identical across all 25 repos.Non-goals
README.md, which are correct and gate-checked.githubor the two templates, which publish no long descriptionVerification