Skip to content

v1.108.84 — install-mechanism-aware upgrade (#357)

Choose a tag to compare

@jgravelle jgravelle released this 29 Jun 01:00

Install-mechanism-aware upgrade (#357)

jcodemunch-mcp upgrade shelled out to python -m pip install -U blindly. pipx- and uv-managed venvs ship no pip module, so the command died with No module named pip and bailed before refreshing hooks (reported by @zakblacki on a pipx install). The startup version-drift warning then told the user to run jcodemunch-mcp upgrade to clear the stale-hook nag, which is the exact command that fails on pip-less installs.

Changed

  • upgrade detects the install mechanism instead of guessing-and-running. New detect_install_mechanism() (path/env heuristic, no subprocess) returns the mechanism (pip/pipx/uv/uvx/venv) and the exact upgrade command. With pip available the in-process pip install -U runs as before. Without it (pipx/uv) the command no longer invokes a foreign package manager: it prints the correct one (pipx upgrade jcodemunch-mcp / uv tool upgrade jcodemunch-mcp) and still refreshes hooks/config in-process, which needs no pip. A genuine pip failure now refreshes hooks anyway and preserves the non-zero exit code.
  • Startup version-drift warning leads with the pip-free command (jcodemunch-mcp init --hooks).

No INDEX_VERSION bump. New tests/test_v1_108_84.py (11). Full suite 4964 passed / 7 skipped.