chore(threads-bnu): mirror CI's 1.88.0 toolchain pin into the repo - #28
Merged
Conversation
CI already pinned the toolchain via dtolnay/rust-toolchain@1.88.0, but nothing propagated that pin to local cargo invocations. Running the documented gate locally on a newer rustc (1.95.0) failed clippy at crates/coven-threads-core/src/staging.rs:127 with clippy::manual_is_multiple_of, while CI stayed green on the identical commit. A quality gate that returns different verdicts depending on who runs it is a continuity problem in a repo whose subject is fail-closed verification. Adding rust-toolchain.toml at exactly 1.88.0 mirrors the existing authoritative decision rather than changing it. It agrees with ci.yml and with rust-version = "1.88" in Cargo.toml, so no verdict changes anywhere; local simply starts agreeing with CI. The file carries a paired-pin comment because a rust-toolchain.toml takes precedence for local cargo invocations: if it ever diverges from ci.yml the repo would silently carry two disagreeing pins, which is harder to spot than the current no-pin state. Verified locally with the pin in place: rustc resolves 1.95.0 -> 1.88.0 from the file's presence alone, cargo fmt --all -- --check clean, cargo clippy --locked --workspace --all-targets -- -D warnings clean (staging.rs:127 no longer errors), cargo test --locked --workspace 249 passed / 0 failed. staging.rs itself is untouched. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR makes local Rust tooling deterministic by mirroring CI’s existing Rust toolchain pin into the repository, ensuring cargo fmt/clippy/test produce consistent results across developers and CI for the same commit.
Changes:
- Add a root
rust-toolchain.tomlpinning Rust1.88.0and installingrustfmt+clippy. - Document the “paired pin” requirement so the repo pin stays aligned with
.github/workflows/ci.ymlandCargo.toml’srust-version.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes
threads-bnu.Problem
cargo clippy --workspace --all-targets -- -D warnings— a documented quality gate — returns different verdicts for different people on the same commit.Locally on rustc 1.95.0 it fails:
CI on the identical commit is green.
Root cause
The bead's original description blamed an unpinned CI runner. That is not the cause — Echo reproduced and corrected it.
.github/workflows/ci.ymlalready pinsdtolnay/rust-toolchain@1.88.0explicitly and is not at the mercy of the runner image.The real defect is narrower: the pin exists only inside the CI workflow. Nothing in the repository propagates it to a local toolchain, so anyone running the documented gate locally gets whatever rustc they happen to have.
Fix
Add
rust-toolchain.tomlat exactly1.88.0. This mirrors an existing authoritative decision rather than changing one — it agrees withci.ymland withrust-version = "1.88"inCargo.toml. No verdict changes anywhere; local simply starts agreeing with CI.The alternative (accept a newer toolchain, fix/allow the lint) is strictly larger: it requires editing
ci.ymlto move the pin, which changes the verdict surface for every existing commit, and contradictsrust-versionunless that is bumped too.staging.rsis not touched. Only the toolchain reading it changes.Paired-pin hazard
A
rust-toolchain.tomltakes precedence for local cargo invocations. If it ever diverges fromci.yml, the repo silently carries two disagreeing pins — harder to spot than the current no-pin state. The file therefore carries a header comment naming the two as a pair that must change together.Verification
Run locally with the pin in place, on top of
74569e5:rustc 1.95.0→1.88.0from the file's presence alonecargo fmt --all -- --checkcargo clippy --locked --workspace --all-targets -- -D warningsstaging.rs:127no longer errorscargo test --locked --workspaceScope
P2, blocks nothing. Does not preempt the four P1 Phase-5 remediation beads (
threads-okc,threads-980,threads-dgg,threads-zav). It does raise the floor under them: an unreproducible local gate is exactly what forced Echo to record that she could not run the suite while verifyingthreads-uqx.9.Diagnosis by Echo; implementation and verification by Kitty.