Skip to content

The agent that grows with you

test(gateway): trim block-loop wording coverage to two invariants; CLI keeps the needs_input distinction

teknium18b9df066e2b5
diff --git a/apps/desktop/src/plugins/kanban/completion-notify.ts b/apps/desktop/src/plugins/kanban/completion-notify.ts
index 9d97688d4e1..bc579196112 100644
--- a/apps/desktop/src/plugins/kanban/completion-notify.ts
+++ b/apps/desktop/src/plugins/kanban/completion-notify.ts
@@ -9,7 +9,7 @@
* (gateway/kanban_watchers.py): 'completed' (kanban_db.complete_task —
* payload: summary + artifacts), 'blocked' (payload: reason), 'gave_up'
* (payload: error), 'crashed', 'timed_out', and 'block_loop_detected'
- * (payload: reason — the routed-to-triage human handoff).
+ * (payload: reason — the routed-to-triage orchestration handoff).
*
* Two delivery doors, complementary by design:
* - `host.notify` — the in-app toast, covers the foreground case;
diff --git a/hermes_cli/kanban.py b/hermes_cli/kanban.py
index 0f90462d4b8..a9f66b92522 100644
--- a/hermes_cli/kanban.py
+++ b/hermes_cli/kanban.py
@@ -919,7 +919,9 @@ def _cmd_block(args: argparse.Namespace) -> int:
if where == "todo":
return f"{tid} → todo (dependency wait){suffix}"
if where == "triage":
- return f"{tid} → triage (unblock loop detected — orchestration attention needed){suffix}"
+ # Only a typed owner-input block carries a question for a human.
+ verdict = "needs a human decision" if kind == "needs_input" else "orchestration attention needed"
+ return f"{tid} → triage (unblock loop detected — {verdict}){suffix}"
return f"Blocked {tid}{suffix}"
op = _commented(conn, reason, author, "BLOCKED", lambda tid: kb.block_task(
diff --git a/tests/gateway/test_kanban_notifier.py b/tests/gateway/test_kanban_notifier.py
index 1c7093775a9..ce5683902fe 100644
--- a/tests/gateway/test_kanban_notifier.py
+++ b/tests/gateway/test_kanban_notifier.py
@@ -2,8 +2,6 @@ import asyncio
import sqlite3
from pathlib import Path
-import pytest
-
from gateway.config import Platform
from gateway.kanban_watchers_common import (
@@ -653,22 +651,14 @@ def _fmt_block_loop(payload):
return msg
- "kind",
- ["dependency", "capability", "transient", None],
-)
-def test_block_loop_non_owner_input_uses_neutral_orchestration_wording(kind):
- """Orchestration/technical block kinds must NOT claim a human decision.
-
- Regression for #111125: before this fix every `block_loop_detected` was
- rendered as \"needs a human decision\" regardless of its typed reason. A
- dependency wait, capability gap, or transient failure routed to triage is
- an orchestration handoff with no question for the owner.
- """
- payload = {"reason": "waiting on upstream", "kind": kind, "recurrences": 2}
+def test_block_loop_technical_kind_uses_neutral_orchestration_wording():
+ """A repeated technical block (transient/capability/untyped) routed to
+ triage is an orchestration handoff with no question for the owner, so the
+ ping must not claim a human decision (#111125)."""
+ payload = {"reason": "waiting on upstream", "kind": "transient", "recurrences": 2}
msg = _fmt_block_loop(payload)
assert "for orchestration attention" in msg
- assert "needs a human decision" not in msg
+ assert "human decision" not in msg
# Circuit-breaker visibility is preserved.
assert "TRIAGE" in msg
assert "waiting on upstream" in msg