Skip to content
auroraxoPublic

About

Measure documentation image rot across popular OSS repositories — open scanner, report, and commit-pinned dataset

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

76 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docrot

CI

Measure documentation image rot in public Git repositories.

Documentation breaks silently. A screenshot is hot-linked from a company CDN, the company rebrands, and the image vanishes from every version of the docs at once — including the tags, the release notes and the archived copies. Nothing fails, no CI job turns red, and the only signal is a reader seeing a broken image.

docrot reads the markdown of a repository at a named commit, resolves every image reference, and answers two questions per image:

  • does it still load?
  • who has to stay online for it to keep loading?

Published dataset and report: https://codebyaurora.com/docrot/ Field log (what acting on the findings produced in one day and one night): https://codebyaurora.com/docrot/story.html

Results

First full pass over the 100 most-used repositories from the corpus in repos.txt, scanned at default-branch HEAD on 2026-09-27. Raw data: docrot-results-100.json (images) and drift-results-100.json (version pins); interactive report: https://codebyaurora.com/docrot/.

Image rot. 6,179 image references resolved, covering 3,391 distinct images; 2,615 of those (77%) load from outside the repository, 1,791 (53%) from hosts GitHub doesn't control. 58 external images no longer load, and 87 in-repo paths resolve to nothing in the tree they name — 26 of the 100 repositories carry at least one broken documentation image. Extremes: appsmithorg/appsmith (9 dead Notion-hosted design-system screenshots, 73 missing in-repo paths — reported as appsmithorg/appsmith#42298) and tensorflow/tensorflow (all 9 build-status badges in the README's "Official Builds" table return 403, plus an artifact link to the discontinued Bintray returning 410 — reported as tensorflow/tensorflow#128150, where the dead badge block was subsequently removed upstream by tensorflow/tensorflow#128179 (merged 2026-09-30)).

Version drift. Of the same 100 repos, 89 advertise their declared release correctly, 10 declare no machine-readable version (skipped, never guessed), and exactly one carries a stale pin: apache/airflow pins ==3.3.0 in its README while the manifest declares 3.4.0 — reported as apache/airflow#73769 and fixed by apache/airflow#73770, merged into main by PMC chair Jarek Potiuk on 2026-09-27).

Every number above was line-verified before reporting. Several of the false-positive classes were found precisely by chasing a headline finding to its source. The newest one was chased the same way: angular/angular' 18 "missing" tutorial images all serve HTTP 200 from angular.dev — its docs engine (adev/) rewrites image roots against the site, not the repository root — so they are now excluded as docs-site references (dataset v3, regression-tested), which is why the missing count reads 87, not 105.

Second wave. The next 100 repositories by stars (≥15k, zero overlap, repos2.txt) were scanned the same day at HEAD; raw data: docrot-results-wave2.json. 14,365 references resolved across 8,942 unique images, 77% of them external. 104 external images are broken and 48 in-repo paths resolve to nothing — 27 of the 100 carry at least one broken documentation image, against 26/100 in wave one: the rate is corpus-independent, the external share stays flat (77% vs 77% of unique images), and wave 2 leans less on independent third-party hosts (31% vs 53%). Corrected in v1.3.1: this sentence previously compared shares across different bases ("77% vs 29%") — the datasets were always right. Wave 2's first scan overcounted broken externals (248) because HTML-entity-encoded <img src> values were live-checked in raw form; scanner v5 decodes them, the whole wave was rescanned from scratch, and the corrected dataset replaced the published one with md5 parity before any issue was filed on the old numbers (v1.2.0). Five findings from this wave were verified line by line and reported: microsoft/PowerToys#50821, firecrawl/firecrawl#4776, flutter/flutter#193415, jackfrued/Python-100-Days#1217 (with a two-line fix PR #1218), and labuladong/fucking-algorithm#2653.

Third wave. One star tier down: the next 100 candidate repositories (10k–15k stars, zero overlap with either earlier corpus, repos3.txt) were scanned under scanner v5; raw data: docrot-results-wave3.json. 6,037 references resolved across 4,457 unique images, 75% external. 1,472 external images are broken and 25 in-repo paths resolve to nothing — 30 of the 100 carry at least one broken documentation image (against 27/100 in wave two and 26/100 in wave one): across three tiers and 300 repositories, the rot share remains ~26–30%. This wave yielded the two largest single-host rot clusters of the project:

  • Azure/azure-quickstart-templates#14882: all 892 status badges on azurequickstartsservice.blob.core.windows.net return HTTP 409 Conflict (PublicAccessNotPermitted), breaking the status block in 146 READMEs simultaneously (prescribed by 1-CONTRIBUTION-GUIDE/sample-README.md).
  • aalansehaiyang/technology-talk#84: author's personal CDN offercome.cn is completely unreachable (HTTPS timeout), rendering 477 unique off-repo images dead across docs/md/**.
  • sml2h3/ddddocr#317: all 26 off-repo images on author CDN cdn.wenanzhe.com return HTTP 404, breaking sponsor badges and captcha demonstration images in READMEs.

The 300-repo audit (scanner v5 -> v8). Before extending the corpus any further, all three waves were re-scanned under three newer scanner generations and every delta was verified by hand. The verification found three false-positive classes in the scanner itself (interleaved backtick-run pairing, deeply indented fences inside list items, and list-item boundary pairing), each reproduced against GitHub's rendered HTML on a real repository and fixed before anything was published — v1.5.1, v1.5.2, v1.6.0, mirrored in docrot-api v1.5.0 and v1.6.0. Four hard expectation gates (both new phantoms absent, the original one still absent, no over-stripping of webpack's 47 recovered reference definitions) ran green before publication. The headline survived its own correction pass: rot share across 300 repositories moved from 83/300 (27.7%) under v5 to 90/300 (30.0%) under v8 — still inside the published 26–30% band, per wave 28/29/33. Full datasets: docrot-results-wave1-v8.json, docrot-results-wave2-v8.json, docrot-results-wave3-v8.json; the earlier v6/v7 datasets remain in the repo as archived intermediates and are superseded.

Known rot clusters

Grouping the 1,691 broken off-repo references from the v8 audit (300 repos, 33,588 references, 17,026 unique images) by hostname shows that most rot is concentrated in a few clusters rather than evenly spread. Every row below was re-aggregated from the three published v8 datasets and re-verified live with curl -L on 2026-10-11:

Host Broken unique images Refs Repos Live status 2026-10-11
azurequickstartsservice.blob.core.windows.net 892 892 1 (146 READMEs) HTTP 409 (PublicAccessNotPermitted) — filed as #14882
offercome.cn (incl. www.) 477 491 1 TLS certificate expired (curl exit 60) — filed as #84
cdn.wenanzhe.com 26 78 1 HTTP 404 — filed as #317
labuladong.online 22 24 1 HTTP 404
travis-ci.org (legacy .org badges) 8 16 7 8/8 distinct targets HTTP 404; the live .com/api. endpoints answer 200 — filed as nestjs/nest#18091 and wifiphisher/wifiphisher#1727
upload.wikimedia.org 23 40 2 HTTP 200 now (was HTTP 429 at scan time — transient, not rot)
packagephobia.com 26 27 2 HTTP 429 now (rate-limited, not a permanent cluster)
badgen.net 20 20 2 mixed HTTP 200/502 (flaky, not a permanent cluster)

Read as: three single-host failures (blob.core.windows.net, offercome.cn, cdn.wenanzhe.com) account for 1,395 of the 1,691 broken references — one dead origin can break an entire documentation set at once. The travis-ci.org row is the one cross-repository cluster that is still permanently dead (7 repos carry 8 distinct badges pointing at the retired .org endpoint). The remaining rows are scan-time transients and are documented as such so they are not mistaken for durable findings.

Screened, not rot

Three additional hostname clusters looked promising by repo spread but were rejected after live re-verification on 2026-10-11 (curl, no browser):

  • deepwiki.com badge (8 repos incl. supabase, excalidraw, nuxt, langflow): HTTP 429 on every attempt — rate limiting, not a dead host.
  • repology.org badges (6 repos incl. neovim, scrcpy, systemd, netdata): HTTP 403 with curl's default agent but HTTP 200 with a browser User-Agent — bot blocking, not rot.
  • starchart.cc star badges (3 repos): HTTP 400 with body {"error":"rate limited, please try again later"} — service alive, rate limiting, not rot.

None of these belong in an issue to the affected repositories: the URLs work for human visitors, and the scanners see a transient refusal they may or may not retry. Rot requires the resource to be gone, not gated.

Usage

echo 'owner/repo' > repos.txt
export GITHUB_TOKEN="your_token_here" # or echo "$GITHUB_TOKEN" > ~/.ghtok; helps avoid rate limits
python3 scan.py repos.txt results.json
python3 generate_report.py results.json index.html [drift-results.json [outcomes.json [wave2-results.json [wave3-results.json]]]]

outcomes.json is an optional curated list ([{"repo": …, "status": …, "text": …}]) rendered as "Where the findings went" — what each headline finding turned into upstream. wave2-results.json and wave3-results.json (further 100-repo datasets from scan.py) add companion sections ("A second wave", "A third wave: one star tier down") with their own KPIs and per-wave findings tables. Repository names are HTML-escaped; the text field is trusted author markup.

No dependencies beyond the Python 3 standard library. The token needs no scopes for public repositories.

Version drift

Broken images have a sibling rot class: READMEs that still advertise an old release while the manifest declares a newer one. Five hardcoded "0.1.5" fallback literals shipped inside a released Python package, and a product landing page advertised v0.1.4 while v0.1.8 was live — nothing failed, the documentation just lied. version_drift.py pins that class down:

python3 version_drift.py repos.txt drift-results.json

The declared version is read from pyproject.toml, package.json, Cargo.toml, or VERSION (monorepo placeholder 0.0.0 ignored; highest semver tag as fallback). Only pins that name this project count as drift: release tag/download URLs on this repository, pip pins whose distribution name matches the repo (apache-airflow==3.3.0 in apache/airflow), npm pins likewise, and shields version badges. Everything else is a mention, never drift — other projects' release links (google/jsonnet v0.16.0 inside prometheus docs), dependency pins (botocore==1.31.81 in localstack docs), example placeholders ("package==1.0.0"), prerelease specs (dbt-core==2.0.0rc1 is not a 2.0.0 pin), example release links ("For example:" lines teach the URL shape, they do not advertise the current version), bare prose versions, and CHANGELOG*/CHANGES* files entirely. A pin matching the latest published release also counts as current: main-branch manifests often declare an unreleased version, and pinning the newest real release is honest.

Every finding is verified against the source line before it is reported; the first 40-repository pass flagged six repos, five of which proved to be the false-positive classes above — the rules here are what the hardened scan removed them with. The corpus was then widened to 100 repositories (see Results).

Classification

Every image reference falls into exactly one bucket.

Bucket Meaning Counted as rot
in-repo Resolves to a blob present in the repository's own git tree at the scanned commit no
missing A relative path outside a docs-site tree that resolves nowhere in the git tree yes
external An absolute http(s) URL; fetched with HEAD, falling back to GET yes if status ≥ 400 or unreachable
unresolvable Root-relative paths inside a built docs site, template placeholders, data URIs, non-HTTP schemes no — excluded on purpose

Two decisions matter:

In-repo images are verified against the git tree, not over HTTP. Listing the tree is authoritative and cheap, and it removes an entire class of false positives: percent-encoded filenames, spaces, non-ASCII paths and raw-host rate limits cannot make a present file look missing.

Unresolvable references are excluded from every rot figure and reported in their own column. A path like /img/tutorial/image01.png in a mkdocs or Docusaurus tree is resolved by the site build, not by the repository layout; a static scan cannot know the published URL. Counting those as broken inflates the headline number by an order of magnitude — an early version of this tool reported 115 broken images in one repository where the honest answer was zero. Declaring the exclusion is the difference between a dataset and a scare.

Known limitations

  • Markdown files are capped per repository (default 150, READMEs and docs trees first). A repository above the cap is sampled, not censused; the report shows both numbers.
  • Image-looking syntax inside fenced or inline code, and inside HTML comments, is ignored: examples and commented-out snippets do not become rendered documentation images.
  • A host that refuses automated requests can look broken when a browser would load the image. Hosts are listed per image so any such case is checkable.
  • Only markdown and MDX are read. Images referenced from HTML templates, RST, or code comments are out of scope.
  • Only images are checked. Dead links generally are a larger problem and a different tool.

Why off-repository hosting matters

An image outside the repository is a dependency on another publishing surface. It may be operated by the project, GitHub, or somebody else; the scanner cannot infer ownership from a hostname and does not claim to. The dataset therefore reports GitHub-hosted and non-GitHub external image counts separately for every repository scanned, not only the ones where something has already failed.

In the 100-repository corpus:

  • 91 of the 100 repositories load at least one documentation image from an off-GitHub host.
  • Across those 91 repos, images depend on 160 distinct third-party hosts.
  • Five hosts have failed completely: every image the scan found on them no longer answers — storage.googleapis.com (tensorflow/tensorflow, 9/9 badges 403), s3-us-west-2.amazonaws.com (appsmithorg/appsmith, 9/9 Notion-hosted assets 403), repology.org (3/3 badges across neovim, netdata, systemd), api.travis-ci.org (2/2 across nestjs, nodejs), and strapi.io (2/2). Ten additional single-image third-party hosts have completely rotted.

The interactive report tables enumerate every host, its reference count, and which repositories depend on it: https://codebyaurora.com/docrot/

Reproduce one finding in 60 seconds

The whole dataset is rebuilt by scan.py, but you don't have to trust the aggregate: pick a single repository from any wave file and re-run just it. sml2h3/ddddocr is a compact example — the published wave-3 dataset lists 26 broken external images on the author CDN cdn.wenanzhe.com.

export GITHUB_TOKEN="your_token_here"        # or echo "$GITHUB_TOKEN" > ~/.ghtok
echo 'sml2h3/ddddocr' > one-repo.txt
python3 scan.py one-repo.txt one-repo.json   # ~10s
python3 -c "import json; r=json.load(open('one-repo.json'))['repos'][0]; \
 print({k: r[k] for k in ('imageRefs','uniqueImages','externalThirdPartyBroken','missingInRepo')})"

Expected output (scanner v8, 2026-10-11, HEAD c40f56f):

{'imageRefs': 81, 'uniqueImages': 29, 'externalThirdPartyBroken': 26, 'missingInRepo': 1}

Each entry in one-repo.json carries its target, HTTP status and refs (the exact file and line syntax that produced it). Spot-check any of them in a browser or with curl:

curl -s -o /dev/null -w '%{http_code}\n' -L https://cdn.wenanzhe.com/img/logo.gif
# -> 404

If you get different numbers, the rot moved — which is the point of the tool. Open an issue with your output and it counts as a finding either way.

Version & history

Every release is tagged and documented twice: Releases carry the full measurement narrative per version, and the CHANGELOG keeps a machine-friendly Keep-a-Changelog history ([1.0.0] through the current version). The scanner itself is versioned in scan.py ("version": 8 dataset schema) alongside git tags.

Licence

MIT for the scanner. The dataset is CC0 — take it, re-run it, disagree with it.

Support

Questions, phantom reports that are not bugs, and "should this count as rot?" debates belong in GitHub Discussions. Bugs and feature requests go through the issue templates — discussion threads tend to stay unanswered as issues.

About

Measure documentation image rot across popular OSS repositories — open scanner, report, and commit-pinned dataset

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages