Skip to content

Commit, enforce and audit every lockfile; pin the release toolchain to Rust 1.100.0 - #252

Merged
avrabe merged 4 commits into
mainfrom
ci/lockfiles-locked
Nov 21, 2026
Merged

avrabe merged 4 commits into
mainfrom
ci/lockfiles-locked

Conversation

@avrabe

@avrabe avrabe commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

This PR closes three lockfile gaps the fleet sweep looks for, and pins the release toolchain to an exact Rust version.

1. Every lockfile is committed

  • MODULE.bazel.lock had been gitignored since the v0.1 scaffold. It is now committed.
  • .bazelversion pins Bazel 9.3.3. Without it, bazelisk resolved "latest".
  • The three Cargo.lock files (root, crates/scry-mcdc, tools/proof-audit) were already committed.

2. CI builds locked

  • A new .bazelrc sets common --lockfile_mode=error, so every Bazel invocation fails on a stale lock. That covers ci.yml, release.yml, verus-proofs.yml and local runs.
  • Every cargo build, test, clippy and run that operates on the current tree passes --locked. That covers ci.yml, release.yml and crates/scry-mcdc/mcdc-gate.sh; 22 command lines in the workflows.
  • Two groups are left as they were. Rebuilds of historical worktrees ($WT/$wt) compile past commits' locks. cargo install --git of external tools uses the upstream lock.

3. The audit covers every Cargo.lock

The cargo-deny job used to audit the root lock only. It now runs one step that does three things:

  • It asserts that the set of Cargo workspace roots equals the set of committed Cargo.lock files, in both directions.
  • It runs cargo metadata --locked on each workspace.
  • It runs cargo deny check on every lock against the root deny.toml.

crates/scry-mcdc gains license = "MIT OR Apache-2.0". That lock is now audited, and cargo-deny's license check refused an unlicensed crate.

Planted controls (each must turn red, or the step fails)

  • Stale nested lock: a dependency is appended to tools/proof-audit/Cargo.toml, and the lock check must report tools/proof-audit/Cargo.lock is out of date.
  • Advisory in a nested lock: a temporary standalone workspace tools/zz-lock-control, with smallvec = "=1.6.0", is staged, and the audit must report RUSTSEC-2021-0003.
  • Stale Bazel lock: in the Bazel build job, a bazel_dep on rules_license 0.0.4, which the lock has no checksum for, must make bazel mod deps fail with not permitted with --lockfile_mode=error.

Locally, the deny step, extracted verbatim from the YAML, passes on all three locks, and both cargo controls fire. The Bazel control exits 37. The rebase itself gave a natural control: the lock generated before #251 failed error mode (exit 2) until it was regenerated.

Release toolchain pinned to Rust 1.100.0

All four dtolnay/rust-toolchain uses in release.yml (build-binaries, release, mcdc-evidence, publish-pages) now name toolchain: 1.100.0, the fleet release toolchain; 1.97 stays the MSRV floor. CI stays on stable. With rustc 1.100.0 and --locked:

  • scry-sai-mcp and scry-sai-viz build natively;
  • scry-mcdc builds for wasm32-wasip1.

The release jobs themselves only run on a tag.

Follow-on cost

Any Cargo.lock or MODULE.bazel change now also needs bazel mod deps --lockfile_mode=update. The error message says so.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KEjmjaju7y4RBwmiuZ7Eem

avrabe and others added 4 commits November 21, 2026 21:50
MODULE.bazel.lock was gitignored since the v0.1 scaffold; commit it, add
.bazelrc with `common --lockfile_mode=error`, and pin Bazel 9.3.3 in
.bazelversion (bazelisk resolved "latest"). Every current-tree cargo
build/test/clippy/run in ci.yml, release.yml and mcdc-gate.sh passes
--locked; historical-worktree rebuilds and `cargo install --git` of
external tools are left as they were.

The cargo-deny job audited the root lock only. It now asserts the Cargo
workspace roots equal the committed Cargo.lock set, that each lock is
current, and runs cargo-deny on every lock. scry-mcdc gains the license
field cargo-deny needs. Controls: a stale nested lock, an advisory in a
nested lock (RUSTSEC-2021-0003), and a bazel_dep missing from the Bazel
lock each turn CI red.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KEjmjaju7y4RBwmiuZ7Eem
Fleet rule: every release.yml names an exact Rust version, and the fleet
release toolchain is 1.100.0 (1.97 stays the MSRV floor). The four
dtolnay/rust-toolchain uses in release.yml (build-binaries, release,
mcdc-evidence, publish-pages) go from `toolchain: stable` to
`toolchain: 1.100.0`. CI stays on stable. With rustc 1.100.0 and
--locked, scry-sai-mcp and scry-sai-viz build natively and scry-mcdc
builds for wasm32-wasip1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KEjmjaju7y4RBwmiuZ7Eem
#251 changed Cargo.lock, which the crate_universe extension records, so
the lock generated before it failed `bazel mod deps` in error mode
(exit 2). Regenerated with --lockfile_mode=update; error mode passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KEjmjaju7y4RBwmiuZ7Eem
The deny job installed cargo-deny "latest" (0.20.2 today; 0.22.0 is
upstream), where --config is a top-level option and `check --config` is
rejected, so the per-lock audit failed on all three locks. Move
--config before `check` and pin the install to [email protected] so a
cargo-deny release cannot change the gate's CLI. The step, extracted
from the YAML, passes locally with 0.20.2 and both controls fire.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KEjmjaju7y4RBwmiuZ7Eem
@avrabe
avrabe merged commit 647c1d4 into main Nov 21, 2026
13 checks passed
@avrabe
avrabe deleted the ci/lockfiles-locked branch November 21, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant