The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(update): CI reds from round 3: no user uv in the syntax check, custody-aware test seams
Tekniumce0b40610a46
diff --git a/hermes_cli/update_cmd_commit.py b/hermes_cli/update_cmd_commit.pyindex 57d275c3959..9be532f73d4 100644--- a/hermes_cli/update_cmd_commit.py+++ b/hermes_cli/update_cmd_commit.py@@ -432,16 +432,13 @@ def _run_python(argv: list[str], *, stdin: str = "", timeout: float = 60) -> strdef _admitted_python(spec: str) -> str | None:- """An installed interpreter the target's ``requires-python`` admits (uv's view first, then- ``python3.N`` on PATH, newest first), or None when this machine has none."""- import shutil+ """An installed ``python3.N`` the target's ``requires-python`` admits (newest first), or None+ when this machine has none. No uv tier: Hermes never resolves the user's uv+ (tests/test_managed_runtime_resolution.py), and a missing interpreter only means this one judges."""+ from hermes_platform.resolver import locate_command- candidates = []- if uv := shutil.which("uv"):- found = (_run_python([uv, "python", "find", "--no-project", spec], timeout=30) or "").strip()- candidates += found.splitlines()[-1:]- candidates += [path for minor in range(40, sys.version_info[1], -1)- if (path := shutil.which(f"python3.{minor}"))][:3]+ candidates = [res.command[0] for minor in range(40, sys.version_info[1], -1)+ if (res := locate_command(f"python3.{minor}")).command][:3]for python in candidates:version = (_run_python([python, "-I", "-c", _PYTHON_VERSION], timeout=30) or "").strip()if version and _spec_admits(spec, version):diff --git a/tests/hermes_cli/test_desktop_exe_integrity.py b/tests/hermes_cli/test_desktop_exe_integrity.pyindex fd6ed52b60d..26d2d6f43f0 100644--- a/tests/hermes_cli/test_desktop_exe_integrity.py+++ b/tests/hermes_cli/test_desktop_exe_integrity.py@@ -329,6 +329,8 @@ def test_build_only_fails_when_pack_produces_corrupt_exe(tmp_path, monkeypatch,def pack_into_staging(cmd, *args, **kwargs):assert kwargs["env"]["PATH"].startswith("C:\\pm-pinned-git\\cmd;")+ # The build holds the checkout lock, so npm arrives wrapped in the custody launcher.+ cmd = cmd[cmd.index("/usr/bin/npm"):] if "/usr/bin/npm" in cmd else cmdif cmd[1:3] != ["run", "builder"]:return subprocess.CompletedProcess(list(cmd), 0)# electron-builder honours -c.directories.output=<staging>; emulate adiff --git a/tests/hermes_cli/test_update_lock_windows_live.py b/tests/hermes_cli/test_update_lock_windows_live.pyindex c8beddd8028..7f6262b206c 100644--- a/tests/hermes_cli/test_update_lock_windows_live.py+++ b/tests/hermes_cli/test_update_lock_windows_live.py@@ -539,6 +539,9 @@ def test_the_old_updater_runs_its_takeover_in_the_job(tmp_path, monkeypatch, cap# --- C3: a normal release never frees the checkout under a build descendant ------------------+# The launcher's own argv says "hermes: update custody", which the live-system guard reads as+# `hermes update`; this test runs it in-process against a tmp_path checkout, never a real one.[email protected]_system_guard_bypassdef test_a_build_descendant_left_by_its_leader_never_writes_after_a_normal_release(tmp_path):"""C3: npm exits while a builder grandchild it started keeps running. The launcher returnsonly once that grandchild is gone, so after the owner's ordinary release a contender