Skip to content

[CB-0] [sdk-superfan] Regenerate uv.lock and fail CI on lockfile drift - #220

Draft
spicysouvlaki wants to merge 1 commit into
mainfrom
wschmitt/uv-lock-sync
Draft

spicysouvlaki wants to merge 1 commit into
mainfrom
wschmitt/uv-lock-sync

Conversation

@spicysouvlaki

@spicysouvlaki spicysouvlaki commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

What happened

#177: a clean uv sync --all-extras rewrites uv.lock, and uv lock --check fails with
The lockfile at uv.lock needs to be updated, but --check was provided.

Why

  • uv.lock:229 pins the root package at 1.15.0, but pyproject.toml:3 says 1.26.0. release-please (release-please-config.json extra-files) bumps the version in pyproject but never in the lock.
  • The lock is also missing the dev deps that pyproject declares: playwright, pytest-playwright, python-dotenv and selenium.

Fix

  • Regenerate uv.lock (uv 0.12.3, the generator's pin; also passes with CI's uv 0.10.2) and re-export requirements-dev.lock the way scripts/bootstrap does.
  • CI lint: uv sync --all-extras --locked.
  • release-please also bumps the root version in uv.lock (TOML extra-file), so release PRs pass --locked.

Tests

  • uv sync --all-extras --locked (uv 0.10.2) before: fails. After: passes.
  • Ran release-please 17.11.2's TOML updater on this lock with a 1.27.0 bump. It changed one line, and uv lock --check passes.
  • After uv sync plus the export, the tree stays clean. ./scripts/lint and ./scripts/test pass.
  • Not run: a real release-please PR, or CI with this workflow.

Risk and rollout

.github/workflows/ci.yml, release-please-config.json and uv.lock are generated by Stainless, so these edits are sealed. The stlc generator commits to uv.lock but doesn't lock against this pyproject. If a codegen push overwrites the lock, lint will now fail instead of drifting silently. Fix the lock in the generator config, or add these dev deps there. No runtime or published-package change.

Fixes #177

🤖 Generated with Claude Code

uv.lock on main recorded the root package at 1.15.0 (pyproject: 1.26.0)
and none of the dev deps that pyproject declares since the uv switch in
5562b6d (playwright, pytest-playwright, python-dotenv, selenium). Both
`uv lock --check` (0.12.3, the generator's pin) and `uv lock --check` with
uv 0.10.2 (the CI pin) fail on origin/main, so `uv sync --all-extras`
rewrites ~1.1k lines of a tracked file on every fresh checkout.

Why it drifted:
- release-please bumps pyproject.toml and _version.py only. Every release
  PR since 1.15.0 left the lock's root version behind. Bumping only the
  pyproject version on a fresh lock is enough to fail `uv lock --check`
  (measured).
- The stlc generator commits to uv.lock (stlc-bot "Build SDK" / "ci: pin
  uv to 0.12.3", Stainless-Generated-From) but its edits are marker
  reorders. It never picked up the custom dev deps, so it isn't locking
  against this repo's pyproject (inferred).

Changes:
- `uv lock` with uv 0.12.3. uv 0.10.2 accepts the result
  (`uv lock --check` and `uv sync --all-extras --locked` both pass).
- requirements-dev.lock re-exported with the same command as
  scripts/bootstrap. It matched the old uv.lock exactly, so it has to move
  with it or bootstrap dirties the tree instead.
- CI lint job: `uv sync --all-extras --locked`. Before: fails with "The
  lockfile at `uv.lock` needs to be updated". After: passes.
- release-please extra-files: bump the root package version in uv.lock via
  the TOML updater. Without this, `--locked` would fail on every release
  PR. Checked with release-please 17.11.2's GenericToml on this lock: the
  jsonpath needs `@.name.value` (its TOML parser wraps scalars), it changes
  exactly one line, and the bumped lock passes `uv lock --check` on 0.10.2
  and 0.12.3.

Verified: after these changes `uv sync --all-extras` plus the bootstrap
export leave the tree clean; ./scripts/lint and ./scripts/test pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedplaywright@​1.60.07910010010080
Addedselenium@​4.36.091100100100100
Addedpython-dotenv@​1.2.19999100100100
Addedpytest-playwright@​0.7.1100100100100100

View full report

@socket-security

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Priority Alert  (click "▶" to expand/collapse) Action
Low priority
License policy violation: pypi playwright

License: LicenseRef-LateNiteHacking-Free-1.0 - The applicable license policy does not permit this license (5) (playwright/driver/LICENSE)

From: pyproject.toml → pypi/playwright@1.60.0

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore pypi/playwright@1.60.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
Low priority
License policy violation: pypi playwright

License: LicenseRef-LateNiteHacking-Free-1.0 - The applicable license policy does not permit this license (5) (playwright/driver/LICENSE)

From: pyproject.toml → pypi/playwright@1.60.0

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore pypi/playwright@1.60.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
Low priority
License policy violation: pypi playwright

License: LicenseRef-LateNiteHacking-Free-1.0 - The applicable license policy does not permit this license (5) (playwright/driver/LICENSE)

From: pyproject.toml → pypi/playwright@1.60.0

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore pypi/playwright@1.60.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn

View full report

This branch has not been deployed

No deployments
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.

Regenerate stale uv.lock and enforce lockfile consistency in CI

1 participant