From f93d784be29cc931d90d7e269be9078b680e7636 Mon Sep 17 00:00:00 2001 From: CMGS Date: Tue, 25 Aug 2026 02:27:40 +0800 Subject: [PATCH 1/3] ci: pin the toolchain to 1.98.0 and let rust-toolchain.toml drive CI Gates, release builds and the image build compile with the same rustc; a floating stable moved the compiler under every job independently. --- .github/workflows/ci.yml | 4 ---- .github/workflows/release.yml | 1 - rust-toolchain.toml | 2 +- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab25322..49e9cdb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,9 +39,6 @@ jobs: CP_TEST_GW_BIN: ${{ github.workspace }}/target/debug/gw steps: - uses: actions/checkout@v7 - - uses: dtolnay/rust-toolchain@stable - with: - components: rustfmt, clippy - uses: Swatinem/rust-cache@v2 - name: Format run: cargo fmt --all -- --check @@ -83,7 +80,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - uses: dtolnay/rust-toolchain@stable # Run cargo-deny directly (pinned) rather than the action, whose musl # container mis-resolves rust-toolchain.toml and tracks a floating CLI. - uses: taiki-e/install-action@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b40b6f5..db1e7be 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,6 @@ jobs: runs-on: ${{ matrix.runner }} steps: - uses: actions/checkout@v7 - - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - name: Stamp the tag into the workspace version run: | diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 73cb934..aa20bc9 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "stable" +channel = "1.98.0" components = ["rustfmt", "clippy"] From 9e709f28b987550cf9af30a996b2286a7e4018cc Mon Sep 17 00:00:00 2001 From: CMGS Date: Tue, 25 Aug 2026 02:27:40 +0800 Subject: [PATCH 2/3] deps: enable only the tokio features the workspace uses --- Cargo.lock | 1 - Cargo.toml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4258877..5446867 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2578,7 +2578,6 @@ dependencies = [ "bytes", "libc", "mio", - "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", diff --git a/Cargo.toml b/Cargo.toml index 5933595..f04496c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,7 @@ undocumented_unsafe_blocks = "deny" [workspace.dependencies] # --- async runtime --- -tokio = { version = "1", features = ["full"] } +tokio = { version = "1", features = ["rt-multi-thread", "macros", "time", "sync", "net", "signal", "io-util"] } async-trait = "0.1" futures = "0.3" # --- web (server) --- From 52211479d53a8d176395bba8cd4ba7850077d3db Mon Sep 17 00:00:00 2001 From: CMGS Date: Tue, 25 Aug 2026 02:27:40 +0800 Subject: [PATCH 3/3] lint: clear the clippy 1.98 findings chunks_exact with a constant size becomes as_chunks; result_large_err now covers async fns, so the five async view helpers carry the same per-site allow as their sync siblings. --- crates/state/src/avail.rs | 5 +++-- crates/views/src/lib.rs | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/state/src/avail.rs b/crates/state/src/avail.rs index 823519e..fb11b80 100644 --- a/crates/state/src/avail.rs +++ b/crates/state/src/avail.rs @@ -183,8 +183,9 @@ impl AvailStore for RedisAvail { return (0, 0); } }; - vals.chunks_exact(2).fold((0, 0), |(o, e), pair| { - (o + pair[0].unwrap_or(0), e + pair[1].unwrap_or(0)) + let (pairs, _) = vals.as_chunks::<2>(); + pairs.iter().fold((0, 0), |(o, e), [ok, err]| { + (o + ok.unwrap_or(0), e + err.unwrap_or(0)) }) } } diff --git a/crates/views/src/lib.rs b/crates/views/src/lib.rs index 24a59af..926c440 100644 --- a/crates/views/src/lib.rs +++ b/crates/views/src/lib.rs @@ -1288,6 +1288,7 @@ impl axum::extract::FromRequestParts for Authed { /// The shared body behind [`ApiJson`]/[`AnthJson`]: `axum::Json` with the /// rejection rendered through the surface's own envelope. +#[allow(clippy::result_large_err)] // once per request; boxing would noise every call site async fn extract_json( req: axum::extract::Request, state: &S, @@ -1669,6 +1670,7 @@ fn require_config_store(s: &AppState) -> Result<&Arc