From e05e4fff05599d0df9ddffcdf3c186961f20d31a Mon Sep 17 00:00:00 2001 From: Noah Gift Date: Sun, 5 Jul 2026 23:38:55 +0200 Subject: [PATCH] =?UTF-8?q?fix(msrv):=20reconcile=20rust-version=201.89?= =?UTF-8?q?=E2=86=921.91=20+=20add=20MSRV=20verification=20gate=20(PMAT-MS?= =?UTF-8?q?RV-GATE-001)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fable rank-14. The declared MSRV was drifting silently: Cargo.toml claimed `rust-version = "1.89"` in 8 places, but NOTHING verified it — rust-toolchain.toml pins 1.93 (dev/CI) so 1.89 was never exercised. It's a lie: `cargo +1.89 check --workspace` fails — error: rustc 1.89.0 is not supported by pmcp@2.9.0 (requires 1.91.0) ... wasmtime-internal-*@43.0.2 requires rustc 1.91.0 `cargo +1.91 check --workspace` Finishes clean, so 1.91 is the true floor. Bumps all 8 declarations to 1.91 to match reality. Adds `scripts/check_msrv.sh` — the gate: reads the declared rust-version and compiles the whole workspace on exactly that toolchain, failing on drift. RED-turning mutation (verified locally): revert rust-version to "1.89" → the script fails (pmcp needs 1.91); at 1.91 it passes ("✓ workspace builds on its declared MSRV"). Follow-up (deferred until the ci.yml-editing PRs land + queue is healthy): wire check_msrv.sh into ci.yml as a job so drift is caught per-PR, not just on demand. Co-Authored-By: Claude Opus 4.8 (1M context) --- Cargo.toml | 4 +-- crates/apr-cli/Cargo.toml | 2 +- crates/apr-format/Cargo.toml | 2 +- crates/aprender-cgp/Cargo.toml | 2 +- crates/aprender-compute/Cargo.toml | 2 +- crates/aprender-core/Cargo.toml | 2 +- crates/aprender-gemm-codegen/Cargo.toml | 2 +- crates/aprender-serve/Cargo.toml | 2 +- scripts/check_msrv.sh | 34 +++++++++++++++++++++++++ 9 files changed, 43 insertions(+), 9 deletions(-) create mode 100755 scripts/check_msrv.sh diff --git a/Cargo.toml b/Cargo.toml index ef8f9c9a0..1bc4d6b0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -120,7 +120,7 @@ edition = "2021" license = "MIT" repository = "https://github.com/paiml/aprender" authors = ["Noah Gift "] -rust-version = "1.89" +rust-version = "1.91" keywords = ["machine-learning", "inference", "training", "gpu", "simd"] categories = ["science", "algorithms"] homepage = "https://github.com/paiml/aprender" @@ -476,7 +476,7 @@ semicolon_if_nothing_returned = "allow" # Style preference name = "aprender" version = "0.59.0" edition = "2021" -rust-version = "1.89" +rust-version = "1.91" authors = ["Noah Gift "] license = "MIT" description = "Next-generation ML framework in pure Rust — `cargo install aprender` for the `apr` CLI" diff --git a/crates/apr-cli/Cargo.toml b/crates/apr-cli/Cargo.toml index ba0134b16..1c78b5833 100644 --- a/crates/apr-cli/Cargo.toml +++ b/crates/apr-cli/Cargo.toml @@ -2,7 +2,7 @@ name = "apr-cli" version.workspace = true edition = "2021" -rust-version = "1.89" +rust-version = "1.91" authors = ["Noah Gift "] license = "MIT" description = "CLI tool for APR model inspection, debugging, and operations" diff --git a/crates/apr-format/Cargo.toml b/crates/apr-format/Cargo.toml index f684e405c..99d5cfcf3 100644 --- a/crates/apr-format/Cargo.toml +++ b/crates/apr-format/Cargo.toml @@ -2,7 +2,7 @@ name = "apr-format" version.workspace = true edition = "2021" -rust-version = "1.89" +rust-version = "1.91" description = "Sovereign `.apr` model container format (read + write, v1 APRN + v2 APR\\0) — zero ML/GPU/tokenizer dependencies" license = "MIT OR Apache-2.0" repository = "https://github.com/paiml/aprender" diff --git a/crates/aprender-cgp/Cargo.toml b/crates/aprender-cgp/Cargo.toml index b4c818e8e..ff950b54d 100644 --- a/crates/aprender-cgp/Cargo.toml +++ b/crates/aprender-cgp/Cargo.toml @@ -2,7 +2,7 @@ name = "aprender-cgp" version.workspace = true edition = "2021" -rust-version = "1.89" +rust-version = "1.91" authors = ["Pragmatic AI Labs"] license = "MIT" description = "Compute-GPU-Profile: Unified performance analysis CLI for scalar, SIMD, wgpu, and CUDA workloads" diff --git a/crates/aprender-compute/Cargo.toml b/crates/aprender-compute/Cargo.toml index 781ca4415..b1e8e86f4 100644 --- a/crates/aprender-compute/Cargo.toml +++ b/crates/aprender-compute/Cargo.toml @@ -7,7 +7,7 @@ name = "aprender-compute" version.workspace = true edition.workspace = true -rust-version = "1.89" +rust-version = "1.91" authors.workspace = true license.workspace = true description = "High-performance SIMD compute library with GPU support, LLM inference engine, and GGUF model loading (was: trueno)" diff --git a/crates/aprender-core/Cargo.toml b/crates/aprender-core/Cargo.toml index 134dd60e8..9034bc9dc 100644 --- a/crates/aprender-core/Cargo.toml +++ b/crates/aprender-core/Cargo.toml @@ -2,7 +2,7 @@ name = "aprender-core" version.workspace = true edition = "2021" -rust-version = "1.89" +rust-version = "1.91" authors = ["Noah Gift "] license = "MIT" description = "Next-generation machine learning library in pure Rust" diff --git a/crates/aprender-gemm-codegen/Cargo.toml b/crates/aprender-gemm-codegen/Cargo.toml index a56f0ed23..7518d0300 100644 --- a/crates/aprender-gemm-codegen/Cargo.toml +++ b/crates/aprender-gemm-codegen/Cargo.toml @@ -2,7 +2,7 @@ name = "aprender-gemm-codegen" version.workspace = true edition = "2021" -rust-version = "1.89" +rust-version = "1.91" authors = ["Pragmatic AI Labs"] license = "MIT" description = "Compile-time GEMM microkernel code generation for trueno (sovereign, no external BLAS)" diff --git a/crates/aprender-serve/Cargo.toml b/crates/aprender-serve/Cargo.toml index 4883c4944..ebabf7c53 100644 --- a/crates/aprender-serve/Cargo.toml +++ b/crates/aprender-serve/Cargo.toml @@ -5,7 +5,7 @@ name = "aprender-serve" version.workspace = true edition = "2021" autobins = false -rust-version = "1.89" +rust-version = "1.91" authors = ["Pragmatic AI Labs "] license = "MIT" description = "Pure Rust ML inference engine built from scratch - model serving for GGUF and safetensors" diff --git a/scripts/check_msrv.sh b/scripts/check_msrv.sh new file mode 100755 index 000000000..6a214a930 --- /dev/null +++ b/scripts/check_msrv.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +# check_msrv.sh — verify the workspace actually builds on its DECLARED MSRV. +# +# PMAT-MSRV-GATE-001 (Fable rank-14). The declared `rust-version` had silently +# drifted: Cargo.toml claimed 1.89 while `pmcp` and `wasmtime` transitively require +# rustc 1.91, and rust-toolchain.toml pins 1.93 — so NOTHING ever verified the claim. +# This script is the gate: it reads the declared MSRV and compiles the whole +# workspace on exactly that toolchain, failing loudly on any drift. +# +# RED-turning mutation: set rust-version back to "1.89" and re-run — this fails with +# `error: rustc 1.89.0 is not supported by pmcp@2.9.0 (requires 1.91)`. +# +# Usage: bash scripts/check_msrv.sh +set -euo pipefail +cd "$(dirname "$0")/.." + +MSRV="$(grep -m1 '^rust-version' Cargo.toml | grep -oE '[0-9]+\.[0-9]+(\.[0-9]+)?')" +[ -n "$MSRV" ] || { echo "check_msrv: could not read rust-version from Cargo.toml" >&2; exit 2; } +echo "Declared MSRV (Cargo.toml rust-version): $MSRV" + +if ! rustup toolchain list 2>/dev/null | grep -q "^${MSRV}"; then + echo "Installing rust ${MSRV} toolchain ..." + rustup toolchain install "${MSRV}" --profile minimal --no-self-update +fi + +echo "→ cargo +${MSRV} check --workspace" +if cargo "+${MSRV}" check --workspace; then + echo "✓ workspace builds on its declared MSRV ${MSRV}" +else + echo "✗ MSRV DRIFT: workspace does NOT build on declared rust-version ${MSRV}." >&2 + echo " Fix: bump rust-version in Cargo.toml to the true minimum, or pin the" >&2 + echo " offending dependency to a version that supports ${MSRV}." >&2 + exit 1 +fi