Repository navigation
Description
Filing the check you invited in the #1197 review ("if you still want to file that broken-path-check issue you offered, go for it").
The rot
#1190 split several large files into module directories. Three places in the tree kept pointing at paths that no longer existed, and following any of them landed nowhere. #1197 fixed those three; the commit you stacked on it fixed 14 more in the crate-relative and bare-basename spellings.
Nothing catches this. A path in prose is not compiled, check-host-api-paths.sh checks Rust API paths rather than files, and the book gate only builds. The reference simply goes quiet, which is the bad direction — a reader follows it and finds nothing, and the tree carries no signal.
Proposed scope, deliberately narrow
A path claim is only unambiguous when it is anchored at a repo root, so the check covers exactly that: crates/, cuda-oxide-book/, scripts/ and docs/, with a file extension, appearing in prose — any line of a tracked .md, and /// or //! lines in a tracked .rs.
Measured on 26754ae5: 72 such paths, 0 broken. So it is green today and costs nothing to adopt.
The historical control is the part that makes it worth having. Run against 6f5f538a^, the commit before #1197 landed, it reports exactly the three references that PR was filed for:
crates/cuda-oxide-codegen/tests/spine_kernel_ptx.rs:21: crates/mir-lower/src/convert/types.rs
crates/rustc-codegen-cuda/examples/ref_index_projections/README.md:133: crates/mir-importer/src/translator/rvalue.rs
crates/rustc-codegen-cuda/examples/subslice_projection/README.md:10: crates/mir-importer/src/translator/rvalue.rs
What is deliberately left out, and why
Three things, each because including them is where this kind of guard goes soft:
- Code, not prose. Restricting to markdown and doc comments is what removes the need for an allowlist. The four non-existent paths that live in Rust code are all deliberate — synthetic fixture names (
intrinsics/probes/removed.ll,intrinsics/overlay/test.toml) and two paths thatcuda-intrinsics-genrender tests assert are absent — and so is themktempcanary incheck-reserved-prefixes.sh. None of them is prose, so none of them needs an exemption entry. intrinsics/as a root. It is both a real top-level directory and a common crate-relative fragment.examples/atomics/README.mdnamesintrinsics/atomic.rsin a pipeline diagram, meaningmir-importer/src/translator/terminator/intrinsics/atomic.rs, which resolves fine as shorthand. Treatingintrinsics/as a root turns that correct line into a false positive, so it is not a root.- The crate-relative and bare-basename spellings, which is the real coverage gap and worth stating plainly: your docs: repoint the three source references the module split invalidated #1197 commit fixed 14 references in those forms and this check would not have found them. Disambiguating
rvalue.rsfrom prose is guesswork, and a guard that guesses is worse than one that is narrow. Full-path is how a new reference is normally written, so this covers the common case precisely rather than the whole case vaguely.
I have this working and will open a PR, with the two controls above plus a mktemp canary in the same shape as check-spdx-headers.sh.
Activity
nihalpasham commentedon Sep 15, 2026
Reviewed #1250: partial; the source/output distinction needs revision.
Keeping this issue open.
nihalpasham commentedon Sep 18, 2026
I rechecked #1250. Missing parents and untracked files now receive the tracked-path check, and I added a regression for compact Markdown references such as
[source]:crates/pkg/lib.rs.The scanner controls and historical broken-path example pass locally. Hosted CI also passes on this head.
This remains partial: the guard covers
crates/,cuda-oxide-book/andscripts/; the requesteddocs/root is still outside its coverage.fix(ci): check source references under docs (NVIDIA#1611)