From 40d76592f51eabdd5871f21f4dc2cb7b7474b86d Mon Sep 17 00:00:00 2001 From: twentyOne2x Date: Wed, 22 Jul 2026 03:44:33 +0200 Subject: [PATCH] Pin GCP preflight to live Hermes interpreter --- deploy/sync-gcp-leoclean-runtime.sh | 2 +- tests/test_teleo_agent_systemd.py | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/deploy/sync-gcp-leoclean-runtime.sh b/deploy/sync-gcp-leoclean-runtime.sh index bb411ee..1b0ff51 100755 --- a/deploy/sync-gcp-leoclean-runtime.sh +++ b/deploy/sync-gcp-leoclean-runtime.sh @@ -17,7 +17,7 @@ SERVICE_HERMES_ROOT="${SERVICE_HERMES_ROOT:-/home/teleo/.hermes}" REMOTE_DROPIN_DIR="${REMOTE_DROPIN_DIR:-/etc/systemd/system/$SERVICE.d}" EXPECTED_VM_SERVICE_ACCOUNT="${EXPECTED_VM_SERVICE_ACCOUNT:-sa-teleo-prod-vm@teleo-501523.iam.gserviceaccount.com}" EXPECTED_HERMES_EXECUTABLE="${EXPECTED_HERMES_EXECUTABLE:-/home/teleo/.hermes/hermes-agent/venv/bin/hermes}" -EXPECTED_HERMES_PYTHON="${EXPECTED_HERMES_PYTHON:-/home/teleo/.hermes/hermes-agent/venv/bin/python3}" +EXPECTED_HERMES_PYTHON="${EXPECTED_HERMES_PYTHON:-/home/teleo/.hermes/hermes-agent/venv/bin/python}" WRAPPER_REL="hermes-agent/leoclean-bin/teleo-kb-gcp" TOOL_REL="hermes-agent/leoclean-bin/cloudsql_memory_tool.py" diff --git a/tests/test_teleo_agent_systemd.py b/tests/test_teleo_agent_systemd.py index f8f43cd..6a96661 100644 --- a/tests/test_teleo_agent_systemd.py +++ b/tests/test_teleo_agent_systemd.py @@ -69,6 +69,15 @@ def test_deploy_scripts_do_not_start_inactive_legacy_leo_agent(): assert "teleo-pipeline teleo-diagnostics teleo-agent@leo" not in manual_deploy +def test_gcp_runtime_pins_the_live_hermes_shebang_interpreter(): + script = (REPO_ROOT / "deploy" / "sync-gcp-leoclean-runtime.sh").read_text() + + assert ( + 'EXPECTED_HERMES_PYTHON="${EXPECTED_HERMES_PYTHON:-' + '/home/teleo/.hermes/hermes-agent/venv/bin/python}"' + ) in script + + def test_auto_deploy_prefers_github_remote_when_present(): auto_deploy = (REPO_ROOT / "deploy" / "auto-deploy.sh").read_text()