Skip to content

ci(infra): validate release dependencies against PyPI - #5612

Merged
Mason Daugherty (mdrxy) merged 4 commits into
mainfrom
mdrxy/infra/release-dependency-freshness
Aug 19, 2026
Merged

ci(infra): validate release dependencies against PyPI#5612
Mason Daugherty (mdrxy) merged 4 commits into
mainfrom
mdrxy/infra/release-dependency-freshness

Conversation

@mdrxy

@mdrxy Mason Daugherty (mdrxy) commented Aug 18, 2026

Copy link
Copy Markdown
Member

Release PRs now fail before merge when their built wheel needs dependency metadata that has not reached PyPI, or when the wheel cannot be installed from the public index the way release.yml installs it.


Source CI installs sibling packages from local editable paths, which can hide a required release order: a sibling package's source may declare a new Python floor or dependency floor that PyPI's latest published wheel does not yet have. Merging in that state would break the post-merge release install.

The 📦 Check Dependency Freshness workflow now, for release PRs only:

  1. Builds the release wheel and checks every Requires-Dist constraint against PyPI. For repo-managed dependencies it also verifies the newest eligible PyPI files satisfy the sibling's current Python metadata. Direct URL dependencies fail, since this path verifies PyPI.
  2. Installs the wheel into a clean environment on the package's release Python with --index-url https://pypi.org/simple, with Talon getting the same --prerelease allow exception as the release workflow.

Non-release PRs get a passing no-op, so the job is safe to require globally.

Demonstration

The check passes on this normal (non-release) PR: workflow run 32184070069.

A live GitHub-hosted failure run is not feasible before merge: pull-request workflows execute from the head branch, so the failing Talon 0.0.4 release PR (#5605) does not contain this code, and a new workflow_dispatch trigger is not recognized until it exists on the default branch. Locally, the same check against the built Talon wheel and live PyPI JSON fails with:

deepagents-code 0.1.57 (latest on PyPI) declares requires-python<4.0,>=3.11, but the current deepagents-code metadata requires >=3.12,<4.0. Constraint: <1.0.0,>=0.1.30. Release deepagents-code first, then re-run this check.

The clean Python 3.12 install step was exercised separately and resolved 138 packages from PyPI, including deepagents-code==0.1.57 — expected, since the install step proves the public graph resolves while the metadata check catches the unpublished sibling change.

Required status

After this lands, a maintainer must add the literal validate release dependencies against PyPI job name to the main ruleset's required status checks (currently only ✅ CI Success is required). The job passes on non-release PRs, so requiring it will not block unrelated PRs.

@github-actions github-actions Bot added github_actions PR touching `.github` infra Repo meta changes internal User is a member of the `langchain-ai` GitHub organization size: XL 1000+ LOC labels Aug 18, 2026

@open-swe open-swe Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open SWE Review found 2 potential issues.

Open in WebView Open SWE trace

Comment thread .github/scripts/release/check_wheel_dep_freshness.py Outdated
Comment thread .github/scripts/release/check_wheel_dep_freshness.py Outdated

@corridor-security corridor-security Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR introduces unescaped GitHub Actions workflow command injection via _error() and _notice() in check_wheel_dep_freshness.py, where attacker-controlled requires-python values from a PR-modified pyproject.toml can be embedded into ::error annotations without escaping, enabling annotation/log spoofing in CI.

Comment thread .github/scripts/release/check_wheel_dep_freshness.py
PR-controlled strings (sibling pyproject.toml requires-python, PyPI error
messages) flow into ::error/::notice annotations verbatim. A crafted value
containing newlines could inject additional runner workflow commands.
Percent-escape %, CR, and LF before formatting command strings, per the
GitHub Actions annotation spec.
@mdrxy
Mason Daugherty (mdrxy) merged commit 20a5b5c into main Aug 19, 2026
67 checks passed
@mdrxy
Mason Daugherty (mdrxy) deleted the mdrxy/infra/release-dependency-freshness branch August 19, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions PR touching `.github` infra Repo meta changes internal User is a member of the `langchain-ai` GitHub organization size: XL 1000+ LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant