Skip to content

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

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.

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
langchain 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.

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

Copy link
Copy Markdown
Contributor Author

Ready for review: 8c687c6

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 8c687c6

Round 1 (bulk). Head 8c687c67d84abe47677fd22059b8c68a5f09df00.

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

  • langchain/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 ./langchain/poetry.lock poetry 2.4.3: exit 0 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/CD.yml:30 poetry UNPINNED-pip.
  • 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).
  • CD.yml installs Poetry unpinned (pip install poetry), which gives the newest release (2.4 or later). It only installs from the lock.

Accepted decided items: 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