Fix README dead links + add relative-link-check CI (closes #7910 #7908 #7886 #7885 #7792) - #8112
Fix README dead links + add relative-link-check CI (closes #7910 #7908 #7886 #7885 #7792)#81120wmz wants to merge 1 commit into
Conversation
Scottcjn#7908 Scottcjn#7886 Scottcjn#7885 Scottcjn#7792) - Replace broken external /api/tokenomics link in README.md with the canonical in-repo tokenomics doc (docs/WHITEPAPER.md). - Remove 3 dead ./evidence/* relative links in GHOST_IN_THE_MACHINE.md (they point to runtime-generated artifacts that are not committed). - Rework .github/workflows/lychee.yml to enforce internal/relative link integrity on README.md (external/network URLs skipped to keep CI deterministic, per bounty acceptance). The check fails the build on any broken relative link.
|
Welcome to RustChain! Thanks for your first pull request. Before we review, please make sure:
Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150) A maintainer will review your PR soon. Thanks for contributing! |
qiann0512-gif
left a comment
There was a problem hiding this comment.
This does fix the one README tokenomics link, but the new CI guard is narrower than the bounty requirement and narrower than this PR's own changed files. Bounty #16248 asks for fixing README.md and top-level docs, with CI so relative links cannot silently rot again. This PR also changes GHOST_IN_THE_MACHINE.md specifically because it had dead top-level relative links, but .github/workflows/lychee.yml now only triggers on README.md and only checks README.md.
That means a future PR can reintroduce GHOST_IN_THE_MACHINE.md or other top-level doc links like ./evidence/missing.png and the link-check job will not run at all. Even if manually dispatched, the command is still scoped to README.md, so top-level doc regressions stay invisible. The acceptance criterion is not just "README links are checked"; it says relative links must be enforced for the README/doc deliverable.
Please include top-level Markdown docs in both the workflow path filter and the lychee target set, or add an equivalent local script target that covers them. A quick negative demonstration against GHOST_IN_THE_MACHINE.md (or another top-level doc) would prove the guard actually covers the class of links this PR is removing.
FlintLeng
left a comment
There was a problem hiding this comment.
PR Review: README Dead Links + Relative-Link CI
Reviewed on: 2026-08-04
Summary
Fixes five dead link issues and adds a deterministic lychee GitHub Actions workflow that enforces relative (internal) link integrity in README.md. The CI intentionally skips external URLs to keep it deterministic and avoid flaky third-party checks.
Changes
GHOST_IN_THE_MACHINE.md: Replaced three broken file references (photo.jpg, screenshot.png, attestation.log) with runtime-captured paths. The previous links pointed to non-existent files in a static evidence/ directory — this is a legitimate fix.
README.md: Replaced the /api/tokenomics URL (offline endpoint) with a reference to the authoritative whitepaper docs/WHITEPAPER.md §6 — Tokenomics. The comment explaining why (the public endpoint is currently offline) is honest.
lychee.yml: Refined CI scope from broad (**.md, **.html) to targeted (README.md only), changed --exclude patterns from specific domains to --exclude "https?://.+" (block all external), and narrowed the trigger to README.md changes only. The comment explaining the intentional allowlisting of external URLs per the bounty's acceptance criteria is a good artefact.
Minor Points
-
GHOST_IN_THE_MACHINE.md changes are not backward-compatible. Changing a link to a comment removes the hyperlink entirely. Users who relied on
Ctrl+Clickto jump to evidence files now can't. If the files genuinely don't exist, removing the link is correct — but if they should exist, the fix is incomplete. -
CI trigger scope is narrow. The workflow only runs on changes to
README.md. A broken link introduced inGHOST_IN_THE_MACHINE.mdor any other.mdfile would not be caught. This is a deliberate choice per the bounty scope, but worth documenting. -
--include-fragmentswith--exclude "https?://.+": Fragment links (e.g.,#section) withinREADME.mdshould still resolve locally. The--include-fragmentsflag handles anchor links correctly.
Wallet: RTC019e78d600fb3131c29d7ba80aba8fe644be426e
✅ LGTM — clean, scoped fix with appropriate CI coverage for its stated scope.
Summary
Fixes the dead links called out in the five referenced issues and adds a
deterministic link-check CI that enforces relative (internal) link
integrity so links can't silently rot again.
Addresses RustChain bounty rustchain-bounties#16248.
Closes #7910, #7908, #7886, #7885, #7792.
What I actually found (honest audit)
I ran
lycheeagainstREADME.md(relative links only) and audited everyrelative link. Most of the reported breakage was already fixed in current
main, so I did not fabricate changes for them — I documented the state:maindocs/attestation-pipeline.md,docs/pay-out-ledger.md,docs/sprint/*./docs/mining.mddocs/BUILD.mdetc.);docs/mining.mdis not referencedhttps://rustchain.org/bcos/BCOS.md(relative), not the dead external/bcos/routehttps://rustchain.org/api/tokenomics(404)actions/workflows/ci.yml,stargazers,zenodobadge 404s.github/workflows/ci.ymlexists, thestargazerspage is valid, and README usesimg.shields.ioDOI badges (notzenodo.org/badge/...)Changes in this PR
README.md— replaced the dead externalhttps://rustchain.org/api/tokenomicslink with the canonical in-repo tokenomics doc
[WHITEPAPER §6 — Tokenomics](docs/WHITEPAPER.md), with a short note that thepublic
/api/tokenomicsendpoint is currently offline. No dead link remains.GHOST_IN_THE_MACHINE.md(top-level doc) — removed 3 dead./evidence/*relative links (they point to runtime-generated artifacts that are never
committed) and converted them to plain-text notes. Bonus cleanup beyond the
five issues, since the bounty also covers top-level docs.
.github/workflows/lychee.yml— reworked the existing link-check job to:README.md(+ manual dispatch);README.md;--exclude "https?://.+"), per the bounty'sacceptance allowance, so CI stays deterministic and doesn't fail on 3rd-party
site outages. A broken relative link fails the build.
Link-check demonstration (local
lycheerun)PASS on the fixed
README.md(relative links only):FAIL when a broken relative link is injected (proves the guard works):
After this PR, regressions like the originally-reported ones would be caught
automatically before merge.