Skip to content

Enforce lockfile floors for time and bytes#804

Merged
multiplex55 merged 2 commits intomasterfrom
codex/update-dependency-resolution-strategy-in-cargo.toml
Feb 7, 2026
Merged

Enforce lockfile floors for time and bytes#804
multiplex55 merged 2 commits intomasterfrom
codex/update-dependency-resolution-strategy-in-cargo.toml

Conversation

@multiplex55
Copy link
Copy Markdown
Owner

Motivation

  • Ensure transitive dependencies time and bytes resolve to known-safe minimums to avoid accidental downgrades or incompatibilities.
  • Provide an automated, deterministic guard so maintainers can detect lockfile regressions locally and in CI.

Description

  • Add explicit dependency floor constraints in Cargo.toml: time = ">=0.3.47, <0.4" and bytes = ">=1.11.1, <2" to express the required minimums.
  • Regenerate Cargo.lock so time resolves to 0.3.47 and bytes resolves to 1.11.1 (remove older resolved versions for those crates).
  • Add tests/dependency_floor_guard.rs, a deterministic, offline-safe test that parses Cargo.lock, asserts each crate appears exactly once, and verifies time >= 0.3.47 and bytes >= 1.11.1, including a local SemVer helper and unit tests for the helper.
  • Update README.md to document the enforcement command for maintainers: cargo test --test dependency_floor_guard.

Testing

  • Ran cargo update -p time --precise 0.3.47 && cargo update -p bytes --precise 1.11.1, which succeeded and updated Cargo.lock to the targeted versions.
  • Ran a local script to inspect Cargo.lock and confirmed time is 0.3.47 and bytes is 1.11.1.
  • Attempted cargo test --test dependency_floor_guard on the environment default toolchain which failed because time 0.3.47 requires rustc 1.88.0.
  • Attempted cargo +1.88.0 test --test dependency_floor_guard, which progressed but the build ultimately failed in this Linux environment due to a missing system alsa development library required by a transitive native crate, not due to the guard test logic itself.

Codex Task

@multiplex55 multiplex55 merged commit dde5d08 into master Feb 7, 2026
1 check passed
@multiplex55 multiplex55 deleted the codex/update-dependency-resolution-strategy-in-cargo.toml branch February 8, 2026 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant