Skip to content

docs: 24 internal links point at files that do not exist, and nothing checks them #208

Closed

Description

@scttfrdmn

24 internal links in docs/ point at files that do not exist. Nothing checks them, so the count only grows.

Resolved by walking each relative link against its containing directory:

source dead target
docs/architecture/overview.md caching-deep-dive.md, data-flow.md, performance.md, s3-backend-deep-dive.md
docs/s3-acceleration.md ./storage-backends.md, ./performance-tuning.md, ./monitoring.md, ./cargoship.md
docs/index.md personas/{climate-scientist,computational-biologist,lab-manager,physics-researcher,research-computing}.md
docs/features/multipart-uploads.md ../configuration/s3.md, ./cargoship.md, ./performance.md
docs/features/read-ahead.md ../configuration/cache.md, ./ml-training.md, ./performance.md
docs/memory-monitoring.md ./operations.md, ./performance-tuning.md
docs/performance-metrics.md ./cost-optimization.md, ./performance-tuning.md
docs/concurrency-patterns.md ./testing.md

The clusters are informative. performance-tuning.md is referenced from four different files and has never existed — it is the page the docs keep promising. The five personas/ links are the whole audience section of the docs index; persona: labels exist on GitHub for all five, so the intent was real and the pages were never written.

Do, and the order matters:

  1. Add a link checker to CI (lychee, offline mode for relative links) so this is gated. Do that first — otherwise the 24 are fixed and the 25th arrives next week. There is no link checking in .github/ or .pre-commit-config.yaml today.
  2. Then resolve each link one of two ways: point it at the page that does cover the topic, or delete the link. Do not create stub pages to satisfy the checker — an empty page that satisfies a link is the docs equivalent of the echo "Would update the Homebrew formula..." job that v0.10.1 deleted.
  3. performance-tuning.md deserves a decision rather than four deletions: four pages want to link to it, which is a real signal that the page should exist. If it is written, it must be measured — Documentation still claims features that do not exist: 19 files, four systemic patterns #182 covers the fabricated performance data in docs/s3-acceleration.md:176-182 and docs-platform/index.md:278-293, and a new tuning page inventing numbers would be the same defect again.

Verification: the link checker passes in CI, and the count of dead relative links in docs/ is zero — checked by the gate, not by hand.

Activity

  1. added
    type: documentation
    type: ci-cd
    priority: medium
    area: docs
    on Aug 2, 2026
  2. scttfrdmn commented on Aug 2, 2026

    @scttfrdmn
    OwnerAuthor

    Done in 128ae6e. The gate is internal/config/docs_links_test.go, and the count it found is worth recording: 45, not 24.

    Why the count differs

    This issue was written by walking docs/. The gate walks every tracked markdown file, and two whole classes of dead link live outside that walk:

    class count why docs/ could not see it
    relative links in docs/ 24 as filed
    SDK examples/ files 13 sdks/python/, sdks/javascript/ — outside the walk
    root-absolute VitePress routes 8 /guide/installation is not a filesystem path

    Scoping a gate to where the defects were already known is how the next cluster stays invisible. This is the same shape as docs_test.go's nestedSectionNames: five blocks of invented config keys passed the test written to catch them, because its admission test skipped them. Hence the second test below.

    A Go test rather than lychee in CI

    The issue proposed lychee in offline mode. A test instead, for three reasons recorded in the file:

    • No network and no new tool, so pre-commit and CI check at identical fidelity. A link checker that only runs in CI is a gate a contributor discovers after pushing.
    • It sits with the four gates a contributor already satisfies, in the package CONTRIBUTING.md names.
    • An exemption can carry its reason in code, the way docsExemptFromConfigSchema does. A lychee ignore list is a regex with no room for why.

    Two trees, two routing rules

    docs-platform/ is VitePress: /guide/installation is a route served from guide/installation.md, and /api/ from api/index.md. docs/ is MkDocs with relative links. The gate encodes only the rule it knows (vitePressRouteRoots) and skips root-absolute links elsewhere rather than guessing — a wrong resolution rule produces failures nobody can act on, which is how a gate gets disabled.

    Three tests, because the resolving one is not self-guarding

    TestDocumentedLinksResolve                        every relative link resolves on disk
    TestLinkGateSeesEveryMarkdownFile                 the walk's reach, not its findings
    TestNoDocumentedLinkPointsIntoAnExampleDirectory  no stub pages
    

    The middle one earned its place by mutation. I broke the link regexp so it matched nothing: TestDocumentedLinksResolve passed, on zero links, green. Only the reach test caught it. That is the failure mode this issue's 24-vs-45 gap is an instance of, and it is now asserted directly — markdown must be found in each of five trees, and at least 10 files must carry a checkable link.

    All five assertions were verified to fail when the thing they assert is broken, per the rule added to CONTRIBUTING.md in e59b1e6.

    The stub-page test

    You asked for no stub pages. The gate's first run created the exact pressure to make some: 13 example links, two directories that have never existed, and the one-minute fix is 13 files containing # TODO. That is the docs equivalent of the echo "Would update the Homebrew formula..." job v0.10.1 deleted, and the link gate would then report success. So TestNoDocumentedLinkPointsIntoAnExampleDirectory fails if an examples/ directory appears holding files too small to be working programs — the assertion lives at the point where the shortcut would be taken, not in a review comment.

    The 45 repairs

    Resolved the two ways you specified — point at the page that covers the topic, or delete the link. Three worth naming:

    • performance-tuning.md was linked from four pages (read-ahead, multipart uploads, memory monitoring, S3 acceleration) and never written. Four authors each assumed it existed because the others linked it. If it is ever written it has to cite measurements per the CONTRIBUTING.md rule, which is plausibly why it never was.
    • ml-training.md is the most misleading of the set. There is no model to train: the Predictor interface internal/cache accepts is never set on the mount path, so the size heuristic is what runs.
    • docs/index.md lost its whole audience section — five persona links into an empty directory. Replaced with the names as plain text, since the persona: labels do exist on GitHub and the intent was real.

    Verification

    Per the issue: the count of dead relative links is zero, checked by the gate rather than by hand.

    $ go test -race ./internal/config/
    ok  	github.com/scttfrdmn/objectfs/internal/config	1.685s
    
    $ go test -race -timeout 20m ./...     # 33 packages
    exit 0
    
    $ golangci-lint run --new-from-merge-base=main
    0 issues.
    

    One thing this does not cover

    Reference-style links ([text][ref] with the definition elsewhere) are not resolved. There are none in the repository today; the limitation is stated in the test's doc comment so that whoever adds the first one finds out from the file rather than from a link rotting silently.

    Separately, six directories under docs/ are empty — api, development, getting-started, operations, personas, user-guides. Found while fixing these links, since three of them were link targets. Filing that separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: docspriority: mediumtype: ci-cdtype: documentation

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions