From 591ef06a8218f3915eee74ffa6db3a4cb58f303a Mon Sep 17 00:00:00 2001 From: Agent Zero Date: Mon, 14 Sep 2026 08:29:07 +0200 Subject: [PATCH] =?UTF-8?q?fix(outbox):=20Consumer-Registry=20zeigt=20qual?= =?UTF-8?q?name=20=E2=80=94=20unterscheidet=20gleichnamige=20Handler=20ueb?= =?UTF-8?q?er=20Plugins=20hinweg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/core/outbox.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/core/outbox.py b/app/core/outbox.py index 466a84d..5dcdd1d 100644 --- a/app/core/outbox.py +++ b/app/core/outbox.py @@ -212,11 +212,18 @@ def _json_payload(payload: dict[str, Any]) -> str: def _get_handler_name(handler: Any) -> str: - """Extract a human-readable name from a handler callable.""" - name = getattr(handler, "__name__", None) + """Extract a human-readable name from a handler callable. + + Prefers ``__qualname__`` (includes the owning class, e.g. + ``AutomationPlugin.on_contact_created``) over ``__name__`` so the + consumer registry distinguishes handlers that share a method name + across plugins (automation/unified_search/system_notif all define + ``on_contact_created`` — three distinct handlers, same short name). + """ + name = getattr(handler, "__qualname__", None) if name: return name - name = getattr(handler, "__qualname__", None) + name = getattr(handler, "__name__", None) if name: return name return str(handler)