Skip to main content

auditable uv cooldown exceptions for emergency dependency upgrades

Project description

cooldown-guard

cooldown-guard makes uv cooldown exceptions auditable, narrow, and easy to clean up.

it is built around four ideas:

  • keep global exclude-newer on
  • allow temporary package-specific exceptions for emergency fixes
  • pin the exception with constraint-dependencies
  • automatically relax the exception once the normal cooldown window catches up

what it writes

given a project like:

[tool.uv]
exclude-newer = "7 days"

an approval like:

cooldown-guard approve urllib3==2.7.0 \
  --project /path/to/repo \
  --approved-by alice \
  --reason "security fix" \
  --advisory CVE-2026-12345 \
  --introduced-via requests \
  --introduced-via types-tqdm

will update the target pyproject.toml to look like:

[tool.uv]
exclude-newer = "7 days"
exclude-newer-package = { urllib3 = "2026-05-07T16:13:18Z" }
constraint-dependencies = ["urllib3==2.7.0"]

and create a .cooldown-guard.toml ledger beside it.

commands

  • cooldown-guard approve <package>==<version>: add a narrow exception and run uv lock
  • cooldown-guard validate: verify that the ledger and pyproject.toml agree
  • cooldown-guard status: show active and cleaned exceptions
  • cooldown-guard cleanup --check: test whether an active exception can now be relaxed from == to >=
  • cooldown-guard cleanup --apply: apply that relaxation and run uv lock

ci

the repo includes:

the example workflows install cooldown-guard directly from pypi and pin the tool version with COOLDOWN_GUARD_VERSION for reproducibility.

release flow

  • release drafts are maintained by release-drafter
  • pypi publish happens from .github/workflows/publish-pypi.yml using github oidc trusted publishing
  • the publish workflow refuses to run unless the github release tag matches v<project.version> from pyproject.toml

for pypi trusted publisher setup, register:

  • owner: ischemist
  • repository: cooldown-guard
  • workflow: publish-pypi.yml
  • environment: pypi

notes

  • approved_by is audit metadata, not authorization. real authorization should still come from codeowners, branch protection, and normal review policy.
  • the tool shells out to uv lock instead of reimplementing resolution.
  • v1 intentionally targets the common case where the repo-level exclude-newer is a duration like "7 days".

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cooldown_guard-0.1.1.tar.gz (42.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cooldown_guard-0.1.1-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file cooldown_guard-0.1.1.tar.gz.

File metadata

  • Download URL: cooldown_guard-0.1.1.tar.gz
  • Upload date:
  • Size: 42.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cooldown_guard-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a59bcc80149a4bbbeeaf6de86bcc26377112235747da14a4c54261f990e7dce1
MD5 a41ae896fac3aaa36d619251649989d4
BLAKE2b-256 8a18d412a82ab8d304a8fe6d2eb85bffb1436f9cf031a5132975ac6c6456600f

See more details on using hashes here.

File details

Details for the file cooldown_guard-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: cooldown_guard-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cooldown_guard-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f2cc8ef9760df9618d1a3fa3cca3f3f6d903756f8e3c3d9323fd6864a7742680
MD5 6a97477873cf511399ddb241a635fecb
BLAKE2b-256 697832f9e8fecfa7b4d2a5391a8b84f11f86982da30f74c3875c5c1c473006d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page