Skip to content

docs: mkdocs.yml's nav describes a site that was never written — 47 of 50 entries point at nothing #224

Closed

Description

@scttfrdmn

Found while resolving #208. The link gate added in 128ae6e cannot see this, and the reason is worth stating: mkdocs.yml's nav: is YAML, not markdown, so a nav entry is not a markdown link and no gate walks it.

The measurement

$ # every nav entry ending in .md, checked against docs/
nav entries resolving:            3   (index.md, VISION.md, DESIGN_PRINCIPLES.md)
nav entries pointing at nothing: 47

Inverted in both directions. Of the 17 markdown files that do exist under docs/, 14 are absent from the nav — including architecture/overview.md, features/read-ahead.md, features/multipart-uploads.md, and s3-acceleration.md, which are among the most substantial pages in the tree.

So the navigation describes a documentation site that was never written, and omits almost all of the one that was.

Six directories exist to hold pages that don't

docs/api/.gitkeep
docs/development/.gitkeep
docs/getting-started/.gitkeep
docs/operations/.gitkeep
docs/personas/.gitkeep
docs/user-guides/.gitkeep

Each holds exactly one file, a .gitkeep. The .gitkeep is the tell: someone committed the empty structure deliberately, intending to fill it. Three of the six were link targets in the 45 dead links #208's gate found — docs/operations/monitoring.md was one I nearly linked from the Python SDK README before checking, and docs/personas/ was the target of all five links in docs/index.md's audience section.

The nav's 47 missing entries and these six directories are the same defect seen from two angles: a table of contents written before the contents.

Why this has stayed invisible

mkdocs build fails on a nav entry with no file. Nothing builds it:

  • mkdocs is not installed in the development environment
  • no workflow runs it — the only reference is a comment in .github/workflows/release.yml:40, recording that publishing docs means using mkdocs.yml from its own workflow after Pages is enabled
  • Pages is not enabled on this repository (has_pages: false)

So the file is a configuration for a build that has never run. That comment in release.yml is now load-bearing in a way it did not intend: it names mkdocs.yml as the way forward for publishing docs, and following that instruction today fails with 47 errors before producing a page.

One further defect in the nav, unrelated to the missing files:

- Contributing: //github.com/scttfrdmn/objectfs/blob/main/CONTRIBUTING.md

Missing scheme — a protocol-relative URL in a static-site nav, which resolves against file:// in a local build.

What to do

The nav should describe the tree that exists. Concretely:

  1. Delete the 47 entries with no file, and record in a comment what the sections were meant to be — the intent was real and the structure is a reasonable one, so it is worth not losing. Same treatment docs/ARCHITECTURE_EVOLUTION.md got.
  2. Add the 14 orphaned files, grouped as the tree already groups them.
  3. Remove the six .gitkeep directories, or keep exactly the ones a near-term page is planned for. An empty directory is worse than no directory here: it made three dead links look plausible to whoever wrote them.
  4. Fix the protocol-relative Contributing URL.
  5. Gate it. A nav entry is checkable — the same way docs_links_test.go checks a link, and in the same file. shipped_test.go already strictly unmarshals every YAML config in the repository, so the loader half exists. Without a gate this recurs the moment a page is renamed, and nothing here builds the site to notice.

Do not create the 47 pages to satisfy the nav. That is #208's rule and the reason TestNoDocumentedLinkPointsIntoAnExampleDirectory exists.

Verification

A test that parses mkdocs.yml's nav and asserts every .md target exists, and that every markdown file under docs/ is either in the nav or explicitly exempt with a stated reason. Both directions, because this defect ran both ways.

Activity

  1. added
    type: documentation
    priority: medium
    area: config
    on Aug 2, 2026
  2. scttfrdmn commented on Aug 3, 2026

    @scttfrdmn
    OwnerAuthor

    Done in 0b9c5a1.

    First, a correction to this issue. The "missing scheme" defect I reported on the Contributing nav entry is not real. mkdocs.yml:196 reads:

    - Contributing: https://github.com/scttfrdmn/objectfs/blob/main/CONTRIBUTING.md

    My measurement script matched //github.com/... after the https: and reported it as protocol-relative. That is an artifact of the regex, not a defect in the file. The other 47 findings stand and were verified by hand against disk.

    What landed

    The nav now lists the pages that exist, grouped as the tree groups them — Features, Operations, Architecture, and a Design Records section for the 2025 sketches that already open with divergence banners. The 47 deleted entries are recorded in a comment above the nav rather than recreated as stubs, per #208's rule. docs/README.md is exempt with its reason: it is build instructions addressed to a contributor, and mkdocs would serve it at /README/ as a page about itself.

    The six .gitkeep directories are gone.

    The gate

    TestMkDocsNavMatchesTheTree, in internal/config/docs_links_test.go — same file as the link gate, because a nav entry is a link target with a different syntax, and that syntax is the entire reason it went unchecked.

    Both directions, as the issue asked. Checking only that entries resolve would have left the 14 orphans, and that is the half a reader actually loses: a page absent from the nav is a page nobody finds.

    Four assertions, each verified to fail when broken:

    mutation result
    nav entry renamed to a nonexistent file fails on both sides — entry has no file, and the real page is now an orphan
    a page's nav entry deleted fails: docs/concurrency-patterns.md is not in the nav
    navTarget regexp broken fails: found 0 nav entries ... this test is checking nothing
    the README.md exemption removed fails: docs/README.md is not in the nav

    The first is the one worth keeping. A rename fails on both sides simultaneously, so a half-finished rename is not a state the suite permits.

    The third is the assertion I would have skipped a month ago. In the link gate it caught a real regression during development — a regexp mutation left the resolving test passing on zero links and green — so it is here too.

    One implementation note

    navTargets is a line scan, not a YAML parse. mkdocs.yml carries !!python/name: tags for the emoji and superfences extensions:

    emoji_index: !!python/name:material.extensions.emoji.twemoji

    A standard YAML decoder cannot resolve those, so unmarshalling the file needs a custom resolver or unsafe mode. This is also why docs_test.go's YAML check exempts mkdocs.yml and why the pre-commit hook runs --unsafe on it. The nav is a flat list of - Title: path.md lines and needs neither.

    Two prose pointers the link sweep missed

    Worth recording, because they are the empty directory doing exactly the damage this issue describes:

    • OBJECTFS.md:54 pointed at docs/operations/monitoring.md
    • docs/features/multipart-uploads.md:227 pointed at docs/development/testing.md

    Neither file has ever existed. Both pointers are in prose rather than in link syntax, so the link gate cannot see them — and both were written by me during the #208 sweep, days ago, while I was fixing 45 dead links. The directory existing is what made them look plausible. They now point at internal/metrics's package documentation and CONTRIBUTING.md's Testing section.

    Verification

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

    mkdocs build is still not run by anything, so the nav is checked by the test rather than by the builder. That remains true until Pages is enabled and a docs workflow exists — .github/workflows/release.yml:36-41 records what that needs. The difference is that the nav is now correct when someone gets there.

  3. added a commit that references this issue on Aug 3, 2026
    5371cc8
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: configpriority: mediumtype: documentation

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions