diff --git a/tests/tools/test_kanban_tools.py b/tests/tools/test_kanban_tools.py index 10eaef59695ce..e9ea181ec2a18 100644 --- a/tests/tools/test_kanban_tools.py +++ b/tests/tools/test_kanban_tools.py @@ -648,7 +648,9 @@ def test_complete_goal_mode_rejected_by_judge(monkeypatch, tmp_path): # Mock the judge to reject the completion. The gate only runs when a # judge is reachable, so force the availability probe True as well. def mock_judge_goal(goal, last_response, *, timeout=30.0, subgoals=None): - return "continue", "missing verification evidence", False + # Match the real judge_goal contract: + # (verdict, reason, parse_failed, wait_directive) + return "continue", "missing verification evidence", False, None monkeypatch.setattr("tools.kanban_tools.judge_goal", mock_judge_goal) monkeypatch.setattr("tools.kanban_tools._goal_judge_available", lambda: True) diff --git a/tools/kanban_tools.py b/tools/kanban_tools.py index 8d27522f18296..51fac3f8eaa2d 100644 --- a/tools/kanban_tools.py +++ b/tools/kanban_tools.py @@ -602,7 +602,12 @@ def _handle_complete(args: dict, **kw) -> str: verdict = "done" reason = "" try: - verdict, reason, _ = judge_goal( + # judge_goal returns (verdict, reason, parse_failed, + # wait_directive) — see hermes_cli/goals.py. Unpacking + # fewer raises ValueError, which the defensive handler + # below swallows, leaving verdict="done" and silently + # disabling the gate. + verdict, reason, _, _ = judge_goal( goal=f"{task.title}\n\n{task.body or ''}".strip(), last_response=(summary or result or "").strip(), )