From 2e6d581c2c4339f7e40352bc8cc777d8fb1766a4 Mon Sep 17 00:00:00 2001 From: Jeongkyu Shin Date: Fri, 7 Aug 2026 14:55:16 +0900 Subject: [PATCH] chore(ci): bump the pinned Rust toolchain to 1.97.1 The pin sat at 1.93.1 (2026-02-11), four releases behind stable 1.97.1 (2026-07-14). Bump it and move the `dtolnay/rust-toolchain` tag in `ci.yml` with it, as the comment on that step requires. The `@stable` steps in `release.yml`, `nightly-verify.yml`, and `pipeline-parallel-ci.yml` were never building at a different version: the action runs `rustup default` and never exports `RUSTUP_TOOLCHAIN`, which `rust-toolchain.toml` overrides per directory, so every cargo invocation in the tree already resolved to the pin. `cargo fmt` produces no diff at 1.97.1, so the bump reformats nothing. Six new clippy lints fire under `-D warnings` and are fixed here, all mechanical and behavior-preserving: question_mark memory_estimate.rs, sanitize.rs collapsible_match chat_request.rs for_kv_map request_router_tests.rs unnecessary_cast dbrx_tests.rs unneeded_wildcard_pattern pipeline_remote_real_models.rs --- .github/workflows/ci.yml | 4 ++-- CHANGELOG.md | 6 ++++++ CONTRIBUTING.md | 2 +- rust-toolchain.toml | 2 +- src/distributed/disaggregated/request_router_tests.rs | 2 +- src/execution/memory_estimate.rs | 6 ++---- src/models/dbrx_tests.rs | 4 +--- src/models/sanitize.rs | 7 ++++--- src/server/chat_request.rs | 8 ++++---- tests/pipeline_remote_real_models.rs | 6 +----- 10 files changed, 23 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eadd22c59..3ea40e7ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -107,7 +107,7 @@ jobs: # track `rust-toolchain.toml`'s `channel` rather than be bumped on its own. # Dependabot reads the tag as an ordinary version and will try to raise it; # `.github/dependabot.yml` ignores this action for that reason. - - uses: dtolnay/rust-toolchain@1.93.1 + - uses: dtolnay/rust-toolchain@1.97.1 with: components: rustfmt - run: cargo fmt --all -- --check @@ -187,7 +187,7 @@ jobs: # parser resolves to the identical commit for that same input: the two # unit-test files below each cover one parser in isolation and cannot # catch a same-input value mismatch on their own. - - uses: dtolnay/rust-toolchain@1.93.1 + - uses: dtolnay/rust-toolchain@1.97.1 - name: Run the Rust pin parser's unit and cross-parser tests run: cargo test -p mlxcel-mlx-pin diff --git a/CHANGELOG.md b/CHANGELOG.md index 1dcb9e6fa..7e0d44de5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +## [Unreleased] + +### Changed + +- The pinned Rust toolchain moves from 1.93.1 (2026-02-11) to 1.97.1 (2026-07-14), and the `dtolnay/rust-toolchain` tag in `ci.yml` tracks it as the comment there requires. The workflows that install `@stable` are unaffected and were never building at a different version: that action runs `rustup default` and never exports `RUSTUP_TOOLCHAIN`, so `rust-toolchain.toml` overrode it per directory and every cargo invocation in the tree already resolved to the pin. `cargo fmt` produces no diff at the new version, so the bump reformats nothing, but six new clippy lints fire under `-D warnings` and are fixed here: `question_mark` in `memory_estimate.rs` and `sanitize.rs`, `collapsible_match` in `chat_request.rs`, `for_kv_map` and `unnecessary_cast` in two test modules, and `unneeded_wildcard_pattern` in `pipeline_remote_real_models.rs`. All six are mechanical and behavior-preserving. + ## [v0.5.0-beta.1] - 2026-08-06 ### Added diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 62e1894e9..137485594 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -132,7 +132,7 @@ Detailed setup instructions are in [`docs/installation.md`](docs/installation.md Minimum: -- Rust **1.93+** (project uses edition 2024) +- Rust **1.97+** (project uses edition 2024) - macOS: Apple Silicon Mac on macOS Sonoma+; Xcode Command Line Tools - Linux: CUDA 13+ toolchain, OpenBLAS, LAPACK (see [`docs/installation.md`](docs/installation.md) for the package list) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index ada6ffcb8..fe0444bf1 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -7,5 +7,5 @@ # letting `stable` float. Keep this version identical in mlxcel and the # internal development repo. [toolchain] -channel = "1.93.1" +channel = "1.97.1" components = ["rustfmt", "clippy"] diff --git a/src/distributed/disaggregated/request_router_tests.rs b/src/distributed/disaggregated/request_router_tests.rs index af70778a5..a7aa09731 100644 --- a/src/distributed/disaggregated/request_router_tests.rs +++ b/src/distributed/disaggregated/request_router_tests.rs @@ -650,7 +650,7 @@ fn handle_node_failure_distributes_rerouted_requests() { // Force all requests onto prefill-0 for the test. { let mut requests = router.requests.write().unwrap(); - for (_, tracked) in requests.iter_mut() { + for tracked in requests.values_mut() { tracked.phase = RequestPhase::Prefilling { node_id: "prefill-0".to_string(), }; diff --git a/src/execution/memory_estimate.rs b/src/execution/memory_estimate.rs index e3cbc8030..a4b382538 100644 --- a/src/execution/memory_estimate.rs +++ b/src/execution/memory_estimate.rs @@ -732,11 +732,9 @@ pub fn kv_cache_params_from_path( let explicit_head_dim = config_fields::get_u64(text_cfg, config_fields::HEAD_DIM_KEYS); let head_dim = if let Some(head_dim) = explicit_head_dim { head_dim - } else if let Some(hidden_size) = hidden_size { - // 64 is the historical fallback for malformed configs with zero heads. - hidden_size.checked_div(num_heads).unwrap_or(64) } else { - return None; + // 64 is the historical fallback for malformed configs with zero heads. + hidden_size?.checked_div(num_heads).unwrap_or(64) }; Some(KvCacheParams { diff --git a/src/models/dbrx_tests.rs b/src/models/dbrx_tests.rs index b63545584..cd98e0079 100644 --- a/src/models/dbrx_tests.rs +++ b/src/models/dbrx_tests.rs @@ -314,9 +314,7 @@ fn clip_qkv_actually_clamps_the_projection() { assert_eq!(unclipped.clip_qkv, None); // Large inputs push the fused projection well past +/-8. - let big: Vec = (0..(args.d_model as usize)) - .map(|i| 40.0 + i as f32) - .collect(); + let big: Vec = (0..args.d_model).map(|i| 40.0 + i as f32).collect(); let x = mlxcel_core::from_slice_f32(&big, &[1, 1, args.d_model as i32]); let mut cache_a = KVCache::new(); diff --git a/src/models/sanitize.rs b/src/models/sanitize.rs index fbb0f1316..438311739 100644 --- a/src/models/sanitize.rs +++ b/src/models/sanitize.rs @@ -329,10 +329,11 @@ fn normalize_nvfp4_keys(weights: &mut mlxcel_core::weights::WeightMap) { format!("vision_tower.{rest}") } else if let Some(rest) = k.strip_prefix("model.embed_vision.") { format!("embed_vision.{rest}") - } else if let Some(rest) = k.strip_prefix("model.lm_head.") { - format!("lm_head.{rest}") } else { - return None; // No remapping needed + // Anything that is not one of these prefixes needs no remapping, + // and `?` drops it from the collected set. + let rest = k.strip_prefix("model.lm_head.")?; + format!("lm_head.{rest}") }; Some((k.clone(), new_key)) }) diff --git a/src/server/chat_request.rs b/src/server/chat_request.rs index 26b8593b6..06ead0309 100644 --- a/src/server/chat_request.rs +++ b/src/server/chat_request.rs @@ -286,16 +286,16 @@ fn validate_no_reserved_media_sentinels(request: &ChatCompletionRequest) -> Resu { anyhow::bail!("message text contains a reserved ordered-media sentinel"); } - MessageContent::Parts(parts) => { + MessageContent::Parts(parts) if parts.iter().any(|part| { matches!( part, ContentPart::Text { text } if text.contains(super::types::request::ORDERED_MEDIA_PREFIX) ) - }) { - anyhow::bail!("message text contains a reserved ordered-media sentinel"); - } + }) => + { + anyhow::bail!("message text contains a reserved ordered-media sentinel"); } _ => {} } diff --git a/tests/pipeline_remote_real_models.rs b/tests/pipeline_remote_real_models.rs index 96a1e9cde..48c6b700f 100644 --- a/tests/pipeline_remote_real_models.rs +++ b/tests/pipeline_remote_real_models.rs @@ -183,11 +183,7 @@ fn pipeline_remote_runtime_llama_real_model_parity_and_cleanup() { let active_states = runtime.probe_stages().unwrap(); assert!(active_states.iter().all(|state| matches!( state, - RemoteStageResponse::State { - state, - pending_entry_replies: _, - .. - } if state.in_flight_requests == 1 + RemoteStageResponse::State { state, .. } if state.in_flight_requests == 1 ))); let atol = 1e-4f64;