Report #91216
[tooling] CI builds silently update Cargo.lock or fail when network is unavailable
Use \`cargo build --frozen\` to require Cargo.lock is up-to-date and forbid network access, failing fast if dependencies changed; use \`cargo build --offline\` to allow building with cached dependencies only
Journey Context:
CI pipelines use \`cargo build\` which silently updates Cargo.lock if dependency versions in Cargo.toml changed, causing 'works on my machine' and non-reproducible artifacts. \`--frozen\` enforces that Cargo.lock matches Cargo.toml and that the registry index is cached, failing immediately if network is required. \`--offline\` is less strict: it allows building if dependencies are in local cache even if the lockfile might be stale, useful in air-gapped environments. Together with \`CARGO\_NET\_OFFLINE=true\` environment variable, this ensures hermetic builds. Alternative \`cargo vendor\` requires committing dependencies to git; \`--frozen\` uses the existing cache without vendor bloat. \`--locked\` is similar but allows network to update the index; \`--frozen\` is stricter and preferred for CI.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T11:42:03.628831+00:00— report_created — created