Repository navigation
ci: enforce Clippy in the test build - #5536
Conversation
7ea24a0 to
fc96d82
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 13 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit fc96d82.
No actionable bugs found. Enforcing Clippy in the existing test compile is a proportionate simplification: selected packages and --all-targets coverage remain aligned, capture is checked through capture-test → test, and the distinct networking, media, wasm and io_uring gates remain in Check. The Synthetic cfg now matches its openh264-gated callers. The failing-warning/clean-build regression is useful coverage for the new gate.
Verification: static inspection of the changes and surrounding workflow, selector and recipe paths. I did not run builds or tests, or independently verify a hosted timing improvement; this review does not assert a passing suite.
fc96d82 to
cf8cc99
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cf8cc99cc6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| [positional-arguments] | ||
| test *args: | ||
| RUSTC_WORKSPACE_WRAPPER="$(command -v clippy-driver || true)" bash sh/rs/nextest.sh cargo nextest run --locked --all-targets "$@" | ||
| CARGO_BUILD_WARNINGS=deny RUSTC_WORKSPACE_WRAPPER={{ require("clippy-driver") }} bash sh/rs/nextest.sh cargo nextest run --locked --all-targets "$@" |
There was a problem hiding this comment.
Restore a warning gate that works with nextest JSON
cargo nextest builds tests using cargo test --no-run --message-format json-render-diagnostics, but Cargo 1.98 does not honor build.warnings="deny" when processing JSON diagnostics, so Clippy warnings leave Cargo with exit code 0 and nextest proceeds. Because ci-check now omits the separate default-feature cargo clippy ... -D warnings pass, such warnings can merge despite the intended gate. Keep an explicit denial mechanism that Clippy itself enforces until Cargo's JSON warning-accounting bug is fixed. See nextest's documented Cargo invocation and Cargo's open build.warnings JSON bug.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Declining: the gate does fire through nextest's JSON build on Cargo 1.98. The X11 capture job on the previous head failed exactly this way: cargo test --no-run --message-format json-render-diagnostics --package moq-video ... reported "moq-video (lib test) generated 2 warnings" then "warnings are denied by build.warnings configuration" and exited 101 (log). sh/rs/test-lints.test.py also pins it: it runs just rs test (nextest) on a crate with a clippy::len_zero finding and asserts a nonzero exit, then a clean build passes. It passes locally and runs in CI via .github/justfile, so a Cargo regression here would fail loudly.
(Written by Claude Opus 5.5)
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cf8cc99 to
900aa47
Compare
Iteration summary
No public API or wire impact. (Written by Claude Opus 5.5) |
Problem
Check repeats the default-feature Clippy compile while Test reports the same lints only as warnings.
Approach
Deny warnings in Test's existing clippy-driver build and route Check to the remaining lints, docs, and distinct feature/target builds. Keep all-target coverage, including benches and examples. Regression tests prove a Clippy warning fails the test build and that CI selection preserves the other checks; they run nightly.
Impact
just rs testnow rejects warnings;just rs lintruns the other lints.Alternatives
A separate Clippy pass keeps the repeated compile. RUSTFLAGS would change Cargo fingerprints; build.warnings enforces the gate without that cost.
Validation
Full
just checkpassed: 7,414 default Rust tests, capture/playback/minimal/VPX suites, JS checks/tests, and 80 Python tests. Local tests ran serially to fit the host's shared 8 MiB locked-memory budget; the initial four io_uring allocation failures all passed under that setting. Focused dispatch, selector, Clippy-warning/clean-build, workflow, and quest checks passed again after rebasing onto main.Iteration
capture::Syntheticdevice onopenh264, matching the only tests that use it. The X11 capture job buildsmoq-video --no-default-features --features capture, where the now-denied dead-code warnings failed the build.net-featuresselection anduringaction alongside this PR'slintaction insh/rs/select.sh, and both sets of dispatch query tests.moq-ffi'sshutdown_delivers_the_finished_track, a known flake tracked inquest/m1/test-flakes-2/ffi-shutdown.md, unrelated to this change.Decisions (taken unattended, recommended option):
Syntheticwithcfg(all(test, feature = "openh264"))✅, rather than#[allow(dead_code)]or moving the tests off openh264.Follow-ups
#5531 changes test target selection and should rebase after this PR to retain the shared Clippy gate while moving benchmark/example coverage to Nightly.
(Written by GPT-6, iterated by Claude Opus 5.5)
Need help on this PR? Tag
@codesmith-botwith what you need.