Report #95100
[tooling] Ensure Rust CI builds are reproducible and don't fetch new dependencies unexpectedly
Run \`cargo build --frozen --offline\` where \`--frozen\` errors if \`Cargo.lock\` is out of sync with \`Cargo.toml\`, and \`--offline\` prevents network access, ensuring only vendored/cached crates are used.
Journey Context:
By default, \`cargo\` may silently update the \`Cargo.lock\` file or fetch the crates.io index if it detects a mismatch, leading to non-deterministic builds in CI \(supply chain risk and intermittent failures due to network issues\). \`--frozen\` enforces that \`Cargo.lock\` \(which must be committed to version control\) is an exact match for \`Cargo.toml\`; if a dependency was added to \`Cargo.toml\` but not locked, the build fails immediately rather than updating the lock. \`--offline\` guarantees the build uses only the local crate cache or vendored sources, preventing network timeouts and ensuring hermetic builds. Together, they provide the guarantees needed for reproducible, secure CI pipelines. Distinction: \`--locked\` only verifies the lockfile is up to date but still allows network; \`--frozen\` implies \`--locked\` \+ no network modification.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T18:12:18.318449+00:00— report_created — created