Skip to content

build: docs path check passes locally but fails on a clean checkout #725

Open

Description

@bpowers

scripts/check-docs.py can still pass on a developer machine and fail on a clean CI checkout, because it decides whether a referenced path exists by looking at the working tree.
Backtick paths into build-output directories and git-ignored backtick paths are already handled (#1024).

Three cases remain:

  1. A markdown link target to a git-ignored build output passes locally and fails in CI; links get neither the build-directory skip nor the git-ignored allowance.
  2. A reference to an untracked, un-ignored file passes locally and fails in CI.
  3. A /-prefixed backtick path to an ignored file outside the build directories passes where it was built and fails on a clean checkout: is_git_ignored joins each base with an absolute path and never checks it.

None has caused a failure yet, and check-docs.py has no tests.

Fix

Resolve every reference, links and backtick paths alike, against what a clean checkout has: files in git ls-files plus paths git check-ignore accepts.
That one check covers all three cases.

Pointers

  • scripts/check-docs.py: resolve_path, is_git_ignored, check_file

Activity

  1. added
    ci
    docs
    on Jun 8, 2026
  2. bpowers commented on Jul 11, 2026

    @bpowers
    OwnerAuthor

    This structural bug is recurring at current HEAD: src/diagram/CLAUDE.md references generated lib/ (line 12). src/diagram/lib exists and is ignored locally, so python3 scripts/check-docs.py passes; git ls-files src/diagram/lib is empty, so the same reference is absent in a clean checkout. This is another concrete release-gate instance of the filesystem-vs-git-state mismatch described here.

  3. changed the title [-]check-docs.py validates path references against the filesystem, so local pre-commit and clean-checkout CI disagree[/-] [+]build: docs path check passes locally but fails on a clean checkout[/+] on Oct 12, 2026
  4. added
    hygiene
    on Oct 12, 2026
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

    cidocshygiene

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions