Skip to content

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

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/python-precommit.yml

poetry check --lock exits 1 on main too (Poetry 2.4.3 and 2.5.1), with "Declared README file does not exist: README.md". That is pre-existing and unrelated, and CI doesn't run poetry check.

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
examples/python exit 1 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: CI Poetry 1.8.3 → 2.4.3, as the brief requires. poetry.lock was already generated by Poetry 2.5.1, and a 2.4.3 re-lock changes no versions or format, so this needed no escalation.
  • 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: 3839450

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

Approved 3839450

Round 1 (bulk). Head 38394509fe038e060afbde5812bbd8fd5f93c5b3.

Checks and breaks (private index, with credentials; scripted, flagged items read in full)

  • examples/python/poetry.lock: min-release-age = 7, exclude-source None, requires-poetry >=2.4, lock changed vs main: False.
  • Lock checks with every uv / Poetry version the repo pins: poetry check --lock ./examples/python/poetry.lock poetry 2.4.3: exit 1 If you want to define multiple readmes, you should define them in [tool.poetry] and add 'readme' to [project.dynamic]..
  • Tool floors (CI, pre-commit, Docker): .github/workflows/python-precommit.yml:26 install-poetry 2.4.3.
  • Semgrep cooldown rules with --disable-nosem on every pyproject/poetry.toml/uv.toml: [] errors 0. No nosemgrep in any of them.
  • CI on the head: all 2 checks pass (the rest skipped).
  • poetry check --lock on examples/python exits 1 on main too (missing README, pre-existing), and the lock is unchanged.

Accepted decided items: decided: CI Poetry 1.8.3 → 2.4.3, as the brief requires. poetry.lock was already generated by Poetry 2.5.1, and a 2.4.3 re-lock changes no versions or format, so this needed no escalation. decided: 7 days, per INF-5262 decision 5. 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