Objective
- Investigate and implement a non-mutating verification that ensures Rust Cargo.lock is in sync with Cargo.toml across the workspace, preserving deterministic CI runs and builds.
Motivation
- Avoid non-deterministic behaviour caused by implicit lockfile updates during CI, and surface drift between manifests and the lockfile early.
Requirements
- The CI step must fail if Cargo.lock is out-of-date or inconsistent with the manifest(s), without modifying any files.
- Must work across the full Rust workspace (e.g., components/clp-rust-utils, components/log-ingestor).
- Should be fast and safe to run in CI without producing build artefacts.
Approaches to evaluate (non-exhaustive)
- Use
cargo metadata --locked at the workspace root (and/or per member) to error when the lockfile is stale.
- Use
cargo fetch --locked to validate resolution without compiling.
- Consider
cargo check --locked -q as a fallback if needed.
- Explore
cargo tree --locked for dependency resolution verification without mutation.
Definition of Done
- A dedicated step in .github/workflows/clp-rust-checks.yaml performs this verification and deterministically fails when Cargo.lock is not in sync, without altering repository files.
- Developer docs (e.g., CONTRIBUTING.md or Taskfile) updated to explain how to run the check locally.
Backlinks
Assignee
Objective
Motivation
Requirements
Approaches to evaluate (non-exhaustive)
cargo metadata --lockedat the workspace root (and/or per member) to error when the lockfile is stale.cargo fetch --lockedto validate resolution without compiling.cargo check --locked -qas a fallback if needed.cargo tree --lockedfor dependency resolution verification without mutation.Definition of Done
Backlinks
Cargo.lock); Add check to GH workflow. #1448Assignee