Skip to content

ci: fail static-check on broken markdown links (fixes a broken README image + 2 dead script refs) - #291

Merged
Perry2004 merged 3 commits into
mainfrom
ci/link-check
Aug 19, 2026
Merged

ci: fail static-check on broken markdown links (fixes a broken README image + 2 dead script refs)#291
Perry2004 merged 3 commits into
mainfrom
ci/link-check

Conversation

@reacher-z

Copy link
Copy Markdown
Collaborator

Adds the quality gate that would have caught three link breaks currently live on main — and fixes those three.

What it found

Break Effect
README.md — "Reproduce the leaderboard" heading uses assets/icons/check-double.svg The file does not exist; the heading renders a broken image on the repo front page
docs/scoring.md — "run scripts/clawbench_rescore.py" (link + code block + reference list) That path has never existed. Readers following our reproducibility doc hit "No such file"
eval/scoring.md — same three references Same

The rescore entry point is the clawbench-rescore console script (src/clawbench/eval/rescore.py), so both docs now say that and link the module. The icon reference is repointed at the existing shield-halved.svg.

The gate

scripts/check_markdown_links.py walks every tracked *.md, resolves repo-relative [text](path), ![alt](path) and <img src="path"> targets against the filesystem, and exits 1 listing file:line: target for each break. External URLs (http/https/mailto/data/tel) and pure anchors are skipped — this guards against renames and deletions, not against the network, so it stays fast and never flakes. Wired as the first step of static-check.

Verified both ways: clean tree → all 128 repo-relative markdown links resolve (exit 0); with a deliberately planted bad link → exit 1 naming the file and line.

Note on overlap

#283 independently spotted the missing icon and fixes it by adding check-double.svg. If #283 lands first, drop my one-line icon change during rebase and keep theirs — the checker and the two scripts/clawbench_rescore.py fixes are unaffected either way.

…he 3 live ones)

The checker walks every tracked *.md and resolves relative link and <img src>
targets against the filesystem; external URLs and anchors are skipped. It
found three real breaks on main:

- README 'Reproduce the leaderboard' pointed at assets/icons/check-double.svg,
  which does not exist — the heading renders a broken image. Repointed at the
  existing shield-halved.svg.
- docs/scoring.md and eval/scoring.md told readers to run
  scripts/clawbench_rescore.py, a path that has never existed; the real entry
  point is the clawbench-rescore console script (src/clawbench/eval/rescore.py).

128 relative links now resolve.
@reacher-z

Copy link
Copy Markdown
Collaborator Author

Rebased onto main now that #283 has landed. As flagged in the description, #283 fixed the broken README icon by adding assets/icons/check-double.svg, so I dropped my one-line icon change and kept theirs — this PR is now just the checker plus the two scripts/clawbench_rescore.py doc fixes. Post-rebase: all 154 repo-relative links resolve.

@Perry2004 Perry2004 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The markdown check shouldn't be added to the existing static-check GHA since that won't even be triggered by changes in the docs/markdown.

@Perry2004 Perry2004 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Changes applied in 8b0091c.

@Perry2004
Perry2004 merged commit 9007fe9 into main Aug 19, 2026
3 checks passed
@Perry2004
Perry2004 deleted the ci/link-check branch August 19, 2026 03:43
@github-project-automation github-project-automation Bot moved this from Todo to Done in ClawBench Aug 19, 2026
@Perry2004 Perry2004 added the enhancement New feature or request label Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants