Repository navigation
feat(rust): accept rustup chains, deny-warnings flags and whole-workspace cargo test as CI evidence - #252
Closed
FredApps wants to merge 2 commits into
Closed
feat(rust): accept rustup chains, deny-warnings flags and whole-workspace cargo test as CI evidence#252FredApps wants to merge 2 commits into
FredApps wants to merge 2 commits into
Conversation
Part of DiffCI#131 (CI invocation evidence). On top of the toolchain and cache actions already accepted: - rustup commands chained with && (rustup default stable && rustup update), with toolchain arguments from a matrix whose values are plain words in the matrix and every include entry; - RUSTFLAGS / RUSTDOCFLAGS set only to -Dwarnings (or -D warnings), and CARGO_TERM_VERBOSE; - cargo test --workspace / --all, only when Cargo's default members are every workspace member, so it runs exactly what plain cargo test runs. The adapter reports that as rustAllMembersTested. Every other flag, chained non-rustup command, expression or environment stays advisory. Signed-off-by: FredApps <[email protected]>
Signed-off-by: FredApps <[email protected]>
FredApps
marked this pull request as ready for review
November 17, 2026 17:33
This was referenced Nov 17, 2026
Merged
Member
|
#258 is merged (it brought in #232, #248, #250 and #254), along with #228-#231 and #233, so this branch now conflicts with Could you merge |
adityankale190895
pushed a commit
that referenced
this pull request
Nov 18, 2026
…pace cargo test as CI evidence (#252) rustup steps chained with && (toolchain names from a matrix of plain words), RUSTFLAGS/RUSTDOCFLAGS set only to -Dwarnings, and cargo test --workspace/--all when plain cargo test already tests every member now count as ordinary Rust CI. Anything else stays advisory. Signed-off-by: FredApps <[email protected]>
Member
|
Merged to main as 1734480 (squashed, authorship kept). The conflicts in |
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.
Part of #131 (CI invocation evidence). It stays inside the Rust adapter's
rust-invocation.ts, plus one line ingraph.tsthat passes the new option;src/ci-inferenceis untouched.Real Rust workflows often failed to count as plain
cargo testevidence for small, harmless reasons. This PR accepts four more shapes and still refuses everything else:rustup … && rustup …setup steps. Only rustup subcommands are allowed in the chain, so it can't hide a test run. A${{ matrix.X }}argument is allowed only when every value ofX, in the matrix and in eachincludeentry, is a plain toolchain-like word.RUSTFLAGS/RUSTDOCFLAGSset to only-Dwarnings(or-D warnings,--deny warnings). Any other flag (cfg, codegen, target features, sanitizers) still makes the evidence advisory.Why this is safe:
-Dwarningsonly turns warnings into errors. It doesn't change what is compiled, which features are on, or which tests run, and it applies the same way to the selected and the full command. A changed crate and every crate that depends on it are always selected, so a warning the change causes (say, a new deprecation used downstream) fails the selected run too. A warning in an unselected crate isn't caused by the change, so it would already fail the full baseline onmain.CARGO_TERM_VERBOSEis treated as output-only, likeCARGO_TERM_COLOR.cargo test --workspace/--allcounts only when plaincargo testalready tests every member: a single crate, or a workspace whose default members are all members. The adapter setsrustAllMembersTestedfrom Cargo metadata.Tests: integration cases for each accepted shape and for the near misses that must stay advisory (other flags, matrix values that aren't plain words, unknown matrix keys,
;or$(…)in the chain, acargo testwith flags inside the chain, and--workspacewithoutallMembersTested). One docs sentence is added.Note: the branch has a follow-up commit that removes a
node_modulessymlink I committed by mistake in the first commit; the final tree doesn't have it.Local checks on this head: typecheck,
npm testwithDIFFCI_REQUIRE_CARGO=1(1168 pass), build,audit:boundary. Hosted CI passed on this head.Merge order (#131 series: #232, #234, #248, #250, #252, #254, #256, #277, #258). These all edit the one-line Rust paragraph in
docs/using-diffci.md, and some also touchrust.ts/types.ts, so they conflict textually with each other. #258 already includes #232, #248, #250 and #254 with those conflicts resolved. The simplest path: merge #258 (GitHub marks those four as merged), then #234, #252, #256 and #277. After each one lands I mergemaininto the next and resolve the docs line. Merging them one at a time in number order works too, with the samemainmerge after each.