Repository navigation
Releases
v0.4.2
Highlights
- Fixed an indefinite wait when an interrupted run leaves a
Cargo.lock.cooldown-holdmarker behind. If the recorded holder is no longer visible, cargo-cooldown exits with a recovery message instead of waiting indefinitely. - Detect markers whose contents do not identify a holder after a short grace period, covering interruptions during the initial marker write. A live holder can still finish without a fixed wait timeout; if its status cannot be determined, cargo-cooldown continues waiting.
- Coordination markers are never removed automatically. Before removing one, confirm that no other cargo-cooldown process is using it, including on another host or in another process namespace. PID reuse, unreaped zombie processes, or process and file access errors can still require manual investigation.
- Improved a Windows regression test and expanded coverage for interrupted and live lock holders.
Compatibility
- Rust and Cargo 1.97 or newer are required.
Fixes and thanks
- Fixed the stale coordination marker issue (#31). Thanks to @YevheniiKotyrlo for the detailed report and reproduction.
Install
cargo install --locked cargo-cooldown --version 0.4.2Prebuilt archives for Linux, macOS, and Windows are attached, together with SHA256SUMS and GitHub Artifact Attestations. The v0.4.2 tag is GPG-signed.
Implemented in #32 by @dertin.
Full changelog: v0.4.1...v0.4.2
v0.4.1
Highlights
- Added
auto,filtered,native, andlegacyresolution backends. The filtered backend applies the configured cooldown policy to supported sparse registry indexes before Cargo resolves dependencies, then validates the resulting lockfile and checksums. - Added conservative native Cargo delegation and a native prefilter for eligible Cargo 1.100+ updates. Unsupported configurations continue through the legacy guard in
automode. - Replaced workspace copying with a temporary lockfile. This avoids traversing unrelated directories such as
node_modules, while preserving the original workspace and path dependencies. - Improved lockfile coordination: concurrent cargo-cooldown processes wait without the former fixed timeout, external changes are checked before publication, and the resulting lockfile is published atomically.
- Improved compatibility with Cargo proxy settings, custom CA bundles, rustup toolchains, workspace paths, and Windows lockfile readers. Upstream retries stop after workers observe shutdown; an HTTP request already in progress can still take up to its timeout.
- Updated locked TLS, QUIC, certificate, and Tokio dependencies and expanded regression coverage across platforms and toolchains.
Compatibility
- Rust and Cargo 1.97 or newer are required.
- User-configured Cargo aliases and custom Cargo lockfile paths are rejected with a diagnostic. Invoke the underlying Cargo command directly and use the default lockfile path.
- If an interrupted run leaves
Cargo.lock.cooldown-hold, remove it only after confirming that no other cargo-cooldown process is using it.
Fixes and thanks
- Fixed a macOS package collision caused by
/varand/private/varpath aliases (#28). Thanks to @ma5aki for the detailed report and reproduction. - Fixed failures caused by files disappearing during workspace copies, including under
node_modules(#29). Thanks to @YevheniiKotyrlo for the report and reproduction. - Fixed the timeout when a second process waits for a live lock holder (#30). Thanks to @YevheniiKotyrlo for the report and reproduction.
Install
cargo install --locked cargo-cooldown --version 0.4.1Prebuilt archives for Linux, macOS, and Windows are attached, together with SHA256SUMS and GitHub Artifact Attestations. The v0.4.1 tag is GPG-signed.
Implemented in #27 by @dertin.
Full changelog: v0.3.5...v0.4.1
v0.3.5
What's Changed
Full Changelog: v0.3.4...v0.3.5
v0.3.4
What's Changed
Full Changelog: v0.3.3...v0.3.4
v0.3.3
What's Changed
Added
scripts/compare-lockfile.sh— comparesCargo.lockfromcargo cooldown updatewith nightly-Zmin-publish-ageon the same project, using the same Cargo toolchain for both sides so resolver version differences do not add noise.
Fixed
- Lockfile dependency refs after batch pins — batch pins now rewrite disambiguated
dependenciesentries when a crate version is downgraded, so a subsequentcargo metadatarefresh keeps the intended resolved edges instead of rebinding to an older compatible version of the same crate name. - Source-qualified dependency refs — entries such as
name version (registry+...)are rewritten correctly and keyed by registry source, so multi-registry lockfiles do not cross-apply pins. - Cargo.lock format normalization — batch rewrites always pass through one unlocked
cargo metadatacall before final--lockedvalidation, keepingCargo.lockin Cargo's native on-disk format instead of compact TOML from pin writes.
Full Changelog: v0.3.2...v0.3.3
v0.3.2
v0.3.1
What's Changed
Added
cargo cooldown --helpnow lists the documentedversion,check,build,
test,run, andupdatecommands while continuing to forward any other
Cargo command through cooldown.cargo cooldown --versionnow prints the cargo-cooldown version directly.- RFC-style min publish age config aligned with the
Cargo RFC for min publish age:
[registry].global-min-publish-age,[registry].min-publish-age,
[registries.<name>].min-publish-age,CARGO_REGISTRY_GLOBAL_MIN_PUBLISH_AGE,
CARGO_REGISTRY_MIN_PUBLISH_AGE, and
CARGO_REGISTRIES_<name>_MIN_PUBLISH_AGE. - Policy environment overrides remain namespaced under
COOLDOWN_INCOMPATIBLE_PUBLISH_AGEand
COOLDOWN_FALLBACK_ACCEPT. - New canonical cargo-cooldown extension section:
[cooldown].incompatible-publish-age,
[cooldown].fallback-accept, and
[cooldown].lockfile-baseline. cargo cooldown initnow emits[registry].global-min-publish-ageinstead of
cooldown_minutes, and emits cargo-cooldown-specific policy under
[cooldown]. Generated configs default to the RFC-style fail-closed
incompatible-publish-age = "deny"policy.[[allow.package]]now accepts RFC-stylemin-publish-age = "N unit"
duration strings, includingmin-publish-age = "0"to exempt one crate from
cooldown. The olderminutesform remains supported for compatibility.
Deprecated
- 0.3.0 compatibility aliases remain supported in 0.3.1 and are deprecated for
planned removal in the next major 0.4.x line:cooldown_minutes,
COOLDOWN_MINUTES, rootenforcement,COOLDOWN_ENFORCEMENT, root
cargo_compatible_accept,COOLDOWN_CARGO_COMPATIBLE_ACCEPT, and root
lockfile_baseline.
Fixed
cargo cooldown versionnow only prints the cargo-cooldown version and no
longer runs cooldown or forwards tocargo version.- Cooldown now runs when the global min publish age is
0but a crates.io or
named registry min publish age override is positive, so registry-specific
policy is enforced for both guard commands andcargo cooldown update. - Overlapping named registry min publish age overrides are now resolved
deterministically, with explicitindexmatches taking precedence over
registry-name matches. - Layered
[registries.<name>]overrides now preserve an existingindex
when a higher-precedence config only changesmin-publish-age. - Layered
[registries.<name>]overrides now preserve an existing
min-publish-agewhen a higher-precedence config only changesindex. - Invalid registry names in min publish age overrides now produce an error
instead of being silently ignored. - Registry min publish age environment overrides now preserve underscores in
registry names instead of always rewriting them to dashes.
Full Changelog: v0.3.0...v0.3.1
v0.3.0
What's Changed
0.3.0 is an intentionally breaking, performance-focused release that makes cargo-cooldown scalable for aggressive cooldown windows and fully aware of Cargo registry configuration.
For implementation details, see the new resolution flow.
Highlights
- Reworked cooldown resolution to avoid repeated per-crate Cargo resolver calls as the normal path.
- Added batch cooldown resolution so multiple fresh crates can be cooled through validated
Cargo.lockrewrites. - Added registry-aware resolution using Cargo's effective configuration, including crates.io, alternate registries, sparse registries, mirrors, and source replacements.
- Added index-first release-time resolution from Cargo's local registry cache, with per-crate HTTP fallback only when
pubtimeis missing. - Added reusable release timelines, in-run registry metadata caching, and locked-version age inspection caching for much better scalability.
- Added bounded coordinated resolution for tightly coupled crates such as
js-sys,wasm-bindgen*, andweb-sys. - Added
cargo cooldown updateto refreshCargo.lockfirst, then cool only versions changed relative to the pre-update baseline. - Added
cargo cooldown initto scaffoldcooldown.tomlinteractively for crates and workspaces. - Added timing/debug instrumentation, benchmark harnesses, integration tests, CI self-checks, and expanded documentation.
Configuration and CLI changes
- Consolidated configuration and allow rules into a single
cooldown.toml. - Added explicit
skip_registries/COOLDOWN_SKIP_REGISTRIES. - Added explicit
lockfile_baseline/COOLDOWN_LOCKFILE_BASELINEfor choosing whether the initialCargo.lockacts as the version floor. - Added explicit
enforcement/COOLDOWN_ENFORCEMENTwithstrict,cargo_compatible, andoff. - Added
cargo_compatible_accept = "prompt" | "auto"for unresolved fresh versions required by Cargo. - Improved Cargo-style selector handling for
--manifest-path,--package,--workspace,--exclude, and feature flags, even when passed after the forwarded Cargo subcommand. - Improved user-facing output with Cargo-style
Updating,Downgrading,Adding,Removing, andKeepinglines. verbose = true/COOLDOWN_VERBOSE=truenow surfaces cooldown internals asDEBUGlogs while keeping normal output compact.
Reliability improvements
- Cooldown now snapshots the initial
Cargo.lockonce per execution and uses it as the default version floor. - Cooldown now resolves speculative changes in an isolated temporary workspace and publishes only the final Cargo-valid
Cargo.lock. - Strict enforcement now restores the original
Cargo.lockwhen unresolved fresh resolver-constrained versions remain. --manifest-pathis now honored during both cooldown inspection andcargo update --precisepinning, including runs started from another working directory.- Registry failures and skipped registries are now reported more clearly.
- Final warnings now distinguish baseline-carried fresh versions from resolver-constrained fresh versions.
Breaking changes
See the Migration Guide for upgrade steps.
COOLDOWN_REGISTRY_INDEXwas removed; registry discovery now follows Cargo's effective registry configuration.COOLDOWN_REGISTRY_APIwas removed; fallback HTTP API discovery now comes from registry/index metadata.COOLDOWN_OFFLINE_OKwas removed; useenforcement = "cargo_compatible"orskip_registries.cooldown-allowlist.toml,allowlist_path, andCOOLDOWN_ALLOWLIST_PATHwere removed; allow rules now live underallowincooldown.toml.mode/COOLDOWN_MODEwere replaced byenforcement/COOLDOWN_ENFORCEMENT.- The old
best_effortvalue was renamed tocargo_compatible. - Omitted
enforcementnow defaults tostrict. - Generated
cargo cooldown initconfigs default tocargo_compatiblewith prompt-based acceptance. - The default
Cargo.lockbehavior now useslockfile_baseline = "floor"; uselockfile_baseline = "ignore"to recheck every eligible locked registry package. - Strict enforcement now fails and restores the original
Cargo.lockwhen fresh resolver-constrained versions remain at the end of a run.
New Contributors
Contributors
Full Changelog: https://github.com/dertin/cargo-cooldown/commits/v0.3.0