Repository navigation
fix(cli): report a pinned uv tool upgrade as not upgraded - #2040
Merged
Merged
Conversation
Auto-update reported UPDATED whenever `uv tool upgrade` exited 0, and the stdio MCP startup then logged that a newer version was installed. A uv tool receipt that pins basic-memory keeps that version and uv still exits 0, so the message was wrong. For uv tool installs, the updater now reads the version installed in the tool environment, through the tool's own interpreter, before and after the upgrade. If it did not change, the result is NOT_UPGRADED with the installed and latest versions and how to reinstall; bm update, the periodic CLI check and the MCP startup report it. A real upgrade's message names the new version. Homebrew installs keep the old behavior: each version lives in its own Cellar directory, so this process cannot read the new one. Part of #2000; notifying instead of installing a major version is not in this change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CMYVL4TcbWdXhdvAzxfqjo Signed-off-by: phernandez <paul@basicmachines.co>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Tested #2040 on Windows 11 with a uv tool install pinned to
I did not run the unit tests or the |
phernandez
added a commit
that referenced
this pull request
Nov 12, 2026
…background (#2099) Stack 4/4, based on #2098. ## Why #2000's second request: the background checks (MCP startup, the periodic CLI check) install any newer release, including a new major version. A major release can remove tools and settings people rely on, as 1.0 removed the legacy tool names. The pinned-install half of #2000 landed in #2040. ## What - A background check (`force=False`) that finds a new major version returns `UPDATE_AVAILABLE` with the release-notes link and "run `bm update`". `bm update` passes `force` and still installs it. Minor and patch releases install as before. - There is no setting: background checks never install a major version. Say if you want it configurable. - Existing upgrade tests used `9.9.9` as the latest version, which is now a major jump from 1.0.0. They use `1.9.9` instead. - Note: the two new flow tests use this file's existing PyPI stub (monkeypatch), because `run_auto_update` has no other seam. `is_major_upgrade` is tested directly. Closes #2000 ## Verification - `just fast-check` - `just fast-test` on the top of the stack (`-m "not semantic and not benchmark"`): 3993 passed, 21 skipped. Postgres runs in CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01CMYVL1rjJwNnrvxniz1dDD --------- Signed-off-by: phernandez <paul@basicmachines.co> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #2000: the first request, detecting a pinned no-op upgrade.
Summary
UPDATEDwheneveruv tool upgradeexited 0, and the stdio MCP startup logged that a newer version was installed. A uv tool receipt that pinsbasic-memory==0.24.1keeps that version, and uv still exits 0.NOT_UPGRADED. Its message gives the installed and latest versions and how to reinstall.bm updateand the periodic CLI check print it, and MCP startup logs it.Not in this PR
The second request in #2000 is a setting to notify instead of installing a major version. It needs a decision on the default, so it stays open on the issue.
Test plan
UPDATED, says "updated to 9.9.9", and reads the version twice through the tool interpreter.NOT_UPGRADED, with no restart recommended.tests/cli -k "update or mcp": 81 passed.🤖 Generated with Claude Code
https://claude.ai/code/session_01CMYVL4TcbWdXhdvAzxfqjo