Skip to content

ci: four workspace members carry 107 tests that no CI job runs - #971

Merged
nihalpasham merged 1 commit into
NVIDIA:mainfrom
vyncint:ci/test-the-untested-crates
Aug 18, 2026
Merged

nihalpasham merged 1 commit into
NVIDIA:mainfrom
vyncint:ci/test-the-untested-crates

Conversation

@vyncint

@vyncint vyncint commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

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:

Crate Tests What
dialect-ptx 43 structured terminal PTX dialect (#917)
ptx-parse 35 lossless CST over PTX source (#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. dialect-ptx and ptx-parse arrived with #914–#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.

Why no needs_cuda

None of the four touches cuda-bindings. Their full 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 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.

Testing

Local, pinned toolchain, no GPU.

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 green-on-nothing into green-on-107 without changing a test.

  • just test passes end to end on the merged tree with the four added
  • By script: the CI matrix and the Justfile package lists are now identical, and every workspace member is either in the matrix or named in the exclusion comment — none silently uncovered
  • unit-tests.yml still parses (25 matrix entries)
  • cargo oxide run <example> — not applicable, no code path changes

`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]>
@nihalpasham nihalpasham added build-related Build scripts, toolchain discovery, or compilation setup QoL-improvement Quality-of-life improvement; not a correctness fix labels Aug 18, 2026
@nihalpasham

Copy link
Copy Markdown
Collaborator
  • Confirmed the four members (dialect-iket, iket-lower, ptx-parse, dialect-ptx) carry tests no current workflow runs, and the new matrix rows list them the same way as existing members.
  • Approved the workflow run; for a CI-only diff that run is the whole verification.
  • Follow-up worth filing: a check-crate-inventory-style guard asserting every workspace member is either in the unit-tests matrix or named in the exclusion comment.

@nihalpasham
nihalpasham merged commit e257e1c into NVIDIA:main Aug 18, 2026
48 checks passed
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-related Build scripts, toolchain discovery, or compilation setup QoL-improvement Quality-of-life improvement; not a correctness fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants