docs checks: validate destinations used by Markdown reference links #2200

Open
github-bot wants to merge 1 commit from github-bot/gh-2200 into main AGit
Owner

@⁠EdenBendheim on GitHub · 2026-11-26 05:26 UTC · original
EdenBendheim:ubiq/docs-reference-links → main · +83 −1 · 1 files · 1 commits · open

Claimed in the coordination issue as: TEST-DOCS-REFERENCE-LINKS (claim)

The docs link check let a page pass when [Guide][guide] pointed to a missing file via a separate definition. The checker now resolves common full, collapsed and shortcut reference links and images, passing their destinations through the existing file and anchor checks. It accounts for unused definitions, repeated labels and GFM footnotes.

A synthetic page with four missing destinations reproduced the false pass on a73a57e13. With the patch it reports all four. On macOS with Python 3.12.14, all 18 link tests and the complete docs-only suite (62 tests across 14 files) passed. CI registration, line-ending, compile, diff and changed-file game-data checks also passed.

GPUs tested: n/a. All tests used synthetic inputs.

AI-assisted: yes. Created with gpt-6.2-astra in Codex.

**@⁠EdenBendheim** on GitHub · 2026-11-26 05:26 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2200) `EdenBendheim:ubiq/docs-reference-links` → `main` · +83 −1 · 1 files · 1 commits · open Claimed in the coordination issue as: TEST-DOCS-REFERENCE-LINKS ([claim](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608)) The docs link check let a page pass when `[Guide][guide]` pointed to a missing file via a separate definition. The checker now resolves common full, collapsed and shortcut reference links and images, passing their destinations through the existing file and anchor checks. It accounts for unused definitions, repeated labels and GFM footnotes. A synthetic page with four missing destinations reproduced the false pass on `a73a57e13`. With the patch it reports all four. On macOS with Python 3.12.14, all 18 link tests and the complete docs-only suite (62 tests across 14 files) passed. CI registration, line-ending, compile, diff and changed-file game-data checks also passed. GPUs tested: n/a. All tests used synthetic inputs. AI-assisted: yes. Created with gpt-6.2-astra in Codex.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:22:05 +00:00
Author
Owner

@⁠real-rusher on GitHub · 2026-11-26 10:12 UTC · original

Verified on main a73a57e1 (Ubuntu 24.04 x86-64, Python 3.13, no GPU). Merges cleanly. python -I tests/test_docs_links.py: 18 tests OK, so the tracked documents have no broken reference links today.

The check is new rather than a fix, so I compared it with main's version directly: for a page with "See [the guide][g]." and "[g]: nowhere.md", main's broken_links() returns nothing, and this PR's returns ("page.md", "nowhere.md", "missing file"). compileall clean.

AI-assisted: yes (Claude Code)

**@⁠real-rusher** on GitHub · 2026-11-26 10:12 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2200#issuecomment-7189053609) Verified on main a73a57e1 (Ubuntu 24.04 x86-64, Python 3.13, no GPU). Merges cleanly. python -I tests/test_docs_links.py: 18 tests OK, so the tracked documents have no broken reference links today. The check is new rather than a fix, so I compared it with main's version directly: for a page with "See [the guide][g]." and "[g]: nowhere.md", main's broken_links() returns nothing, and this PR's returns ("page.md", "nowhere.md", "missing file"). compileall clean. AI-assisted: yes (Claude Code)
Author
Owner

@⁠DeadlyChirp on GitHub · 2026-11-26 10:32 UTC · original

Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main.

  • tests/test_docs_links.py: 18 passed (main: 17 passed).

(AI-assisted test run; output checked by hand.)

**@⁠DeadlyChirp** on GitHub · 2026-11-26 10:32 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2200#issuecomment-7189501576) Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main. - `tests/test_docs_links.py`: 18 passed (main: 17 passed). (AI-assisted test run; output checked by hand.)
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2200/head:github-bot/gh-2200'
git switch 'github-bot/gh-2200'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2200'
git switch 'github-bot/gh-2200'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2200'
git switch 'github-bot/gh-2200'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2200'
git switch 'main'
git merge --squash 'github-bot/gh-2200'
git switch 'main'
git merge --ff-only 'github-bot/gh-2200'
git switch 'main'
git merge 'github-bot/gh-2200'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.