Skip to content

Added a 7-day dependency cooldown for Poetry locks (INF-5262) - #62

Open
andriy-sudo wants to merge 1 commit into
mainfrom
andriy/inf-5262-cooldown
Open

andriy-sudo wants to merge 1 commit into
mainfrom
andriy/inf-5262-cooldown

Conversation

@andriy-sudo

Copy link
Copy Markdown
Contributor

Linear: INF-5262

What and why

A malicious release of a popular package usually stays on PyPI for hours before it is pulled (for example agent-framework 1.26.1/1.26.2 on 2026-11-17, and litellm 1.82.7/1.82.8). This PR sets a 7-day dependency cooldown (INF-5262 decision 5), so a lock refresh can't pick up a release that new. It uses the same recipe as the approved pilots (eva#896, usage-service#306, goldfish#667).

Poetry: poetry.toml [solver] min-release-age = 7, plus min-release-age-exclude-source for the private tinyfish source where the project has one. requires-poetry = ">=2.4", because older Poetry ignores the setting without a warning. CI and Docker Poetry pins below 2.4 go to 2.4.3. poetry.lock is not changed.

Tooling pins (uv < 0.9.25 can't parse the per-package false, and uv < 0.9.17 drops the whole [tool.uv] table without an error):

  • .github/workflows/precommits.yml

Proof

Run against the private index with credentials, on the files in this PR.

Poetry project poetry check --lock (2.4.3) poetry lock (2.4.3, no update): version changes
. exit 0 0

Poetry 2.4.3 honours the window and Poetry 2.3.4 refuses with requires-poetry >=2.4 (shown on goldfish#667).

Decided

  • decided: 7 days, per INF-5262 decision 5. No nosemgrep.

After merge

  • Workflows that trigger on these paths rebuild with identical dependencies. Check that uv sync --locked / poetry install still pass there.

🤖 Generated with Claude Code

@coderabbitai ignore

Lock refreshes can no longer pick up a release younger than 7 days, so a malicious
release that PyPI pulls within hours never reaches a lock (decision 5).
Poetry: [solver] min-release-age = 7 in 1 project(s), requires-poetry >= 2.4;
poetry.lock unchanged.
Tooling pins: uv >= 0.13.6 / Poetry 2.4.3 where older versions would ignore the window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andriy-sudo

Copy link
Copy Markdown
Contributor Author

Ready for review: 0bc3de9

INF-5262 bulk (slices 2/3), round 1. The PR body has the recipe, per-lock proof and "decided" items.

@andriy-sudo

Copy link
Copy Markdown
Contributor Author

Review of 0bc3de9: CHANGES REQUESTED

Round 1 (bulk). No code findings. Nothing for you to change.

  1. (escalated to INF-5262, not a coder item) CI is red on Pre-commit checks (3.11), Pre-commit checks (3.10), Pre-commit checks (3.12). The cause is ruff format --check --diff fails on example .py files this PR doesn't touch (the workflow uses the unpinned astral-sh/ruff-action@v3, so it's newer-ruff format drift). This PR doesn't cause it: no locked version changes, and the PR touches no Python source. Fixing it would need dependency or source changes outside INF-5262's scope ("no dependency version changes"). I've asked Andriy on the ticket how PRs that are blocked only by pre-existing debt should merge. Don't push for this.

Checks passed: every lock is covered; the window is at 7 days (uv exclude-newer / Poetry min-release-age); the lock diffs are options-only or the lock is unchanged; the exemptions match the undated private packages; uv/Poetry floors (CI, pre-commit, Docker) are 0.9.25+ / 2.4+ with requires-poetry >=2.4 on Poetry projects; uv lock --check / poetry check --lock pass with every pinned version; Semgrep with --disable-nosem gives 0 results, and there is no nosemgrep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant