Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(dispatcher): persist suppressed notices

cyh478c058d1187
diff --git a/core/message_dispatcher.py b/core/message_dispatcher.py
index 4b57acad7..c349ff500 100644
--- a/core/message_dispatcher.py
+++ b/core/message_dispatcher.py
@@ -341,8 +341,8 @@ class ConsolidatedMessageDispatcher:
if (context.platform_specific or {}).get("suppress_delivery"):
message_id = f"suppressed:{(context.platform_specific or {}).get('task_execution_id') or canonical_type}"
+ self._record_suppressed_run_message(context, text, message_id)
if canonical_type == "result":
- self._record_suppressed_run_message(context, text, message_id)
await self._clear_consolidated_state(context)
return message_id
diff --git a/tests/test_message_dispatcher_scheduled.py b/tests/test_message_dispatcher_scheduled.py
index 1d275599d..5238821c8 100644
--- a/tests/test_message_dispatcher_scheduled.py
+++ b/tests/test_message_dispatcher_scheduled.py
@@ -164,6 +164,40 @@ class MessageDispatcherScheduledTests(unittest.IsolatedAsyncioTestCase):
],
)
+ async def test_suppressed_notify_records_private_run_output(self):
+ controller = _StubController()
+ dispatcher = ConsolidatedMessageDispatcher(controller)
+ context = MessageContext(
+ user_id="scheduled",
+ channel_id="C123",
+ platform="slack",
+ platform_specific={
+ "suppress_delivery": True,
+ "task_execution_id": "run-1",
+ },
+ )
+ calls = []
+
+ class _Store:
+ def record_run_message(self, run_id, *, text, message_id=None):
+ calls.append(("record", run_id, text, message_id))
+
+ def close(self):
+ calls.append(("close",))
+
+ with patch.object(message_dispatcher_module, "SQLiteBackgroundTaskStore", return_value=_Store()):
+ message_id = await dispatcher.emit_agent_message(context, "notify", "auth recovery required")
+
+ self.assertEqual(message_id, "suppressed:run-1")
+ self.assertEqual(controller.im_client.sent, [])
+ self.assertEqual(
+ calls,
+ [
+ ("record", "run-1", "auth recovery required", "suppressed:run-1"),
+ ("close",),
+ ],
+ )
+
async def test_delivery_override_sends_result_to_parent_channel(self):
controller = _StubController()
dispatcher = ConsolidatedMessageDispatcher(controller)