The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(buzz): reconcile media pipeline with landed dispatch + threading contracts
Tekniumc816957a430e
diff --git a/plugins/platforms/buzz/adapter.py b/plugins/platforms/buzz/adapter.pyindex 816957313ed..74abfe29bc8 100644--- a/plugins/platforms/buzz/adapter.py+++ b/plugins/platforms/buzz/adapter.py@@ -1508,7 +1508,7 @@ class BuzzAdapter(BasePlatformAdapter):)if reply_target and self._reply_to_mode != "off":args += ["--reply-to", str(reply_target)]- code, out, err = await self._run_cli(args, input_text=caption or "")+ code, out, err = await self._run_message_send(args, caption or "")if code != 0:return SendResult(success=False,@@ -1576,7 +1576,7 @@ class BuzzAdapter(BasePlatformAdapter):)if reply_target and self._reply_to_mode != "off":args += ["--reply-to", str(reply_target)]- code, out, err = await self._run_cli(args, input_text=caption or "")+ code, out, err = await self._run_message_send(args, caption or "")if code != 0:return SendResult(success=False,diff --git a/tests/gateway/test_buzz_adapter.py b/tests/gateway/test_buzz_adapter.pyindex ab81874da4b..18587187f0a 100644--- a/tests/gateway/test_buzz_adapter.py+++ b/tests/gateway/test_buzz_adapter.py@@ -367,7 +367,7 @@ class TestMultiplexProfileScope:async def fake_exec(cli_path, args, *, relay_url, private_key, auth_tag="", input_text=None, timeout=None):calls["relay"] = relay_url- return 0, '{"event_id": "e1"}', ""+ return 0, '{"accepted": true, "event_id": "e1"}', ""monkeypatch.setattr(_buzz_mod, "_exec_buzz", fake_exec)monkeypatch.setattr(@@ -546,7 +546,7 @@ class TestMultiplexProfileScope:async def fake_exec(cli_path, args, *, relay_url, private_key, auth_tag="", input_text=None, timeout=None):calls["args"] = args- return 0, '{"event_id": "e1"}', ""+ return 0, '{"accepted": true, "event_id": "e1"}', ""monkeypatch.setattr(_buzz_mod, "_exec_buzz", fake_exec)monkeypatch.setattr(@@ -2224,6 +2224,7 @@ class TestBuzzAdapterSend:args, _stdin = cli.calls[0]assert args[args.index("--reply-to") + 1] == "stable-root"+ @pytest.mark.asyncio@pytest.mark.parametrize(("stdout", "error_fragment"),[@@ -3031,15 +3032,16 @@ class TestInboundMediaAuthorizationGate:CHANNEL,str(media),caption="caption",- reply_to="root-event",- metadata={"thread_id": "ignored-thread"},+ reply_to="latest-child",+ metadata={"thread_id": "stable-root"},)assert result.success is Trueassert result.message_id == "evt-media"args, stdin_text = cli.calls[0]assert args[args.index("--file") + 1] == str(media)- assert args[args.index("--reply-to") + 1] == "root-event"+ # Threading contract (#99429): stable thread root beats latest-child.+ assert args[args.index("--reply-to") + 1] == "stable-root"assert stdin_text == "caption"@pytest.mark.asyncio@@ -3466,7 +3468,7 @@ class TestStandaloneSend:captured = {}- async def fake_exec(cli_path, args, *, relay_url, private_key, input_text=None, timeout=30.0):+ async def fake_exec(cli_path, args, *, relay_url, private_key, auth_tag="", input_text=None, timeout=30.0):captured["args"] = argsreturn 0, json.dumps({"accepted": True, "event_id": "evt-media"}), ""