Repository navigation
ci: four workspace members carry 107 tests that no CI job runs - #971
Merged
Merged
Conversation
`unit-tests.yml`'s matrix covers 21 of the 27 workspace members. Its own
comment block names the intended exclusions:
# Crates intentionally not in this matrix:
# * `cuda-bindings` — generated sys bindings covered transitively.
# * `fuzzer` — differential-testing infra with no unit tests.
# * `rustc-codegen-cuda` — its own [workspace] ...
Four members are in neither list. They are not declared out; they were left
out, and between them they hold 107 `#[test]` functions that nothing executes:
dialect-ptx 43 structured terminal PTX dialect (NVIDIA#917)
ptx-parse 35 lossless CST over PTX source (NVIDIA#917)
iket-lower 22 dialect-iket -> runtime compatibility profile
dialect-iket 7 in-kernel event tracing dialect
`dialect-iket` and `iket-lower` have been uncovered for a long time -- they are
the same two crates whose absence from README.md motivated
`check-crate-inventory.sh` ("1,700 lines of compiler across two crates, with no
row between them"). `dialect-ptx` and `ptx-parse` arrived with NVIDIA#914-NVIDIA#917 last
batch. The PTX pair is the one that stings: `dialect-ptx` verifies native CFG
invariants, which is precisely the sort of property a unit test is the only
cheap way to hold, and 43 of them have never gated a merge.
None of the four touches `cuda-bindings`, so none needs the toolkit: their
dependency sets are `pliron`, `pliron-derive`, `thiserror`, `combine`,
`dyn-clone`, `linkme`, and `ptx-parse` has no dependencies at all. They go in
the plain matrix with the default `--all-targets` and no `needs_cuda`, and add
about a second of runtime between them.
The exclusion comment now also says what the list is *for* -- that a member
absent from both the matrix and the list is an omission rather than a decision
-- since the list reading as complete is what made this invisible.
`just test` gets the same four, because its own comment is the contract:
"Mirrors .github/workflows/unit-tests.yml; keep the two in step." `test-cuda`
is unchanged; nothing here links the driver.
Verified locally with the pinned toolchain:
dialect-iket 7 passed; 0 failed
iket-lower 22 passed; 0 failed
ptx-parse 35 passed; 0 failed
dialect-ptx 43 passed; 0 failed
so this turns CI green-on-nothing into green-on-107 without changing a test.
Also checked by script: the CI matrix and the Justfile's package lists are now
identical, and every workspace member is either in the matrix or named in the
exclusion comment -- no member is silently uncovered. `unit-tests.yml` still
parses, with 25 matrix entries.
Signed-off-by: Vyncint Ng <[email protected]>
Collaborator
|
nihalpasham
approved these changes
Aug 18, 2026
2 of 3 tasks
nihalpasham
pushed a commit
that referenced
this pull request
Aug 19, 2026
…998) The follow-up named in the #971 merge note. `unit-tests.yml`'s matrix decides which crates get `cargo test`, and a member missing from it fails nothing -- the workflow is green, `just check` is green, and the tests never ran. #971 found four crates in exactly that state holding 107 `#[test]` functions between them, two of them uncovered for months. The workflow already carried the intent as a comment: # Crates intentionally not in this matrix: # * `cuda-bindings` - generated sys bindings covered transitively. # * `fuzzer` - differential-testing infra with no unit tests. # * `rustc-codegen-cuda` - its own [workspace] ... That list reading as complete is precisely what hid the four. This guard makes it complete: every member must be in the matrix or named in that comment, and a crate in neither fails the run. Excluding one stays a one-line reviewable act with a written reason -- the guesswork goes, the choice stays. Four assertions, each with a distinct failure this has already had: 1. **Member in neither the matrix nor the exclusion list.** The #971 case. 2. **Exclusion list names a non-member.** A renamed or deleted crate left behind there is a permanent hole. `rustc-codegen-cuda` is the one accepted non-member, since its own `[workspace]` keeps it out by design. 3. **Matrix names a non-member**, which would make the job run `cargo test -p` on a name cargo cannot resolve. 4. **The Justfile mirrors the matrix**, which its own comment already promises ("Mirrors .github/workflows/unit-tests.yml; keep the two in step") and nothing enforced. Parse self-tests on all three inputs, in this script's house style: the member list, the matrix entry shape, the exclusion comment, and the Justfile `-p` spelling each fail loudly rather than yielding an empty set that would pass vacuously. One thing the guard caught in its own first run, worth keeping: a naive `-p ([a-z0-9-]+)` reads `ldconfig -p 2>/dev/null` in `test-cuda` as a package named `2`. The pattern requires a leading letter, and the comment says why. Verified by mutation, each against an otherwise clean tree: drop `dialect-ptx` from the matrix -> exit 1, names it drop it and declare it excluded, Justfile untouched -> exit 1, mirror broken drop it, declare it, and drop it from the Justfile -> OK (the real flow) exclusion list names `ghost-crate` -> exit 1, names it Justfile drops a package the matrix keeps -> exit 1, both directions reword the exclusion heading -> self-test fires rename `- package:` to `- pkg:` -> self-test fires clean tree -> OK, 27 = 25 + 3 declared Wired into `status-guard.yml` as a new job and into the Justfile's `check-guards`, whose docstring lists the status-guard jobs and now names this one -- the drift that recipe exists to prevent. Signed-off-by: Vyncint Ng <[email protected]>
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
unit-tests.yml's matrix covers 21 of the 27 workspace members. Its own comment block names the intended exclusions:Four members are in neither list. They are not declared out; they were left out, and between them they hold 107
#[test]functions that nothing executes:dialect-ptxptx-parseiket-lowerdialect-iket→ runtime compatibility profiledialect-iketdialect-iketandiket-lowerhave been uncovered for a long time — they are the same two crates whose absence from README.md motivatedcheck-crate-inventory.sh.dialect-ptxandptx-parsearrived with #914–#917 last batch. The PTX pair is the one that stings:dialect-ptxverifies native CFG invariants, which is precisely the sort of property a unit test is the only cheap way to hold, and 43 of them have never gated a merge.Why no
needs_cudaNone of the four touches
cuda-bindings. Their full dependency sets arepliron,pliron-derive,thiserror,combine,dyn-clone,linkme— andptx-parsehas no dependencies at all. They go in the plain matrix with the default--all-targets, and add about a second of runtime between them.The exclusion comment now also says what the list is for — that a member absent from both the matrix and the list is an omission rather than a decision — since the list reading as complete is what made this invisible.
just testgets the same four, because its own comment is the contract: "Mirrors .github/workflows/unit-tests.yml; keep the two in step."test-cudais unchanged; nothing here links the driver.Testing
Local, pinned toolchain, no GPU.
So this turns green-on-nothing into green-on-107 without changing a test.
just testpasses end to end on the merged tree with the four addedunit-tests.ymlstill parses (25 matrix entries)cargo oxide run <example>— not applicable, no code path changes