Skip to content

feat(ci): verify Cargo.lock reproducibility across Linux, macOS, and Windows - #875

Merged
Nanle-code merged 2 commits into
Nanle-code:masterfrom
gospeltout:Verify-Cargo-
Aug 31, 2026
Merged

feat(ci): verify Cargo.lock reproducibility across Linux, macOS, and Windows#875
Nanle-code merged 2 commits into
Nanle-code:masterfrom
gospeltout:Verify-Cargo-

Conversation

@gospeltout

Copy link
Copy Markdown

Description

This PR implements cross-platform Cargo.lock reproducibility verification for StarForge. It ensures that locked builds (--locked) do not mutate dependency resolution, fail unexpectedly, or introduce platform-dependent lockfile drift across Linux, macOS, and Windows.

Closes #654

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Changes Made

  • Core Verification Engine (src/utils/cargo_lock.rs): Implemented verify_cargo_lock_reproducibility to validate lockfile immutability, check manifest/lockfile existence, check toolchain availability, detect out-of-sync dependency errors, generate line-by-line diff summaries, and auto-restore mutated lockfiles.
  • CLI Subcommand (starforge verify lockfile): Added starforge verify lockfile to src/commands/verify.rs with --path, --json, and --strict options.
  • CI Workflows: Enforced post-build git diff --exit-code Cargo.lock checks across Linux, macOS, and Windows matrix targets in .github/workflows/ci.yml, .gitlab-ci.yml, and Jenkinsfile.
  • Documentation: Updated DEVELOPER_GUIDE.md, CI_ENFORCEMENT.md, and BUILD_TROUBLESHOOTING.md with cross-platform lockfile rules, CLI usage, and resolution troubleshooting instructions.

Testing

How has this been tested?

Describe the tests you ran and how to reproduce them.

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed

Command output verification:

cargo test --lib utils::cargo_lock
cargo test --test cli_cross_platform
cargo run -- verify lockfile --json
cargo fmt --all --check

@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@gospeltout Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Nanle-code
Nanle-code merged commit 906b2c5 into Nanle-code:master Aug 31, 2026
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.

[2026 Build] Verify Cargo.lock reproducibility on all supported platforms

2 participants