Skip to content

smoketest's example contract is unchecked: a new example with no success marker reports a false FAIL, and a typo in a *_EXAMPLES array silently mis-categorises #682

Closed

Description

@vyncint

Summary

scripts/smoketest.sh makes two assumptions about the examples that nothing checks, and neither is reachable without a GPU — the compile-only CI lane collapses every category into verdict_compile, so it never exercises classify() or the standard-category success marker.

Both are clean on main today. This is about the recurrence, not a live failure.

1. A standard example that prints no success marker is a false FAIL

verdict_standard requires a SUCCESS/PASS/Complete marker in the output. An example that launches kernels, verifies results against exact expectations, and then simply returns is reported as FAIL (no success marker).

This is not hypothetical — it landed two days ago. 981b9eb0 had to add a marker to disjoint_from_raw_parts on main, with this reason:

Merging #670 (new example) and #665 (stricter smoketest verdicts) in the same batch left this example failing the standard-category check: both kernels verify to exact match but nothing prints SUCCESS/PASS/Complete, and the stricter harness rightly no longer rescues such a log.

A new example is exactly where this bites, because the contract is invisible: nothing in the example's own directory says a marker is required, and the author cannot see the consequence without GPU hardware.

2. A typo in a *_EXAMPLES array silently mis-categorises

classify() walks seven arrays and falls through to standard. A misspelled or renamed entry does not fail — it matches nothing, and the example quietly gets standard's verdict rules instead of its own. For a tcgen05 or wgmma example that means the "PTX compiled on non-Hopper" path disappears and the example starts reporting FAIL on hardware it was never expected to run on.

There are 11 such arrays and 45 entries; check-error-example-status.sh reconciles only ERROR_EXAMPLES. All 45 are valid right now, so this half is purely preventive — I am flagging it because it is the same failure shape and costs nothing to check alongside (1).

Proposed fix

scripts/check-example-smoketest-contract.sh, wired into status-guard.yml as a second job. It reads sources only: no cargo, no CUDA toolkit, no LLVM, no GPU.

It checks that every *_EXAMPLES entry names a real example directory, and that every example classify() would call standard carries a non-comment line with a marker that is not itself a skip declaration.

One design note. The guard duplicates two of verdict_standard's greps, so it pins that coupling: if smoketest.sh stops grepping SUCCESS|PASS|Complete, or changes the skip pattern, the guard fails with "verdict_standard's contract changed; update this guard" rather than quietly continuing to check a contract that no longer exists. That is the same trick as #648, where two hygiene fixtures had silently decoupled from the constant they were pinned against.

Verification

CPU-only, no GPU.

# Scenario Expected Result
1 Current main pass exit 0 — "11 arrays name only real examples, and all 159 standard examples print a success marker"
2 Revert 981b9eb0's marker line fail exit 1, names disjoint_from_raw_parts — reproduces the real regression
3 Add a typo entry to WGMMA_EXAMPLES fail exit 1, names the phantom entry
4 Restore both pass exit 0
5 verdict_standard's success pattern changed fail exit 1, "update this guard"
6 Its skip pattern changed fail exit 1, same
7 *_EXAMPLES arrays removed fail exit 1 via the parse self-test
8 python3 absent from PATH fail exit 1, "refusing to report success from a check that cannot run"
9 Control: all tools present pass exit 0

The fail-closed behaviour in 5–8 follows #643, where a guard reported success for three months because rg ... || true turned a missing binary into an empty result set.

The counts the guard reports (11 arrays, 159 standard examples) match an independent scan I ran separately, which matters here: my first attempt at the marker scan used a quote-pairing regex that silently captured only 8 of generated_ldmatrix's literals and produced 11 bogus "missing marker" hits. The shipped version is line-based for that reason.

scripts/check-error-example-status.sh and both halves of check-dependency-licenses.sh still pass. Three files, no overlap with #679, #680, or #681.

Activity

  1. added a commit that references this issue on Aug 6, 2026
    b38d4ae
  2. added
    QoL-improvement
    build-related
    examples
    on Aug 7, 2026
  3. added a commit that references this issue on Aug 7, 2026
    cf4f4e1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    QoL-improvementbuild-relatedexamples

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions