From b8dbcde8a36442e18726d3b2e946d9b2c6ea96e8 Mon Sep 17 00:00:00 2001 From: Ofek Gabay Date: Thu, 24 Sep 2026 11:39:58 +0300 Subject: [PATCH] =?UTF-8?q?fix(ci):=20make=20MSRV=20real=20=E2=80=94=20rai?= =?UTF-8?q?se=20to=20Rust=201.88=20and=20actually=20test=20on=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The declared MSRV (1.75) could not build the locked dependencies: Cargo.lock is v4, toml 1.1 / serde_spanned need edition 2024 (1.85), and regress 0.11 uses let-chains (1.88). The MSRV job still passed because rust-toolchain.toml pins stable, which overrides the toolchain the job installs. - rust-version = "1.88" (1.87 fails, 1.88 builds and passes all tests) - MSRV job: install via `dtolnay/rust-toolchain@master` + `toolchain` input (Dependabot kept "upgrading" the `@1.75` ref, see #204) and run `cargo +1.88 test --locked` so rust-toolchain.toml cannot override it - README badge and CHANGELOG updated - Promote clippy::trivially_copy_pass_by_ref to deny Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/ci.yml | 16 +++++++++++----- CHANGELOG.md | 2 +- README.md | 2 +- core/Cargo.toml | 3 ++- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cbbdfb9..fdeda90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,13 +59,17 @@ jobs: run: RUSTDOCFLAGS="-D warnings" cargo doc --manifest-path core/Cargo.toml --no-deps --locked msrv: - name: MSRV (1.75) + name: MSRV (1.88) runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - name: Install Rust 1.75 - uses: dtolnay/rust-toolchain@1.75 + # Pin the toolchain through the `toolchain` input, not the action ref: Dependabot + # treats `@1.xx` refs as action versions and "upgrades" them. + - name: Install Rust 1.88 + uses: dtolnay/rust-toolchain@master + with: + toolchain: "1.88" - name: Cache cargo registry uses: actions/cache@v6 @@ -78,8 +82,10 @@ jobs: restore-keys: | ${{ runner.os }}-cargo-msrv- - - name: Build on MSRV - run: cargo build --manifest-path core/Cargo.toml + # `+1.88` overrides rust-toolchain.toml (which pins stable); without it this job + # silently builds on stable. + - name: Test on MSRV + run: cargo +1.88 test --manifest-path core/Cargo.toml --locked deny: name: Dependency audit (cargo deny) diff --git a/CHANGELOG.md b/CHANGELOG.md index b62f964..0bd9d38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `command_words` CEL variable for matching subcommands without false positives from paths - `reset = "always"` mode blocks unconditionally on every hook invocation - `#[non_exhaustive]` on `HookResponse` and `Reset` for semver-safe extensibility -- MSRV set to Rust 1.75 in `Cargo.toml` +- MSRV set to Rust 1.88 in `Cargo.toml`, the oldest toolchain that builds the locked dependencies (`regress` uses let-chains; `toml` 1.1 and `serde_spanned` need edition 2024); the CI MSRV job now really builds and tests on it - Windows `x86_64-pc-windows-msvc` binary in the release matrix - Module-level rustdoc (`//!`) and public-API doc comments across all modules - Append-only JSONL audit log at `.steplock/audit.log` diff --git a/README.md b/README.md index f337d04..f7f5d1b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![CI](https://github.com/polyhook/steplock/actions/workflows/ci.yml/badge.svg)](https://github.com/polyhook/steplock/actions/workflows/ci.yml) [![Crates.io](https://img.shields.io/crates/v/steplock.svg)](https://crates.io/crates/steplock) -[![MSRV](https://img.shields.io/badge/rustc-1.75+-orange.svg)](https://www.rust-lang.org) +[![MSRV](https://img.shields.io/badge/rustc-1.88+-orange.svg)](https://www.rust-lang.org) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) **Stateful quality gates for AI coding agent actions.** diff --git a/core/Cargo.toml b/core/Cargo.toml index bd02780..6cdbf85 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -2,7 +2,7 @@ name = "steplock" version = "0.1.0" edition = "2021" -rust-version = "1.75" +rust-version = "1.88" description = "Stateful quality gate logic for steplock" license = "MIT" repository = "https://github.com/polyhook/steplock" @@ -87,6 +87,7 @@ single_match_else = "deny" manual_let_else = "deny" items_after_statements = "deny" needless_pass_by_value = "deny" +trivially_copy_pass_by_ref = "deny" [dependencies] cel-interpreter = "0.10"