Skip to content

Re-lock after the release PR bumps the version - #9

Merged
mikeallisonJS merged 1 commit into
mainfrom
chore/relock-after-version-bump
Aug 15, 2026
Merged

Re-lock after the release PR bumps the version#9
mikeallisonJS merged 1 commit into
mainfrom
chore/relock-after-version-bump

Conversation

@mikeallisonJS

Copy link
Copy Markdown
Owner

pyproject.toml is the single version source, but uv.lock keeps its own copy of it in the cadent entry — and nothing re-locked after the bump. The two had drifted two releases apart:

pyproject.toml   version = "0.4.0"
uv.lock          name = "cadent"
                 version = "0.2.0"

So every uv sync regenerated that entry and left a dirty uv.lock in the working tree. That's easy to mistake for unrelated churn and revert — which is exactly what I did twice while working on #7 before stopping to look at why it kept coming back.

It is harmless only by luck. No workflow passes --locked or --frozen today; the first one that does would fail on a clean checkout.

The fix

scripts/release.py prepare now runs uv lock immediately after writing the version, so this holds whether the release PR drives it or a human does. A missing uv is a hard failure rather than a skip — a release that quietly leaves the lock behind is precisely how this accumulated.

uv.lock is regenerated in this commit to close the existing gap.

Why this doesn't drag in dependency updates

uv lock re-resolves but keeps every version it can, so a version bump rewrites one field. Verified rather than assumed — regenerating the committed lock reported:

Resolved 70 packages in 986ms
Updated cadent v0.2.0 -> v0.4.0

and the diff contains exactly one changed version line, one moved cadent block, no other package touched, and the same total line count:

version lines changed:   +version = "0.4.0"  /  -version = "0.2.0"
package blocks touched:  +name = "cadent"    /  -name = "cadent"
line count:              1491 -> 1491

relock() is also idempotent — running it against the regenerated lock leaves the bytes unchanged.

Testing

uv run ruff check scripts/release.py clean; scripts/release.py next-version still reports correctly (0.5.0, from the pending fragment on main).

Fragment is chore — release tooling, nothing user-facing, so it never renders into the changelog.

🤖 Generated with Claude Code

pyproject.toml is the single version source, but uv.lock keeps its own copy of
it in the `cadent` entry, and nothing re-locked after the bump. The two had
drifted two releases apart — the lock said 0.2.0 against a 0.4.0 project — so
every `uv sync` regenerated that entry and left a dirty uv.lock in the tree,
which is easy to mistake for churn and revert.

Harmless only by luck: no workflow passes `--locked` or `--frozen` today, and
the first one that does would fail on a clean checkout.

`scripts/release.py prepare` now runs `uv lock` straight after writing the
version, so the fix holds whether the release PR or a human drives it. uv keeps
every version it can, so a bump rewrites that one field and nothing else —
verified here: regenerating the committed lock changed exactly one version line
and moved the `cadent` block, with no dependency upgrades and the same total
line count. A missing `uv` is a hard failure rather than a skip, because a
release that quietly leaves the lock behind is how this accumulated.

uv.lock is regenerated in this commit to close the existing 0.2.0 -> 0.4.0 gap.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@mikeallisonJS, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 23 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ef797cfb-8bb3-4967-9ca5-1be6cc1c39c7

📥 Commits

Reviewing files that changed from the base of the PR and between a0b43c4 and 3927346.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • changelog.d/9.chore.md
  • scripts/release.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mikeallisonJS
mikeallisonJS force-pushed the chore/relock-after-version-bump branch from cec7056 to 3927346 Compare August 14, 2026 23:35
@mikeallisonJS
mikeallisonJS merged commit 2060c59 into main Aug 15, 2026
4 checks passed
@mikeallisonJS
mikeallisonJS deleted the chore/relock-after-version-bump branch August 15, 2026 00:39
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