The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(update): drop the --reinstall plumbing; a plain editable install already rewrites the finder
teknium17cf0afdf980b
diff --git a/hermes_cli/main_install_repair.py b/hermes_cli/main_install_repair.pyindex 33e17f0bc95..6e1fd553530 100644--- a/hermes_cli/main_install_repair.py+++ b/hermes_cli/main_install_repair.py@@ -951,8 +951,7 @@ def _interpreter_scripts_dir() -> Path | None:def _install_python_dependencies_with_optional_fallback(- install_cmd_prefix: list[str], *, env: dict[str, str] | None = None, group: str = "all",- reinstall: bool = False,+ install_cmd_prefix: list[str], *, env: dict[str, str] | None = None, group: str = "all") -> None:"""Install base deps plus as many optional extras as the environment supports.@@ -981,8 +980,6 @@ def _install_python_dependencies_with_optional_fallback(scripts_dir = _interpreter_scripts_dir()def _install(args: list[str]) -> None:- if reinstall:- args = [args[0], "--reinstall", *args[1:]]if pin_python:args = _insert_python_pin(args)# strict_quarantine: this is the UPDATE dependency sync; ShimQuarantineError propagatesdiff --git a/hermes_cli/update_cmd_deps.py b/hermes_cli/update_cmd_deps.pyindex 1bacabf4e4d..c0c47261dd3 100644--- a/hermes_cli/update_cmd_deps.py+++ b/hermes_cli/update_cmd_deps.py@@ -1199,7 +1199,6 @@ def _sync_python_dependencies_after_pull(# by the next launch (``_recover_from_interrupted_install``). Lazy refresh uses its own marker._write_update_incomplete_marker()deps_current = _editable_install_is_current(git_cmd, _m().PROJECT_ROOT, pre_pull_sha)- mapping_current = _editable_finder_mapping_current(_m().PROJECT_ROOT)print("→ Python dependencies unchanged — skipping reinstall" if deps_currentelse "→ Updating Python dependencies...")@@ -1232,8 +1231,7 @@ def _sync_python_dependencies_after_pull(print(" → Termux/Android detected: prebuilding psutil with Linux source path compatibility...")_install_psutil_android_compat(install_prefix, env=lazy_env)_m()._install_python_dependencies_with_optional_fallback(- install_prefix, env=lazy_env, group=install_group,- reinstall=mapping_current is False)+ install_prefix, env=lazy_env, group=install_group)# Clear the core breadcrumb before lazy refresh, which uses its own marker so a lazy# failure can't be "healed" by a narrow core import probe.diff --git a/tests/hermes_cli/test_update_skip_unchanged_editable_install.py b/tests/hermes_cli/test_update_skip_unchanged_editable_install.pyindex b781b2c0fee..3ab43556d5e 100644--- a/tests/hermes_cli/test_update_skip_unchanged_editable_install.py+++ b/tests/hermes_cli/test_update_skip_unchanged_editable_install.py@@ -116,30 +116,6 @@ def test_unreadable_finder_fails_closed(repo, monkeypatch):assert _editable_install_is_current(GIT, repo, before) is False-def test_mapping_drift_requests_reinstall_flag():- from hermes_cli.main_install_repair import _install_python_dependencies_with_optional_fallback-- recorded = []- monkeypatch = pytest.MonkeyPatch()- monkeypatch.setattr(- "hermes_cli.main_install_repair._run_quarantined_install",- lambda cmd, **kwargs: recorded.append(cmd),- )- monkeypatch.setattr(- "hermes_cli.main_install_repair._verify_console_scripts_installed",- lambda *args, **kwargs: None,- )- monkeypatch.setattr("hermes_cli.main_install_repair._is_windows", lambda: False)- try:- _install_python_dependencies_with_optional_fallback(["uv", "pip"], reinstall=True)- assert recorded and "--reinstall" in recorded[0]- recorded.clear()- _install_python_dependencies_with_optional_fallback(["uv", "pip"], reinstall=False)- assert recorded and "--reinstall" not in recorded[0]- finally:- monkeypatch.undo()--def test_source_only_pull_skips_the_reinstall(repo):"""The common update: .py churn inside already-mapped packages."""before = _head(repo)