Repository navigation
feat: skip dependency releases younger than 7 days and drop the unused lock - #101
Merged
Merged
Conversation
…d lock The committed uv.lock was never installed by the action or CI, so it only produced alerts; the cooldown keeps a freshly hijacked release away from users.
uv before 0.9.17 rejects relative durations, and an index without upload times resolves nothing under a cooldown.
Contributor
✅ All test workflows behaved as expected13 passed, 0 failed
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The action resolves its dependencies on every run (
uv run --no-project --with), so the committeduv.lockwas never installed by the action or by CI, whose self-audit already resolves fresh since #77; it only produced Dependabot alerts and PRs for versions nobody ran. This removes the lock and the rootuvDependabot entry, and makes the action'suv runskip releases younger than 7 days (--exclude-newerwith an absolute cutoff): a hijacked PyPI release cannot reach users until it is a week old, while fixes still arrive without an action update. A newdependency_cooldown_daysinput (default7,0turns it off) covers callers whose index publishes no upload times, where any cutoff resolves nothing. CI resolves with the same cooldown (UV_EXCLUDE_NEWER) and now also runs weekly, so tests and the self-audit follow what users get.For reviewers: a dependency floor in
pyproject.tomlmust not require a release younger than 7 days, or every run fails until that release ages. The cutoff is computed in bash because uv before 0.9.17 rejects"7 days"and setup-uv installs the uv a caller pins; it is a CLI flag rather thanUV_EXCLUDE_NEWER, so it does not leak into theuv exportthat audits the caller's own lock.How this was made
Claude Code drafted the change after @lhoupert chose a runtime cooldown over making the lock the action's runtime dependency set, to keep maintenance low. An independent Claude Code review agent then found that callers pinning uv older than 0.9.17, or using an index without upload times, would fail, and that the self-audit no longer ran without a push; all three are fixed in af44bab (its suggestion to add a cooldown for local development was left out). Checked locally:
pytest(186 tests) with dependencies installed under the cooldown; a replay of the CI security job (pip-audit audited 44 packages resolved with the cooldown, no known vulnerabilities); the new audit step with cooldown 7, 0 and an invalid value, and under uv 0.9.16, which rejects the previous relative form; and that the flag does not reach the audited process's environment. The GNUdatebranch (Linux and Windows runners) only runs in CI. Pre-commit, including zizmor, passes.— Claude Code, on behalf of @lhoupert