ci: exclude x.com and twitter.com from the docs link check - #612
ci: exclude x.com and twitter.com from the docs link check#612pablodeymo wants to merge 1 commit into
Conversation
x.com answers the lychee bot with 403 Forbidden intermittently, so the Link Check job failed on PRs that never touched docs/introduction.md (#611 hit it on https://x.com/class_lambda while the same job was green on main days earlier). The links are valid in a browser; this is the same anti-bot behavior the job already tolerates for eprint.iacr.org, so it gets the same exclusion, plus twitter.com, which redirects there. Both patterns are anchored to the URL origin so a host that merely ends in "x.com" is still checked.
🤖 Kimi Code ReviewI'll review this PR diff focusing on the areas you specified. This is a small CI workflow change, but I'll examine it thoroughly. File:
|
| Priority | Issue | Location |
|---|---|---|
| Medium | Missing trailing regex anchor allows subdomain spoofing | Lines 88-89 |
| Low | Comment overstates anchoring precision | Lines 81-85 |
The change is functionally acceptable for a documentation link-checker (attack surface is low), but the regex precision doesn't match the comment's claims. Given this is CI infrastructure for a consensus client, defense-in-depth matters even in peripheral tooling.
Automated review by Kimi (Moonshot AI) · kimi-k2.6 · custom prompt
🤖 Codex Code Review
Other than that, this looks fine. The PR only changes CI link-check exclusions, so I don’t see consensus-layer, memory-safety, or runtime performance risk in the actual client code path. Automated review by OpenAI Codex · gpt-5.4 · custom prompt |
🤖 Claude Code ReviewReview: PR 612 — Exclude x.com and twitter.com from docs link checkThis is a small, well-scoped CI-only change ( Correctness bug: regex isn't anchored to the host boundaryBoth patterns anchor the start (
That's the exact class of false-positive the PR description says it wants to avoid ("hosts merely ending in x.com are still checked") — the same problem exists symmetrically for hosts that start with the string plus extra characters. Any doc link to such a domain would silently stop being checked instead of being validated, undermining the PR's own "Correctness / Behavior Guarantees" claim that "every other external link in Suggested fix — require a path separator or end-of-string right after the domain: Everything else looks fine
Automated review by Claude (Anthropic) · sonnet · custom prompt |
🗒️ Description / Motivation
x.com answers the lychee link checker with 403 Forbidden intermittently, so the Link Check job failed on #611 for
https://x.com/class_lambdaindocs/introduction.md, a file that PR never touched, while the same job was green on main days earlier. The link is valid in a browser; this is the same anti-bot behavior the job already tolerates foreprint.iacr.org.What Changed
.github/workflows/pr-main_mdbook.yml: two lychee--excludepatterns for x.com and twitter.com (which redirects to x.com), anchored to the URL origin so hosts merely ending in "x.com" are still checked. The comment next to the existing exclusion explains why.Correctness / Behavior Guarantees
Only the project's two social links stop being checked; every other external link in
docs/is still validated. Internal links are unaffected (they are checked by mdbook-linkcheck2 in the build step).Tests Added / Run
Patterns checked against every URL in
docs/: they matchhttps://x.com/class_lambdaandhttps://twitter.com/ethlambda_leanonly;https://linux.com/xand GitHub links are not matched. Workflow YAML validated. The Link Check job runs on this PR itself since the workflow file is in its path filter.Related Issues / PRs
✅ Verification Checklist
No Rust changes;
make fmt/make lint/make testnot applicable.