diff --git a/services/hermes/agent-deployment.yaml b/services/hermes/agent-deployment.yaml index 7e700f4c..3d8cd0da 100644 --- a/services/hermes/agent-deployment.yaml +++ b/services/hermes/agent-deployment.yaml @@ -25,7 +25,7 @@ spec: ai.bstein.dev/execution: Hermes Kanban with durable direct Codex and Claude Code CLI workers ai.bstein.dev/model-policy: Jetson-assisted AUTO routing, low through xhigh, cross-provider fallback ai.bstein.dev/placement: rpi5 preferred; Jetson deferred until state storage is available - ai.bstein.dev/config-rev: "20260816-review-findings-contract-v4" + ai.bstein.dev/config-rev: "20260816-goal-judge-timeout-v5" prometheus.io/scrape: "true" prometheus.io/path: /metrics prometheus.io/port: "9010" diff --git a/services/hermes/scripts/cli_lane_goal.py b/services/hermes/scripts/cli_lane_goal.py index 230d2a43..cc96ea79 100644 --- a/services/hermes/scripts/cli_lane_goal.py +++ b/services/hermes/scripts/cli_lane_goal.py @@ -19,6 +19,10 @@ GOAL_JUDGE_MODEL = os.environ.get( "HERMES_GOAL_JUDGE_MODEL", "qwen2.5:14b-instruct-q4_0", ) +GOAL_JUDGE_TIMEOUT_SECONDS = max( + 30, + min(180, int(os.environ.get("HERMES_GOAL_JUDGE_TIMEOUT_SECONDS", "120"))), +) RESULT_STATUSES = frozenset({"completed", "blocked", "incomplete"}) GOAL_JUDGE_SCHEMA: dict[str, Any] = { "type": "object", @@ -129,7 +133,7 @@ def judge_goal_completion( method="POST", ) try: - with open_request(request, timeout=60) as response: + with open_request(request, timeout=GOAL_JUDGE_TIMEOUT_SECONDS) as response: document = json.load(response) content = document["choices"][0]["message"]["content"] verdict = json.loads(content) diff --git a/testing/tests/test_hermes_cli_lane_goal.py b/testing/tests/test_hermes_cli_lane_goal.py index 7acadffc..24bea93d 100644 --- a/testing/tests/test_hermes_cli_lane_goal.py +++ b/testing/tests/test_hermes_cli_lane_goal.py @@ -106,7 +106,7 @@ def test_goal_judge_uses_local_structured_verdict(): assert reason == "remote head evidence is missing" assert observed["payload"]["model"] == "qwen2.5:14b-instruct-q4_0" assert observed["payload"]["response_format"]["json_schema"]["strict"] is True - assert observed["timeout"] == 60 + assert observed["timeout"] == 120 def test_goal_judge_fails_closed_on_invalid_response():