From af3de98c4afc4905e9a3fe7431a9bef3e269c556 Mon Sep 17 00:00:00 2001 From: Mason Daugherty Date: Wed, 8 Jul 2026 16:16:37 -0400 Subject: [PATCH] docs(infra): clarify `uv.lock` step in release process guide (#38729) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What The release process guide in `AGENTS.md` and `CLAUDE.md` instructs the reader to "keep only the package-version line if `uv lock` touches unrelated entries." This is vague — it doesn't explain *why* unrelated entries appear or *what* the offending lines look like. ## Why When you bump a package's version in `pyproject.toml` and run `uv lock` from the package directory, the lockfile diff can include unrelated changes such as environment-dependent marker lines (e.g. `typing-extensions` losing a `python_full_version < '3.11'` marker) caused by a different local Python version resolving the environment. These are artifacts of the machine running the lock, not intentional dependency changes, and should not be committed. ## Change Replaced the vague instruction with a precise one: > `uv.lock` — run `uv lock` from the package directory. If the diff includes unrelated changes (e.g. environment-dependent marker lines from a different local Python version), revert them and keep only the `version = "..."` line for the package being released This came up during the langchain-core/langchain release on July 8, where the original instruction was flagged as questionable and traced back via git blame to commit 917f1a62 (PR #38683). --- AGENTS.md | 2 +- CLAUDE.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 29481fb094f..a7078ddc55f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -287,7 +287,7 @@ Each partner package is released independently. The full flow is: 1. **Version bump PR.** Create a PR that bumps three files by one line each: - `langchain_/_version.py` — `__version__` - `pyproject.toml` — `version` - - `uv.lock` — regenerate with `uv lock` from the package directory; keep only the package-version line if `uv lock` touches unrelated entries + - `uv.lock` — run `uv lock` from the package directory. If the diff includes unrelated changes (e.g. environment-dependent marker lines from a different local Python version), revert them and keep only the `version = "..."` line for the package being released Title follows Conventional Commits: `release(): ` (e.g. `release(openrouter): 0.2.6`). Use the branch name `release/-`. diff --git a/CLAUDE.md b/CLAUDE.md index 29481fb094f..a7078ddc55f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -287,7 +287,7 @@ Each partner package is released independently. The full flow is: 1. **Version bump PR.** Create a PR that bumps three files by one line each: - `langchain_/_version.py` — `__version__` - `pyproject.toml` — `version` - - `uv.lock` — regenerate with `uv lock` from the package directory; keep only the package-version line if `uv lock` touches unrelated entries + - `uv.lock` — run `uv lock` from the package directory. If the diff includes unrelated changes (e.g. environment-dependent marker lines from a different local Python version), revert them and keep only the `version = "..."` line for the package being released Title follows Conventional Commits: `release(): ` (e.g. `release(openrouter): 0.2.6`). Use the branch name `release/-`.