Skip to content

The agent that grows with you

test(buzz): cover progress reply CLI boundary

Reinhold367c13ad5c2e
diff --git a/tests/gateway/test_buzz_adapter.py b/tests/gateway/test_buzz_adapter.py
index 99beab806f0..7da16bf268a 100644
--- a/tests/gateway/test_buzz_adapter.py
+++ b/tests/gateway/test_buzz_adapter.py
@@ -854,6 +854,22 @@ class TestBuzzAdapterSend:
# Our own event id is marked seen for echo suppression
assert "evt123" in adapter._channel_state[CHANNEL]["seen"]
+ @pytest.mark.asyncio
+ async def test_send_metadata_thread_id_uses_reply_to_flag(self):
+ adapter = _make_adapter()
+ cli = _ScriptedCli()
+ cli.script("messages", "send", {"accepted": True, "event_id": "evt124", "message": ""})
+ adapter._run_cli = cli
+
+ result = await adapter.send(
+ CHANNEL,
+ "working",
+ metadata={"thread_id": "buzz-event-123"},
+ )
+
+ assert result.success is True
+ args, _stdin = cli.calls[0]
+ assert args[args.index("--reply-to") + 1] == "buzz-event-123"
@pytest.mark.asyncio
async def test_send_image_local_file_uses_file_flag(self, tmp_path):