From 7b2ee129452833ce8a2380417358fe81c1bdf546 Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Mon, 26 Oct 2026 11:56:28 +0530 Subject: [PATCH] test(cli): describe the chat -q author forwarding as -Q parity, not a Kanban path Kanban workers do not run chat -q any more (the owner gateway authors their turns), so the comment and the test no longer name the Kanban spawn: the test moves to test_single_query_turn_author.py and uses a neutral bot author instead of bot:kanban, the id the owner-side constant avoids. --- hermes_cli/cli_single_query.py | 2 +- ...turn_author.py => test_single_query_turn_author.py} | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) rename tests/hermes_cli/{test_kanban_worker_turn_author.py => test_single_query_turn_author.py} (86%) diff --git a/hermes_cli/cli_single_query.py b/hermes_cli/cli_single_query.py index 17035db5b9..7d2b416ac1 100644 --- a/hermes_cli/cli_single_query.py +++ b/hermes_cli/cli_single_query.py @@ -546,7 +546,7 @@ def _run_single_query_mode(cli, query, image, quiet, oneshot, stream_json: bool if _query_label: cli.console.print(f"[bold blue]{t('cli.single_query.query_label')}[/] {_query_label}") cli._show_security_advisories() - # Same author contract as `-Q`: a dispatcher (the Kanban worker spawn) names who wrote this run's + # Same author contract as `-Q`: a spawner that sets HERMES_TURN_AUTHOR names who wrote this run's # prompts. Consumed before the first turn so tool subprocesses never inherit it; every turn of # the run (recovery and goal follow-ups included) carries it to memory providers. from agent.turn_author import take_turn_author_from_env diff --git a/tests/hermes_cli/test_kanban_worker_turn_author.py b/tests/hermes_cli/test_single_query_turn_author.py similarity index 86% rename from tests/hermes_cli/test_kanban_worker_turn_author.py rename to tests/hermes_cli/test_single_query_turn_author.py index 50f071e410..369f72970b 100644 --- a/tests/hermes_cli/test_kanban_worker_turn_author.py +++ b/tests/hermes_cli/test_single_query_turn_author.py @@ -33,7 +33,7 @@ def _one_shot_cli(monkeypatch): the_cli = cli.HermesCLI.__new__(cli.HermesCLI) the_cli.session_id = "s-1" - the_cli.conversation_history = [{"role": "user", "content": "work kanban task t_author"}] + the_cli.conversation_history = [{"role": "user", "content": "summarize the report"}] the_cli.agent = SimpleNamespace(run_conversation=Mock(side_effect=run_conversation)) the_cli._flush_credit_notices = lambda: None the_cli._single_query_mode = False @@ -51,14 +51,14 @@ def _one_shot_cli(monkeypatch): return the_cli, calls -def test_dispatcher_author_reaches_the_worker_turn_and_is_consumed(monkeypatch): - monkeypatch.setenv(TURN_AUTHOR_ENV, '{"id": "bot:kanban", "name": "Kanban dispatcher", "is_bot": true}') +def test_dispatcher_author_reaches_the_turn_and_is_consumed(monkeypatch): + monkeypatch.setenv(TURN_AUTHOR_ENV, '{"id": "bot:relay", "name": "relayed teammate", "is_bot": true}') the_cli, calls = _one_shot_cli(monkeypatch) with pytest.raises(SystemExit): - cli._run_single_query_mode(the_cli, "work kanban task t_author", None, False, True) + cli._run_single_query_mode(the_cli, "summarize the report", None, False, True) assert len(calls) == 1 - assert calls[0]["turn_author"] == {"id": "bot:kanban", "name": "Kanban dispatcher", "is_bot": True} + assert calls[0]["turn_author"] == {"id": "bot:relay", "name": "relayed teammate", "is_bot": True} # Tool subprocesses started during the turn must not inherit the dispatcher's author. assert calls[0]["env_author"] is None