Skip to content

fix(links): report wrong letter case and names Windows cannot check out - #114

Merged
drevendev merged 1 commit into
masterfrom
beautifulrepo/portable-path-names-20261023
Oct 23, 2026
Merged

drevendev merged 1 commit into
masterfrom
beautifulrepo/portable-path-names-20261023

Conversation

@drevendev

Copy link
Copy Markdown
Owner

Reader problem and change

On Windows, and on macOS's default file system, both link checkers passed links that are dead on GitHub. lstat and exists() resolve names case-insensitively and quietly accept trailing dots, stream suffixes and device names. A maintainer running the checks locally, in the Action on a Windows runner, or through the agent plugin got a green result for a link readers can't follow.

  • Exact names. The root-bounded walk compares every path component with its directory listing, cached per scan. It reports letter case differs from the name on disk (GitHub is case-sensitive) on every operating system.
  • Non-portable names. A :, a trailing dot or space, or a Windows device name (CON, PRN, AUX, NUL, COM0-9, LPT0-9, with or without an extension) is reported as a non-portable destination from its text. This joins the existing backslash and drive-letter rules.
  • tools/README.md and the changelog describe the rules.

Closes #103

Evidence

The new tests/test_portable_destinations.py fails 13 times against the old tools on Windows. The cases:

  • docs/guide.md, DOCS/Guide.md, Docs/guide.MD and docs/GUIDE.md#setup, where the file is docs/Guide.md;
  • docs/Guide.md., docs/Guide.md%20 and docs/Guide.md::$DATA;
  • a%3Ab.md, NUL, con.md, docs/COM1.txt and lpt9.

With the fix it passes. Names close to reserved ones (console.md, nullable.md, COM10.md, docs.v2) still pass. BeautifulRepo itself has no wrong-case links: 194 Markdown and 205 HTML destinations are unchanged.

Verification

  • The five local checks passed on Windows 11 with Python 3.14.7: catalog OK; docs links 194; HTML navigation 205; 280 tests OK, 7 skipped; repo audit 0 findings.
  • The case tests run on every CI platform. On Linux they show the message is now the same there too, where the old tools said "missing".
  • Accessibility and visual checks: not applicable.

Limitations

  • Names are compared as stored. A destination in one Unicode normalization form for a file stored in another, such as NFC against NFD on macOS, is reported as missing.

🤖 Generated with Claude Code

On Windows and on macOS's default file system, both link checkers accepted
destinations that are dead on GitHub, because lstat and exists() resolve names
case-insensitively and quietly accept trailing dots, stream suffixes and
device names.

- The root-bounded walk compares every component with its directory listing
  (cached per scan) and reports a name whose letter case differs from the
  entry on disk, on every operating system.
- A ':', a trailing dot or space, or a Windows device name (CON, PRN, AUX,
  NUL, COM0-9, LPT0-9, with or without an extension) is reported as a
  non-portable destination from its text, next to the existing backslash and
  drive-letter rules.

Closes #103

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@drevendev
drevendev merged commit c457c7f into master Oct 23, 2026
5 checks passed
@drevendev
drevendev deleted the beautifulrepo/portable-path-names-20261023 branch October 23, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Link checkers accept wrong-case and Windows-only path spellings that are dead on GitHub

1 participant