Repository navigation
fix(ptx-schedule): the marker predicates fold case only if the caller does - #1134
Merged
nihalpasham merged 2 commits intoAug 23, 2026
Merged
Conversation
… does
`has_skip_marker` and `has_mismatch_marker` implement a case-blind contract --
the smoketest greps the same markers with `grep -i` -- but neither folded case.
They worked because their one caller lowercased first:
let combined = format!("{stdout}\n{stderr}").to_ascii_lowercase();
That is a precondition living at a call site, in a crate whose one job is
classifying process output. NVIDIA#1112's review named it as a residual. Called with
a raw stream, both predicates silently disagree with their own names:
has_skip_marker("Skipping: needs sm_90") -> false
has_skip_marker("PASS (skipped): requires sm_75+") -> false
has_mismatch_marker("MISMATCH at index 3") -> false
Every one of those spellings is real. `Skipping:` and `PASS (skipped):` are
what examples print -- `generated_ldmatrix` prints the second verbatim -- and
`MISMATCH` in capitals is the conventional spelling for the finding, the one
`crates/fuzzer` uses in its own status vocabulary. A caller that reached for
these predicates without knowing the rule would classify a declined run as a
pass and a failed comparison as a pass, which is the exact misclassification
NVIDIA#1112 fixed.
Fold case in the predicates instead of documenting the precondition:
`has_skip_marker` compares the line's leading bytes with
`eq_ignore_ascii_case`, and `has_mismatch_marker` lowercases once inside
itself. `run_binary` then passes the raw combined stream, so the precondition
is gone rather than moved -- and the one allocation moves from the call site
into the predicate that needs it. Behaviour on the existing path is unchanged:
the input was already lowercase there.
One test over the spellings that matter, in both directions: five mixed-case
skip declines and five mixed-case failure markers must match, and folding case
must not widen what counts as a marker -- a bare `pass`/`PASS`,
`pass: 1024 elements verified`, `SUCCESS`, a mid-line `no skipping: here`, and
`all checks passed` all stay negative. It fails with the folding reverted.
Verified: 15 tests pass, fmt clean, `clippy --all-targets -- -D warnings`
clean, `cargo doc --document-private-items` clean.
Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com>
This was referenced Aug 22, 2026
Fold marker case at the predicates and classify timeout, process failure, and mismatch before accepting a graceful skip. Signed-off-by: nihalp <nihalp@nvidia.com>
Collaborator
|
nihalpasham
approved these changes
Aug 23, 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.
Follow-up to #1112, whose review named this residual: "
has_skip_marker's case-insensitivity relies on callers pre-lowercasing."What is wrong
has_skip_markerandhas_mismatch_markerimplement a case-blind contract — the smoketest greps the same markers withgrep -i— but neither folded case. They worked because their one caller lowercased first:That is a precondition living at a call site, in a crate whose one job is classifying process output. Called with a raw stream, both predicates silently disagree with their own names — measured on this tree:
Every one of those spellings is real.
Skipping:andPASS (skipped):are what examples print —generated_ldmatrixprints the second verbatim — andMISMATCHin capitals is the conventional spelling for the finding, the onecrates/fuzzeruses in its own status vocabulary. A caller reaching for these predicates without knowing the rule would classify a declined run as a pass and a failed comparison as a pass: the exact misclassification #1112 fixed.The change
Fold case in the predicates instead of documenting the precondition.
has_skip_markercompares the line's leading bytes witheq_ignore_ascii_case;has_mismatch_markerlowercases once inside itself.run_binarythen passes the raw combined stream, so the precondition is gone rather than moved — and the one allocation moves from the call site into the predicate that needs it. Behaviour on the existing path is unchanged: the input was already lowercase there.Verification
One test over the spellings that matter, both directions: five mixed-case skip declines and five mixed-case failure markers must match, and folding case must not widen what counts as a marker — a bare
pass/PASS,pass: 1024 elements verified,SUCCESS, a mid-lineno skipping: here, andall checks passedall stay negative. It fails with the folding reverted.15 tests pass, fmt clean,
clippy --all-targets -- -D warningsclean,cargo doc --document-private-itemsclean.One file. No open PR touches it.
Maintainer repair
timeout -> nonzero exit -> mismatch -> skip -> pass.