Check local links across docs pages#1746
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 26, 2026, 10:30 PM ET / 02:30 UTC. Summary Reproducibility: not applicable. as a cleanup PR rather than a bug report. Source inspection confirms current main lacks docs-wide scanning, and the PR proof reports the expanded 134-link scan at the latest head. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the extended checker with the approved root allowlist and same-page anchor handling, keeping future docs lint failures intentional and source-labelled. Do we have a high-confidence way to reproduce the issue? Not applicable as a cleanup PR rather than a bug report. Source inspection confirms current main lacks docs-wide scanning, and the PR proof reports the expanded 134-link scan at the latest head. Is this the best way to solve the issue? Yes. Extending the existing local documentation link checker is the narrow maintainable path, and the latest head also handles the owner-approved root allowlist plus same-page fragment anchors. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a064edab3e47. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper re-review Exact head: Synced current main and resolved the policy question: recursive links may target |
|
🦞🧹 I asked ClawSweeper to review this item again. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d0e327f720
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!parsed || parsed.protocol || parsed.host || !parsed.pathname) return false; | ||
| return !parsed.pathname.startsWith("#"); |
There was a problem hiding this comment.
Validate fragment-only docs links
When a docs page uses an in-page anchor like [Usage](#usage) or <a href="#usage">, parseRelativeURL returns an empty pathname, so this filter drops the link before validateLocalDocLink can check the fragment against markdownHeadingAnchors. That leaves a common class of local documentation links unchecked, so misspelled same-page anchors will still pass lint-linux even though the new docs-wide checker is meant to catch missing anchors.
Useful? React with 👍 / 👎.
|
@clawsweeper re-review Exact head: Fragment-only Markdown and HTML links now resolve against their containing Markdown file before anchor validation. A temporary fixture proved a valid same-page anchor passes and a missing one fails with a source-labelled diagnostic; the real 134-link scan, |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Summary
../claude.mdare validated correctlyWhy
Scripts/check-documentation-links.mjsalready runs inlint-linux, but it only covered README links and the provider detail list. The docs tree has additional relative links between pages, including nested docs underdocs/refactoranddocs/solutions, that were not part of the guard.Current main has no broken docs-page links; this change makes the existing lint lane catch future drift.
Validation
node --check Scripts/check-documentation-links.mjsnode Scripts/check-documentation-links.mjs->documentation links OK: 134 local linksgit diff --check./Scripts/lint.sh lint-linuxCompatibility
No app behavior changes. The only risk is that future docs-only changes may fail lint when a local docs-page link points outside
docs/, has a missing target, or references a missing markdown heading anchor.Review focus: whether docs-page links should continue to be constrained to targets inside
docs/.