Skip to content

The agent that grows with you

fix(kanban): CLI link test covers the owner-handoff path

teknium1e6a8eb7f95aa
diff --git a/tests/hermes_cli/test_kanban_cli.py b/tests/hermes_cli/test_kanban_cli.py
index e44ca8cd27f..079148f1e91 100644
--- a/tests/hermes_cli/test_kanban_cli.py
+++ b/tests/hermes_cli/test_kanban_cli.py
@@ -92,10 +92,16 @@ def test_worker_link_preserves_foreign_child_rules(kanban_home, monkeypatch):
kc._cmd_link(argparse.Namespace(
parent_id=parent, child_id=running_child,
))
+ # Owner handoff: the worker links its own running card, proving ownership
+ # with HERMES_KANBAN_RUN_ID — the one path _cmd_link forwards a run id for.
+ assert kc._cmd_link(argparse.Namespace(
+ parent_id=parent, child_id=worker,
+ )) == 0
with kbc.connect_closing() as conn:
assert kb.parent_ids(conn, ready_child) == [parent]
assert kb.parent_ids(conn, running_child) == []
+ assert kb.parent_ids(conn, worker) == [parent]
def test_board_override_is_isolated_per_concurrent_call(kanban_home, monkeypatch):
diff --git a/tests/tools/test_kanban_complete_parents_tool.py b/tests/tools/test_kanban_complete_parents_tool.py
index 65054630aee..ddf094b8109 100644
--- a/tests/tools/test_kanban_complete_parents_tool.py
+++ b/tests/tools/test_kanban_complete_parents_tool.py
@@ -84,10 +84,3 @@ def test_cli_complete_names_unsatisfied_parent(running_child_with_parent, monkey
assert rc != 0
assert parent_id in out.out + out.err
assert "unknown id or terminal state" not in out.out + out.err
-
-
-def test_delegate_description_states_child_handoff_contract():
- """Spawn-time surfacing: the delegate_task schema tells the parent up front
- that a child cannot close tracked work and must hand back findings."""
- from tools.delegate_tool import _build_top_level_description
- assert "tracked work" in _build_top_level_description()