diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d813b01c..fff8499d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,6 +7,14 @@ updates: open-pull-requests-limit: 10 labels: - dependencies + # BRO-2814: one grouped PR for routine bumps instead of ten separate + # ones hitting the same CI gates in parallel. Major bumps (API breaks) + # stay ungrouped so they still get individual review. + groups: + cargo-patch-and-minor: + update-types: + - minor + - patch - package-ecosystem: github-actions directory: / schedule: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e23265ab..83e69410 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,11 @@ on: - "docs/**" - "research/**" workflow_dispatch: + # BRO-2814/BRO-2806: main's latest CI run must be under 7 days old even + # with no pushes — toolchain drift (e.g. `stable` floating to a new + # rustc/clippy) otherwise surfaces only when someone happens to push. + schedule: + - cron: "0 6 * * 1" concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -40,8 +45,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@master with: + toolchain: "1.99.0" components: rustfmt - run: cargo fmt --all -- --check @@ -53,8 +59,9 @@ jobs: - uses: actions/checkout@v7 - name: Install protoc run: sudo apt-get update && sudo apt-get install -y protobuf-compiler - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@master with: + toolchain: "1.99.0" components: clippy - uses: Swatinem/rust-cache@v2 - run: cargo clippy --workspace -- -D warnings -A clippy::too_many_arguments @@ -92,7 +99,9 @@ jobs: df -h / - name: Install protoc run: sudo apt-get update && sudo apt-get install -y protobuf-compiler - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@master + with: + toolchain: "1.99.0" - uses: Swatinem/rust-cache@v2 with: prefix-key: v1-rust @@ -121,7 +130,9 @@ jobs: - uses: actions/checkout@v7 - name: Install protoc run: brew install protobuf - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@master + with: + toolchain: "1.99.0" - uses: Swatinem/rust-cache@v2 - run: cargo test --workspace @@ -157,7 +168,9 @@ jobs: continue-on-error: true steps: - uses: actions/checkout@v7 - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@master + with: + toolchain: "1.99.0" - uses: Swatinem/rust-cache@v2 - run: cargo install cargo-deny --locked - run: cargo deny check @@ -170,7 +183,9 @@ jobs: - uses: actions/checkout@v7 - name: Install protoc run: sudo apt-get update && sudo apt-get install -y protobuf-compiler - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@master + with: + toolchain: "1.99.0" - uses: Swatinem/rust-cache@v2 - name: Run scripts/verify_dependencies_lifed.sh run: bash scripts/verify_dependencies_lifed.sh @@ -183,7 +198,9 @@ jobs: - uses: actions/checkout@v7 - name: Install protoc run: sudo apt-get update && sudo apt-get install -y protobuf-compiler - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@master + with: + toolchain: "1.99.0" - uses: Swatinem/rust-cache@v2 - name: Run scripts/verify_dependencies_lifegw.sh run: bash scripts/verify_dependencies_lifegw.sh @@ -196,7 +213,9 @@ jobs: - uses: actions/checkout@v7 - name: Install protoc run: sudo apt-get update && sudo apt-get install -y protobuf-compiler - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@master + with: + toolchain: "1.99.0" - uses: Swatinem/rust-cache@v2 - name: Run scripts/verify_dependencies_lifegw_anthropic_codec.sh run: bash scripts/verify_dependencies_lifegw_anthropic_codec.sh @@ -217,7 +236,9 @@ jobs: - uses: actions/checkout@v7 - name: Install protoc run: sudo apt-get update && sudo apt-get install -y protobuf-compiler - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@master + with: + toolchain: "1.99.0" - uses: Swatinem/rust-cache@v2 - name: Self-test (regression guard for FAIL-path detection) run: bash scripts/verify_dependencies_ergon.sh --self-test @@ -246,8 +267,9 @@ jobs: - uses: actions/checkout@v7 - name: Install protoc run: sudo apt-get update && sudo apt-get install -y protobuf-compiler - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@master with: + toolchain: "1.99.0" components: rustfmt, clippy - uses: Swatinem/rust-cache@v2 - name: Format check (ergon) @@ -346,7 +368,9 @@ jobs: - uses: actions/checkout@v7 - name: Install protoc run: sudo apt-get update && sudo apt-get install -y protobuf-compiler - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@master + with: + toolchain: "1.99.0" - uses: oven-sh/setup-bun@v2 with: bun-version: latest diff --git a/.github/workflows/harness.yml b/.github/workflows/harness.yml index cc356bfb..fb1dd0f0 100644 --- a/.github/workflows/harness.yml +++ b/.github/workflows/harness.yml @@ -64,8 +64,9 @@ jobs: df -h / - name: Install protoc run: sudo apt-get update && sudo apt-get install -y protobuf-compiler - - uses: dtolnay/rust-toolchain@stable + - uses: dtolnay/rust-toolchain@master with: + toolchain: "1.99.0" components: rustfmt, clippy - uses: Swatinem/rust-cache@v2 with: diff --git a/Cargo.toml b/Cargo.toml index d0e55b62..f8990fe4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -417,6 +417,14 @@ gray_matter = { version = "0.2", default-features = false, features = ["yaml"] } [workspace.lints.clippy] too_many_arguments = "allow" +# BRO-2814: async_trait's generated methods return a boxed `dyn Future`, +# which clippy (since the stable->1.99.0 bump) treats as already +# #[must_use]; the #[must_use] async_trait also stamps on top then reads +# as redundant. Not a bug in any of the ~60 `#[async_trait]` port traits +# this flags across the workspace — a known async-trait/clippy +# interaction. Two crates that predate `[lints] workspace = true` +# (arcan-tui, life-cli) carry a local #[allow(...)] instead. +double_must_use = "allow" [profile.release] lto = "thin" diff --git a/crates/arcan/arcan-tui/src/client.rs b/crates/arcan/arcan-tui/src/client.rs index 1826cb20..9e9b23c5 100644 --- a/crates/arcan/arcan-tui/src/client.rs +++ b/crates/arcan/arcan-tui/src/client.rs @@ -102,6 +102,10 @@ pub struct ProviderInfo { /// /// Implementations may use HTTP/SSE (daemon mode) or direct function calls /// (in-process mode). The TUI's `App` only sees this trait. +#[allow( + clippy::double_must_use, + reason = "async_trait boxes the return in a Pin>, which clippy now treats as already #[must_use]; the attribute it generates on top is therefore redundant, not a real bug" +)] #[async_trait] pub trait AgentClientPort: Send + Sync + 'static { /// Submit a user message to start or continue a run. diff --git a/crates/cli/life-cli/src/deploy/backend.rs b/crates/cli/life-cli/src/deploy/backend.rs index 25cca053..be9f4396 100644 --- a/crates/cli/life-cli/src/deploy/backend.rs +++ b/crates/cli/life-cli/src/deploy/backend.rs @@ -34,6 +34,10 @@ pub struct DeploymentResult { /// /// Implementations handle the specifics of provisioning, monitoring, and /// tearing down agent stacks on different cloud providers. +#[allow( + clippy::double_must_use, + reason = "async_trait boxes the return in a Pin>, which clippy now treats as already #[must_use]; the attribute it generates on top is therefore redundant, not a real bug" +)] #[async_trait] pub trait DeployBackend: Send + Sync { /// Deploy an agent template to the cloud target. diff --git a/crates/lago/lago-ingest/src/lib.rs b/crates/lago/lago-ingest/src/lib.rs index 4b606e3f..23559314 100644 --- a/crates/lago/lago-ingest/src/lib.rs +++ b/crates/lago/lago-ingest/src/lib.rs @@ -3,6 +3,7 @@ pub mod codec; pub mod server; /// Generated protobuf types. +#[allow(unused_qualifications, clippy::all)] pub mod proto { tonic::include_proto!("lago.v1"); } diff --git a/crates/spaces-a2a/spaces-a2a/src/grpc.rs b/crates/spaces-a2a/spaces-a2a/src/grpc.rs index 9f77d3c8..c4956a59 100644 --- a/crates/spaces-a2a/spaces-a2a/src/grpc.rs +++ b/crates/spaces-a2a/spaces-a2a/src/grpc.rs @@ -8,6 +8,7 @@ use crate::types::{MessagePart, TaskMessage}; use std::sync::Arc; use tonic::{Request, Response, Status}; +#[allow(unused_qualifications, clippy::all)] pub mod pb { tonic::include_proto!("a2a.v1"); } diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 00000000..f6efce51 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,18 @@ +# BRO-2814: pin the toolchain CI and local dev both resolve to. +# +# Before this file existed, every CI job used `dtolnay/rust-toolchain@stable`, +# which floats to whatever is current `stable` on the day the job runs. main +# went red with no code change in between: `stable` moved from rustc 1.93.0 +# to 1.99.0 and a new clippy lint pass started flagging every +# `#[async_trait]`-annotated trait as `clippy::double_must_use`. Pinning here +# makes that kind of drift a deliberate, reviewed bump (edit this file, see +# what breaks, fix it in the same PR) instead of a silent one that only shows +# up when Dependabot or a push happens to land that week. +# +# Bump deliberately: update `channel`, run `cargo fmt && cargo clippy +# --workspace -- -D warnings -A clippy::too_many_arguments && cargo test +# --workspace` locally, fix whatever the new toolchain flags, then commit +# both together. +[toolchain] +channel = "1.99.0" +components = ["rustfmt", "clippy"]