The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(local-runtime): CI failures — Linux asset names, GPU-less runners, subprocess encoding
emozilla6d6659811233
diff --git a/hermes_cli/local_runtime/binaries.py b/hermes_cli/local_runtime/binaries.pyindex 26e56b2d7c9..cfe8b6f089e 100644--- a/hermes_cli/local_runtime/binaries.py+++ b/hermes_cli/local_runtime/binaries.py@@ -229,7 +229,8 @@ def verify_install(install_dir: Path, tag: str) -> str:"""Run --version; require the tag's build number in the output.(The binary prints the tag WITHOUT the 'b' prefix.)"""exe = server_binary(install_dir)- out = subprocess.run([str(exe), "--version"], capture_output=True, text=True,+ out = subprocess.run([str(exe), "--version"], capture_output=True,+ text=True, encoding="utf-8", errors="replace",timeout=60, cwd=str(exe.parent))text = (out.stdout + out.stderr).strip()if tag.lstrip("b") not in text:diff --git a/tests/hermes_cli/test_local_models_routes.py b/tests/hermes_cli/test_local_models_routes.pyindex 6eb5217c41d..460b73c96d3 100644--- a/tests/hermes_cli/test_local_models_routes.py+++ b/tests/hermes_cli/test_local_models_routes.py@@ -140,6 +140,17 @@ def test_download_job_lifecycle_with_sha_failure(client, monkeypatch):monkeypatch.setattr("urllib.request.urlopen",lambda *a, **k: FakeResponse(b"not the real body"))+ # Pin a generous budget: variant selection prices against the machine+ # running the test, and a GPU-less CI runner honestly refuses every+ # build (409) — this test is about the download path, not selection.+ from hermes_cli.local_runtime.estimator import HardwareBudget++ budget = HardwareBudget(usable_vram_bytes=64 << 30,+ total_device_bytes=64 << 30,+ ram_available_bytes=64 << 30)+ monkeypatch.setattr("hermes_cli.local_runtime.hardware.probe_budget",+ lambda **kw: budget)+from hermes_cli.local_runtime.catalog import CATALOGentry_id = CATALOG[0].iddiff --git a/tests/hermes_cli/test_local_runtime.py b/tests/hermes_cli/test_local_runtime.pyindex 9242f493dff..d8cc03f9de2 100644--- a/tests/hermes_cli/test_local_runtime.py+++ b/tests/hermes_cli/test_local_runtime.py@@ -232,11 +232,15 @@ def test_sha256_mismatch_rejects(tmp_path, monkeypatch):from hermes_cli.local_runtime import binariesmonkeypatch.setenv("HERMES_HOME", str(tmp_path / ".hermes"))- # Pre-place a wrong-content "download" so no network is touched.+ # Pre-place a wrong-content "download" so no network is touched. The+ # asset name is host-dependent (win/.zip, ubuntu/.tar.gz, macos/.zip)+ # — resolve it the way the installer will, so the poisoned file is the+ # one it verifies on every CI platform.+ plan = binaries.resolve_assets("b10290", "cpu")+ asset = plan.assets[0]downloads = binaries.runtimes_root() / "downloads"downloads.mkdir(parents=True)- asset = "llama-b10290-bin-win-cpu-x64.zip"- (downloads / asset).write_bytes(b"not the real zip")+ (downloads / asset).write_bytes(b"not the real archive")with pytest.raises(BinaryResolutionError, match="sha256 mismatch"):binaries.ensure_runtime_installed("b10290", "cpu",