Skip to content

version-bump leaves uv.lock's self-version stale, so every checkout shows a spurious uv.lock diff #1432

Description

@vitali87

What

version-bump.yml updates pyproject.toml and server.json when it bumps the version, but never updates uv.lock, which carries its own copy of the project version:

[[package]]
name = "code-graph-rag"
version = "0.0.747"      # <- stale on main while pyproject.toml says 0.0.750
source = { editable = "." }

The workflow only ever runs uv sync --frozen (line 229), which by definition will not rewrite the lock. The sed steps that follow touch pyproject.toml (line 236) and server.json — not uv.lock.

Effect

Any uv command that resolves the workspace regenerates that one line, so the file shows as modified in a clean checkout:

$ git status --short
 M uv.lock
$ git diff --numstat uv.lock
1	1	uv.lock

It is only ever the self-version line, so nothing breaks. The costs are that it is noise in every git status, it invites accidental inclusion in unrelated commits, and — the reason I noticed — it gets misattributed. Another agent session inspecting my checkout today read that diff as "someone's release work" in progress. It is not anyone's work; it is the repo self-healing a stale line.

The drift also self-corrects invisibly: whenever a PR happens to run uv lock for an unrelated reason, the current version rides along in that PR's diff. uv.lock's last three commits are 0996806b (a Markdown feature), 051d0302 (an SQL grammar pin), 09be0c10 (a Jedi frontend fix) — none of which are release commits. So the lock is version-bumped by whichever feature PR happens to touch it next, which is arbitrary.

Suggested fix

In the same block that seds pyproject.toml, update the lock's self-version. Either targeted:

uv lock --offline    # rewrites the self-version without re-resolving deps

or, if avoiding a uv invocation there is preferable, the same sed treatment scoped to the [[package]] name = "code-graph-rag" stanza — though uv lock is safer since it cannot corrupt the TOML structure.

Worth confirming it stays inside the existing "revert if it fails" guard so a lock failure cannot half-commit a release.

Not urgent

Cosmetic. Filing because it is a small, contained fix and because the misattribution risk is real when several agent sessions inspect each other's checkouts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions