Repository navigation
[CB-0] [sdk-superfan] Regenerate uv.lock and fail CI on lockfile drift - #220
spicysouvlaki wants to merge 1 commit into
Conversation
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>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
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.
|
What happened
#177: a clean
uv sync --all-extrasrewritesuv.lock, anduv lock --checkfails withThe lockfile at uv.lock needs to be updated, but --check was provided.Why
uv.lock:229pins the root package at1.15.0, butpyproject.toml:3says1.26.0. release-please (release-please-config.jsonextra-files) bumps the version in pyproject but never in the lock.Fix
uv.lock(uv 0.12.3, the generator's pin; also passes with CI's uv 0.10.2) and re-exportrequirements-dev.lockthe wayscripts/bootstrapdoes.uv sync --all-extras --locked.uv.lock(TOML extra-file), so release PRs pass--locked.Tests
uv sync --all-extras --locked(uv 0.10.2) before: fails. After: passes.uv lock --checkpasses.uv syncplus the export, the tree stays clean../scripts/lintand./scripts/testpass.Risk and rollout
.github/workflows/ci.yml,release-please-config.jsonanduv.lockare generated by Stainless, so these edits are sealed. The stlc generator commits touv.lockbut 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