From 7a4af2c41951fe843a52f9460ee153b8de5ee10d Mon Sep 17 00:00:00 2001 From: ciregenz Date: Wed, 19 Aug 2026 17:24:23 -0700 Subject: [PATCH] [eric] workflows: the restart-loop-guard pause notice called a nonexistent broadcast; it never reached the user (linter catch) --- backend/apps/agents/manager/session/SessionPersistence.py | 4 +++- backend/apps/workflows/notifier.py | 2 +- backend/tests/test_wedge_verdict.py | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/apps/agents/manager/session/SessionPersistence.py b/backend/apps/agents/manager/session/SessionPersistence.py index fad80790..dff427e1 100644 --- a/backend/apps/agents/manager/session/SessionPersistence.py +++ b/backend/apps/agents/manager/session/SessionPersistence.py @@ -67,7 +67,9 @@ class SessionPersistence(AgentManagerProtocol): that cannot resume just keeps its amber chip.""" for sid in list(getattr(self, "crash_resume_queue", []) or []): try: - await self.send_message( + # send_message lives on the Messaging mixin; AgentManager composes both. + p_send = getattr(self, "send_message") + await p_send( sid, "[Automated message from OpenSwarm itself, not written by your user] The app " "restarted while you were mid-task; nothing was lost. Continue exactly where " diff --git a/backend/apps/workflows/notifier.py b/backend/apps/workflows/notifier.py index 108c95f4..e4d3d726 100644 --- a/backend/apps/workflows/notifier.py +++ b/backend/apps/workflows/notifier.py @@ -42,7 +42,7 @@ def notify_workflow_paused_by_guard(wf: Workflow) -> None: "workflow, then re-enable its schedule."), } asyncio.get_running_loop().create_task( - ws_manager.broadcast("workflow:schedule_paused_by_guard", payload)) + ws_manager.broadcast_global("workflow:schedule_paused_by_guard", payload)) except Exception: logger.debug("guard-pause notify failed", exc_info=True) diff --git a/backend/tests/test_wedge_verdict.py b/backend/tests/test_wedge_verdict.py index ae9f7a6a..0806a3ea 100644 --- a/backend/tests/test_wedge_verdict.py +++ b/backend/tests/test_wedge_verdict.py @@ -3,7 +3,6 @@ be shot at the first deadline; a stale one must; nothing survives the late deadl kills in one loaded evening were every one of the "MCP disconnected" reports.""" import os import tempfile -import time from backend.apps.agents.manager.streaming.unwedge_sidecar import ( HEARTBEAT_FRESH_S, LATE_WEDGE_SECONDS,