Skip to content

ci: enforce Clippy in the test build - #5536

Merged
kixelated merged 3 commits into
mainfrom
quest/m0/ci/clippy-test
Oct 15, 2026
Merged

kixelated merged 3 commits into
mainfrom
quest/m0/ci/clippy-test

Conversation

@kixelated

@kixelated kixelated commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • No library API or wire changes.
  • just rs test now rejects warnings; just rs lint runs the other lints.
  • One default-feature Clippy compile replaces two across Check and Test; no hosted timing claim yet.

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 check passed: 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

  • Gated the test-only capture::Synthetic device on openh264, matching the only tests that use it. The X11 capture job builds moq-video --no-default-features --features capture, where the now-denied dead-code warnings failed the build.
  • Rebased onto main (including test(clock): run the browser backend in Chromium #5525 and ci: run mandatory io_uring tests on affected PRs #5539), keeping main's net-features selection and uring action alongside this PR's lint action in sh/rs/select.sh, and both sets of dispatch query tests.
  • The earlier Test failure was moq-ffi's shutdown_delivers_the_finished_track, a known flake tracked in quest/m1/test-flakes-2/ffi-shutdown.md, unrelated to this change.

Decisions (taken unattended, recommended option):

  • Gate Synthetic with cfg(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)


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@kixelated
kixelated force-pushed the quest/m0/ci/clippy-test branch from 7ea24a0 to fc96d82 Compare October 15, 2026 00:11
@kixelated
kixelated marked this pull request as ready for review October 15, 2026 00:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T00:46:44.147214Z 900aa47 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 635a2814-bec9-436e-a53a-d6394acd1b72
📥 Commits

Reviewing files that changed from the base of the PR and between ff71917 and 900aa47.

📒 Files selected for processing: 11
  • .github/justfile
  • .github/workflows/check.yml
  • quest/m0/ci/README.md
  • quest/m0/ci/clippy-test.md
  • rs/justfile
  • rs/moq-video/src/capture/mod.rs
  • sh/dispatch-query.test.py
  • sh/dispatch.sh
  • sh/rs/select.sh
  • sh/rs/select.test.py
  • sh/rs/test-lints.test.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kixelated
kixelated force-pushed the quest/m0/ci/clippy-test branch from fc96d82 to cf8cc99 Compare October 15, 2026 00:21

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread rs/justfile
[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 "$@"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

kixelated and others added 3 commits October 14, 2026 17:42
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated force-pushed the quest/m0/ci/clippy-test branch from cf8cc99 to 900aa47 Compare October 15, 2026 00:43
@kixelated

Copy link
Copy Markdown
Collaborator Author

Iteration summary

  • CI fix: the X11 capture job builds moq-video --no-default-features --features capture, where the test-only capture::Synthetic device was dead code and the now-denied warnings failed the build. Gated it on cfg(all(test, feature = "openh264")), matching its only callers.
  • Test failure on the old head: moq-ffi's shutdown_delivers_the_finished_track flake, already tracked in quest/m1/test-flakes-2/ffi-shutdown.md; unrelated and green on the final head.
  • Rebased over test(clock): run the browser backend in Chromium #5525 and ci: run mandatory io_uring tests on affected PRs #5539. sh/rs/select.sh keeps main's net-features and uring handling alongside this PR's lint action.
  • Reviews: OpenAI review found no bugs. Codex raised one P1 (that build.warnings is ignored under nextest's JSON build); declined in-thread with evidence, since the X11 job failed precisely through that gate and sh/rs/test-lints.test.py pins it. Codex then reviewed the final head (900aa47) with no findings.
  • Final head: all checks pass.

No public API or wire impact.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 15, 2026
Merged via the queue into main with commit 65b4a9b Oct 15, 2026
14 checks passed
@kixelated
kixelated deleted the quest/m0/ci/clippy-test branch October 15, 2026 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant