Skip to content

ci(rust): make clippy actually run and use it as the single compile gate - #2383

Merged
DeliciousBuding merged 1 commit into
masterfrom
ci/rust-gate-single-pass
Oct 19, 2026
Merged

DeliciousBuding merged 1 commit into
masterfrom
ci/rust-gate-single-pass

Conversation

@DeliciousBuding

@DeliciousBuding DeliciousBuding commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

vuln-scan-rust compiled the desktop crate twice: cargo check --all-targets (blocking) and then cargo clippy --all-targets (advisory, continue-on-error). Both run the same type-check.

While checking that, CI showed the advisory one never actually linted:

error: 'cargo-clippy' is not installed for the toolchain '1.96.0-x86_64-unknown-linux-gnu'.
help: run `rustup component add clippy` to install it

dtolnay/rust-toolchain@1.96.0 installs without the clippy component, and continue-on-error swallowed the failure. So the job paid for a second compile pass that could not have produced a lint result.

What changed

  • dtolnay/rust-toolchain now installs components: clippy, so clippy actually runs.
  • Drop the separate cargo check step. cargo clippy becomes the compile gate, and it keeps the exact property the old pair had: compile errors fail the job, lint warnings do not. No -D warnings is configured in the crate (no [lints], no RUSTFLAGS), so clippy's exit code is driven by compilation only — which is why continue-on-error was there in the first place.
  • Add swatinem/rust-cache@v2 (workspaces: app/desktop/src-tauri -> target), the same cache already used by desktop-linux-build and both release jobs. Without it, every desktop-changed PR recompiles the whole dependency tree.

Verified locally (cargo 1.96.0, the version CI pins)

  • cargo clippy --all-targets on app/desktop/src-tauri: exits 0, 29 warnings, Finished ... in 1m 44s. Warnings stay advisory, and clippy now surfaces them instead of dying on a missing component.
  • Same command with a deliberate compile_error! probe in src/lib.rs: exits 101, could not compile agenthub-desktop ... due to 1 previous error. So the compile gate is still blocking. Probe reverted; git status shows only the workflow file.
  • actionlint -shellcheck= 1.7.12 (the validate job's pinned version): exit 0.
  • verify-ci-invariants.py and verify-doc-ssot.py pass.

Net: one fewer full compile pass per Rust-touching PR, dependency caching across runs, and a lint step that actually produces a verdict.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: TokenDanceLab/AgentHub/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 090870ac-5f1d-4ea0-b964-dd71505004d8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • 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.

@DeliciousBuding
DeliciousBuding force-pushed the ci/rust-gate-single-pass branch from 15ffc7d to 2b374c4 Compare October 19, 2026 12:55
@DeliciousBuding DeliciousBuding changed the title ci(rust): run the desktop compile gate once instead of twice ci(rust): make clippy actually run and use it as the single compile gate Oct 19, 2026
Co-authored-by: Codex <codex@delicious233.com>
@DeliciousBuding
DeliciousBuding force-pushed the ci/rust-gate-single-pass branch from 2b374c4 to bc68af7 Compare October 19, 2026 13:10
@DeliciousBuding
DeliciousBuding merged commit 132ce31 into master Oct 19, 2026
43 checks passed
@DeliciousBuding
DeliciousBuding deleted the ci/rust-gate-single-pass branch October 19, 2026 13:16
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