mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-21 16:18:55 +00:00
fix: migrate CLI kanban gate + remaining mocks to 5-value judge contract
Follow-up to the salvaged transport-failure auto-pause (#54387): the PR branch predates the CLI completion gate merged in #67985, so that new judge_goal consumer (hermes_cli/kanban.py) needed the 5-value unpack too — otherwise it would fail open again via the swallowed ValueError. Also migrates the two remaining 4-value mocks in tests/cli/test_cli_goal_interrupt.py flagged on the earlier PR #27760.
This commit is contained in:
parent
d401fd7251
commit
369afc60be
3 changed files with 9 additions and 8 deletions
|
|
@ -2016,10 +2016,11 @@ def _cmd_complete(args: argparse.Namespace) -> int:
|
|||
reason = ""
|
||||
try:
|
||||
# judge_goal returns (verdict, reason, parse_failed,
|
||||
# wait_directive) — see hermes_cli/goals.py. Unpacking
|
||||
# fewer raises ValueError into the fail-open handler
|
||||
# below, silently disabling the gate.
|
||||
verdict, reason, _, _ = judge_goal(
|
||||
# wait_directive, transport_failed) — see
|
||||
# hermes_cli/goals.py. Unpacking fewer raises
|
||||
# ValueError into the fail-open handler below,
|
||||
# silently disabling the gate.
|
||||
verdict, reason, _, _, _ = judge_goal(
|
||||
goal=f"{task.title}\n\n{task.body or ''}".strip(),
|
||||
last_response=(summary or args.result or "").strip(),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ class TestHealthyTurnStillRuns:
|
|||
# Force the judge to say "continue" without touching the network.
|
||||
with patch(
|
||||
"hermes_cli.goals.judge_goal",
|
||||
return_value=("continue", "needs more steps", False, None),
|
||||
return_value=("continue", "needs more steps", False, None, False),
|
||||
):
|
||||
cli._maybe_continue_goal_after_turn()
|
||||
|
||||
|
|
@ -189,7 +189,7 @@ class TestHealthyTurnStillRuns:
|
|||
|
||||
with patch(
|
||||
"hermes_cli.goals.judge_goal",
|
||||
return_value=("done", "goal satisfied", False, None),
|
||||
return_value=("done", "goal satisfied", False, None, False),
|
||||
):
|
||||
cli._maybe_continue_goal_after_turn()
|
||||
|
||||
|
|
|
|||
|
|
@ -347,10 +347,10 @@ class TestCLIJudgeGate:
|
|||
lambda name: _aux_client,
|
||||
)
|
||||
# Match the real judge_goal contract:
|
||||
# (verdict, reason, parse_failed, wait_directive)
|
||||
# (verdict, reason, parse_failed, wait_directive, transport_failed)
|
||||
monkeypatch.setattr(
|
||||
"hermes_cli.goals.judge_goal",
|
||||
lambda **kw: (verdict, reason, False, None),
|
||||
lambda **kw: (verdict, reason, False, None, False),
|
||||
)
|
||||
|
||||
args = argparse.Namespace(task_ids=["t1"], summary=summary, result=None, metadata=None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue