cooldown

Getting started

On this page

This guide takes a repository from no cooldown to a passing CI gate. Run every command from the repository’s root: cooldown finds the package managers there itself.

1. Install it#

Pick one:

Homebrew

brew install --cask romnn/tap/cooldown

Check that it is on your PATH:

cooldown --version

cooldown runs each ecosystem’s own package manager, such as cargo, uv or pnpm, to read and change its lock, so the ones your repository uses must be on PATH; Supported ecosystems lists each one. It reads publish times from the registries, so it needs network access unless you run it --offline against a warm cache.

2. See what could update#

cooldown outdated detects the ecosystems in the directory, reads each lock, and prints one row per direct dependency that has a newer version. Here it runs on the example project in the repository’s examples/polyglot/cargo, on a fixed date, with two flags:

  • --tool cargo limits it to Cargo.
  • --countdown soonest counts down to the next version to clear the window.
$ cooldown outdated --tool cargo --countdown soonest
──────────────────────────────────────────────────────────────────────────────────
 Package     Current   Adoptable   Latest    Cooldown            Status           
══════════════════════════════════════════════════════════════════════════════════
 hex         0.4.2     0.4.3       0.4.3     1937d/7d            pinned           
──────────────────────────────────────────────────────────────────────────────────
 bytes       1.11.1    —           1.12.0    4d/7d               in cooldown      
──────────────────────────────────────────────────────────────────────────────────
 log         0.4.29    —           0.4.33    28d/30d (0.4.30)    in cooldown      
──────────────────────────────────────────────────────────────────────────────────
 itertools   0.10.5    0.15.0      0.15.0    5d/0d               exempt           
──────────────────────────────────────────────────────────────────────────────────
 once_cell   1.21.4    —           1.21.4    102d/7d             up-to-date       
──────────────────────────────────────────────────────────────────────────────────
 clap        4.1.0     4.6.1       4.6.1     67d/7d              adoptable        
──────────────────────────────────────────────────────────────────────────────────
 lettre      0.11.21   0.11.22     0.11.22   39d/1d (security    adoptable ⚠      
                                             GHSA-4pj9-g833-qx   fixes GHSA-4pj9- 
                                             53)                 g833-qx53        
                                                                 (critical)       
──────────────────────────────────────────────────────────────────────────────────
 regex       1.7.0     1.12.4      1.12.4    12d/7d              adoptable        
──────────────────────────────────────────────────────────────────────────────────
 serde       1.0.150   1.0.228     1.0.228   267d/7d             adoptable        
──────────────────────────────────────────────────────────────────────────────────
 tokio       1.25.0    1.52.3      1.52.3    44d/7d              adoptable ⚠      
                                                                 fixes GHSA-rr8g- 
                                                                 9fpq-6wmg (low)  
──────────────────────────────────────────────────────────────────────────────────

5 adoptable · 0 blocked · 2 in cooldown · 1 up-to-date · 1 exempt · 1 held · 0 unknown-age

The Cooldown column shows age/window: how old the candidate is, against the window it must clear. The Status column says what you can do:

  • adoptable: a newer version has cleared its window, so upgrade will move to it.
  • in cooldown: a newer version exists but is still too young. log counts down to 0.4.30, the next of its newer versions to clear the window.
  • exempt: an allow rule waives the window for this package.
  • held: cooldown will not move it on its own, and the cell says why, such as pinned for an exact = pin.
  • up-to-date: already on the newest version. These rows are hidden unless you pass --all; the example’s cooldown.toml turns them on.

A ⚠ fixes GHSA-… mark names a security advisory the newer version fixes, when the advisory feed is on. The summary line counts the whole resolved graph, transitive dependencies included.

3. Move within the cooldown#

cooldown upgrade moves each dependency to the newest version that has already cleared its window, then re-locks. Preview the plan with --dry-run first:

$ cooldown upgrade --tool cargo --major --dry-run
──────────────────────────────────────────────────────────────────────────────────
 Package                   From      To        Status     Reason                  
══════════════════════════════════════════════════════════════════════════════════
 hex                       0.4.2     0.4.3     skipped    pinned to exactly 0.4.2 
                                                          in app; loosen the      
                                                          requirement to adopt    
                                                          0.4.3                   
──────────────────────────────────────────────────────────────────────────────────
 aho-corasick              0.7.20    —         removed                            
──────────────────────────────────────────────────────────────────────────────────
 aho-corasick              —         1.1.4     added                              
──────────────────────────────────────────────────────────────────────────────────
 anstream                  —         1.0.0     added                              
──────────────────────────────────────────────────────────────────────────────────
 anstyle                   —         1.0.14    added                              
──────────────────────────────────────────────────────────────────────────────────
 anstyle-parse             —         1.0.0     added                              
──────────────────────────────────────────────────────────────────────────────────
 anstyle-query             —         1.1.5     added                              
──────────────────────────────────────────────────────────────────────────────────
 anstyle-wincon            —         3.0.11    added                              
──────────────────────────────────────────────────────────────────────────────────
 autocfg                   1.5.1     —         removed                            
──────────────────────────────────────────────────────────────────────────────────
 bitflags                  1.3.2     —         removed                            
──────────────────────────────────────────────────────────────────────────────────
 clap                      4.1.0     4.6.1     upgraded                           
──────────────────────────────────────────────────────────────────────────────────
 clap_builder              —         4.6.0     added                              
──────────────────────────────────────────────────────────────────────────────────
 clap_lex                  0.3.3     —         removed                            
──────────────────────────────────────────────────────────────────────────────────
 clap_lex                  —         1.1.0     added                              
──────────────────────────────────────────────────────────────────────────────────
 colorchoice               —         1.0.5     added                              
──────────────────────────────────────────────────────────────────────────────────
 hermit-abi                0.5.2     —         removed                            
──────────────────────────────────────────────────────────────────────────────────
 is-terminal               0.4.17    —         removed                            
──────────────────────────────────────────────────────────────────────────────────
 is_terminal_polyfill      —         1.70.2    added                              
──────────────────────────────────────────────────────────────────────────────────
 itertools                 0.10.5    0.15.0    upgraded                           
──────────────────────────────────────────────────────────────────────────────────
 lettre                    0.11.21   0.11.22   upgraded   ⚠ fixes                 
                                                          GHSA-4pj9-g833-qx53     
                                                          (critical); would adopt 
                                                          on the security window  
──────────────────────────────────────────────────────────────────────────────────
 libc                      0.2.186   —         removed                            
──────────────────────────────────────────────────────────────────────────────────
 once_cell_polyfill        —         1.70.2    added                              
──────────────────────────────────────────────────────────────────────────────────
 os_str_bytes              6.6.1     —         removed                            
──────────────────────────────────────────────────────────────────────────────────
 regex                     1.7.0     1.12.4    upgraded                           
──────────────────────────────────────────────────────────────────────────────────
 regex-automata            —         0.4.14    added                              
──────────────────────────────────────────────────────────────────────────────────
 regex-syntax              0.6.29    —         removed                            
──────────────────────────────────────────────────────────────────────────────────
 regex-syntax              —         0.8.11    added                              
──────────────────────────────────────────────────────────────────────────────────
 serde                     1.0.150   1.0.228   upgraded                           
──────────────────────────────────────────────────────────────────────────────────
 serde_core                —         1.0.228   added                              
──────────────────────────────────────────────────────────────────────────────────
 serde_derive              —         1.0.228   added                              
──────────────────────────────────────────────────────────────────────────────────
 strsim                    0.10.0    —         removed                            
──────────────────────────────────────────────────────────────────────────────────
 strsim                    —         0.11.1    added                              
──────────────────────────────────────────────────────────────────────────────────
 termcolor                 1.4.1     —         removed                            
──────────────────────────────────────────────────────────────────────────────────
 tokio                     1.25.0    1.52.3    upgraded   ⚠ fixes                 
                                                          GHSA-rr8g-9fpq-6wmg     
                                                          (low)                   
──────────────────────────────────────────────────────────────────────────────────
 utf8parse                 —         0.2.2     added                              
──────────────────────────────────────────────────────────────────────────────────
 winapi-util               0.1.11    —         removed                            
──────────────────────────────────────────────────────────────────────────────────
 windows-sys               0.42.0    —         removed                            
──────────────────────────────────────────────────────────────────────────────────
 windows_aarch64_gnullvm   0.42.2    —         removed                            
──────────────────────────────────────────────────────────────────────────────────
 windows_aarch64_msvc      0.42.2    —         removed                            
──────────────────────────────────────────────────────────────────────────────────
 windows_i686_gnu          0.42.2    —         removed                            
──────────────────────────────────────────────────────────────────────────────────
 windows_i686_msvc         0.42.2    —         removed                            
──────────────────────────────────────────────────────────────────────────────────
 windows_x86_64_gnu        0.42.2    —         removed                            
──────────────────────────────────────────────────────────────────────────────────
 windows_x86_64_gnullvm    0.42.2    —         removed                            
──────────────────────────────────────────────────────────────────────────────────
 windows_x86_64_msvc       0.42.2    —         removed                            
──────────────────────────────────────────────────────────────────────────────────

6 applied · 17 added · 20 removed · 1 skipped · 0 errors · dry-run (lock untouched)

It moves within the version range the manifest allows; --major also crosses major versions, as in this run. A row it cannot move says why, such as the exact pin on hex. The unpaired_move warning is a known issue with this example, cooldown#277⁠.

Run it without --dry-run to write the lock. When a re-lock would pull in a transitive dependency that is still too young, upgrade holds it back, so the new lock passes check.

4. Set your window#

The default window is 7 days. A cooldown.toml at the repository’s root changes it for every ecosystem:

cooldown.toml
# Refuse any version younger than 14 days.
min-age = "14d"

Configuration covers windows per ecosystem, registry and package.

5. Gate CI#

cooldown check reads the lock and fails when any resolved dependency, direct or transitive, is younger than its window. The example passes its 7-day window:

$ cooldown check --tool cargo
✓ 72 dependencies pass the cooldown gate (lockfile-graph scope).

checked 72 (10 direct) · 0 violations · 1 exempt · 1 security-relevant

It exits with 0 here; Exit codes lists the others. In GitHub Actions, install cooldown and run the gate on every pull request:

.github/workflows/cooldown.yaml
name: cooldown
on:
  pull_request:
  push:
    branches: [main]

jobs:
  cooldown:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      # Installs cooldown from its GitHub release.
      - uses: jdx/mise-action@v5
        with:
          mise_toml: |
            [tools]
            "github:romnn/cooldown" = "latest"
      # Fetches publish times again, so the gate never passes on a stale cache.
      - run: cooldown check --fresh

check also asks each package manager whether its lock is current, so the runner needs the package managers of the ecosystems it gates. GitHub Actions covers scoping the gate and a weekly report.

6. When the gate fails#

With a 30-day window (--min-age 30d), four transitive dependencies of the example are too young, and check exits with 1:

$ cooldown check --tool cargo --min-age 30d
──────────────────────────────────────────────────────────────────
 Package      Version   Cooldown   Status      Notes              
══════════════════════════════════════════════════════════════════
 displaydoc   0.2.6     26d/30d    violation   graph floor 0.2.3  
──────────────────────────────────────────────────────────────────
 memchr       2.8.2     10d/30d    violation   graph floor 2.4.0  
──────────────────────────────────────────────────────────────────
 smallvec     1.15.2    10d/30d    violation   graph floor 1.13.1 
──────────────────────────────────────────────────────────────────
 yoke         0.8.3     18d/30d    violation   graph floor 0.8.2  
──────────────────────────────────────────────────────────────────

checked 72 (10 direct) · 4 violations · 1 exempt · 1 security-relevant

Each violation leaves three ways forward:

  • Wait until it clears the window, the intended path for a real release.
  • Acknowledge it with cooldown baseline, so check stops failing on that version.
  • Roll it back with cooldown fix, which moves it down to the newest version that has cleared its window. Each row’s graph floor is the lowest version its requirers allow, so the rollback cannot go below it.

The commands go through what each one can do.

Esc

Type # for headings only ↑↓ move ↵ open Ctrl ↵ new tab Ctrl U/D scroll preview

Keyboard shortcuts

/ ⌘ K Ctrl K
Search
← →
Previous or next page
?
Show these shortcuts