Repository navigation
ci: guard the book's Crate Map with the inventory check, not just README's - #997
Merged
Merged
Conversation
…DME's The follow-up named in the NVIDIA#970 merge note. `architecture-overview.md`'s Crate Map claims completeness outright -- "cuda-oxide is split into focused crates. Here is every one and its role" -- and listed 15 of 28 when NVIDIA#970 found it. Eleven of the thirteen absentees were ordinary omissions; two were `dialect-iket` and `iket-lower`, the exact pair whose absence from README.md is the reason this guard exists at all ("1,700 lines of compiler across two crates, with no row between them"). The guard could not see the second table because it only ever read README.md. One guard, two inventories now. The member list is parsed once and checked against both, so a new crate cannot be absent from either without CI failing. Design kept deliberately identical to the existing half: * **Missing-only, both tables.** A member with no row fails; a row with no member does not. That is the direction the guard was designed around (`rustc-codegen-cuda` is deliberately listed in both and is not a workspace member), and it cannot false-positive on a future legitimate addition. * **Per-table parse self-tests.** Each section must be found by heading and must yield at least 20 rows, so a renamed heading or a reflowed table fails loudly instead of passing vacuously -- the failure mode this script's own header warns about. * **The remedy text differs per table**, because the fix does: README rows go in one of three grouped tables, while the book's role text should be copied from README's so the two inventories stay word-for-word identical (which is how NVIDIA#970 wrote them). Verified by mutation, each case run against an otherwise clean tree: drop `dialect-iket` from the book's Crate Map -> exit 1, names the crate drop `iket-lower` from README's Crate Overview -> exit 1, unchanged behaviour drop one from each at once -> exit 1, reports both tables rename `## Crate Map` to `## Crates` -> self-test fires, exit 1 gut the book table's rows -> self-test fires, exit 1 clean tree -> OK, all 27 members in both No wiring needed: `check-crate-inventory.sh` is already in status-guard.yml and in the Justfile's `check-guards`, so extending the script extends both. Signed-off-by: Vyncint Ng <[email protected]>
Collaborator
|
nihalpasham
approved these changes
Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The follow-up named in the #970 merge note.
architecture-overview.md's Crate Map claims completeness outright — "cuda-oxide is split into focused crates. Here is every one and its role" — and listed 15 of 28 when #970 found it. Eleven of the thirteen absentees were ordinary omissions; two weredialect-iketandiket-lower, the exact pair whose absence from README.md is the reason this guard exists at all ("1,700 lines of compiler across two crates, with no row between them"). The guard could not see the second table because it only ever read README.md.One guard, two inventories now. The member list is parsed once and checked against both, so a new crate cannot be absent from either without CI failing.
Design kept identical to the existing half
rustc-codegen-cudais deliberately listed in both and is not a workspace member), and it cannot false-positive on a future legitimate addition.Testing
Local, no GPU — reads three text files, no cargo. Each mutation against an otherwise clean tree:
dialect-iketfrom the book's Crate Mapiket-lowerfrom README's Crate Overview## Crate Map→## Cratescheck-crate-inventory.shis already instatus-guard.ymland in the Justfile'scheck-guards, so extending the script extends bothcargo oxide run <example>— not applicable, CI script only