Repository navigation
chore(python): lock the test dependencies with uv.lockj - #1582
Conversation
The Python tests installed the newest release of every test library on each run. So a new release could fail CI on an unrelated pull request, and two runs of one commit could install different versions. The live job also installed unchecked releases while it had the CS_* secrets in its environment. uv.lock now fixes those versions, and mise run build installs them with uv sync --locked. A Dependabot uv entry proposes new minor and patch releases monthly, after a 7-day cooldown. The supply-chain skill names the new ecosystem, so stash takes a patch changeset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The comment on the test extra said each new release gets its own pull request. The Dependabot uv entry groups minor and patch releases into one monthly pull request, and it ignores major releases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: bb6d7b8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
cipherstash-agent
left a comment
There was a problem hiding this comment.
Review attestation
Reviewed bb6d7b8 · posted from Claude Code · claude-sonnet-5-5 · effort medium
Sources: code-review · claude-sonnet-5-5
Skills: code-review, review-cross-check, review-post
Cross-check was done by direct comparison with the PR's existing feedback (no review threads; only changeset-bot and CodeRabbit status comments). No finding duplicated existing feedback. The lockfile body (uv.lock) was not line-by-line reviewed; the hash and resolution entries were sampled only.
Findings (1): 0 critical, 0 major, 1 minor — 1 inline, 0 below.
Other notes, not findings: all 41 CI checks at this head are green or skipped (including Python live, which is the first run of the lock there), and the PR title ends in a typo (uv.lockj).
Source: code-review · claude-sonnet-5-5
Generated by Claude Code
cipherstash-bot
left a comment
There was a problem hiding this comment.
Recommendation: 🟢 merge as it is
Nothing must change before merging. One optional test can wait for a follow-up: nothing checks that mise run build keeps installing from the lock.
How this review was made
| Agent | Model | Review type | Result |
|---|---|---|---|
| claude | claude-opus-5-5 | test-gap | 1 found, 1 posted |
| claude | claude-opus-5-5 | rust | 0 found, 0 posted |
| claude | claude-opus-5-5 | python | 0 found, 0 posted |
| claude | claude-opus-5-5 | infracode | 0 found, 0 posted |
Synthesis: claude-sonnet-5-5 merged the findings, removed duplicates and dropped findings it could not confirm in the code. 0 posted finding(s) were raised by two or more models.
Plain language: claude-sonnet-5-5 read every comment as a new reader would. No comment had a problem that stopped the reader acting, so none was rewritten.
Stack: position 15 of 15 (#1405, #1406, #1414, #1415, #1433, #1437, #1453, #1499, #1509, #1510, #1511, #1513, #1516, #1517, *️⃣ #1582). *️⃣ marks this pull request.
Context loaded: the description, 1 linked issue(s) and 4 discussion entries.
Summary
The Python SDK's tests now install fixed versions of their libraries, from a new
uv.lock. Before this, each CI run installed the newest release of every test library from PyPI, the public Python package index. Users of the SDK see no change, because the package has no runtime dependency.Why
livejob installed unchecked releases. That job has theCS_*credentials in its environment, so a malicious release could read them.The tests must still run against new releases soon after they appear, because users build their classes with attrs, Pydantic, and SQLAlchemy. A monthly Dependabot PR now brings those releases in, after a 7-day cooldown.
Changes
languages/python/uv.lock: new. It locks 31 packages for Python 3.9 to 3.14.languages/python/mise.toml:mise run buildinstalls the test libraries withuv sync --locked, then installs the package with--no-deps.languages/python/pyproject.toml: the comment on thetestextra describes the lock..github/dependabot.yml: auventry for/languages/python. Its settings match thepipentry.skills/stash-supply-chain-security/SKILL.md: namesuv, as the supply-chain test requires..changeset/supply-chain-skill-uv.md: astashpatch, because the skill is part of that package.AGENTS.md: describes the lock.Verification
pytestpassed on Python 3.14 and on 3.9: 358 passed and 29 skipped on each. Each build installed the locked versions.pyproject.tomlfaileduv sync --locked.e2e/tests/supply-chain.e2e.test.tspassed, 29 of 29. Without theuventry, it failed and nameduv.lock.python-ci.test.mjsandcrates-ci.test.mjspassed, 40 of 40.livejob on this PR is their first run.uvupdate. The first scheduled Dependabot run is the first check.Related
Refs #1341. Refs #1406, whose review notes say the lock comes in a new PR at the top of this stack. Stacked on #1517.
Review notes
pyproject.toml. Locking it needs a different install method.🤖 Generated with Claude Code