From 09c327b5a14d9ed1c3c0cf44defc6f648c70a049 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Tue, 9 Jun 2026 16:13:14 +0200 Subject: [PATCH] fix(archivar): integrate '::' into bypass branch, not Archivar call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The uncommitted diff from 06.06. had a bug: '::' (button response marker) was placed in the wrong elif branch, routing it through the Archivar instead of bypassing it. Fixed: '::' detection moved into the top-level bypass condition alongside is_button_response and _rooms_with_pending_questions. The dead 'elif room_type == d and is_auftrag' guard removed (redundant — DM orders never reach this branch). Last elif promoted to else. --- plugin/adapter.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugin/adapter.py b/plugin/adapter.py index 9ca55e3..bbffb35 100644 --- a/plugin/adapter.py +++ b/plugin/adapter.py @@ -691,16 +691,14 @@ class RocketChatAdapter(BasePlatformAdapter): is_auftrag = _is_auftrag(text) try: - if is_button_response or room_id in self._rooms_with_pending_questions: - if not is_button_response: + if is_button_response or "::" in text or room_id in self._rooms_with_pending_questions: + if not is_button_response and "::" not in text: logger.debug("[rocketchat] Room %s had pending question — Archivar bypassed", room_id) self._rooms_with_pending_questions.discard(room_id) elif skip_archivar: logger.debug("[rocketchat] Archivar skipped — move-request just processed") elif room_id in self._sticky_rooms: logger.debug("[rocketchat] Room %s is sticky — Archivar bypassed", room_id[:8]) - elif room_type == "d" and is_auftrag: - logger.debug("[rocketchat] DM-Auftrag von %s — kein Routing", username) else: decision = await self.archivar.classify_and_route(text, origin_room_id=room_id) if decision and decision.category: