diff --git a/plugin/adapter.py b/plugin/adapter.py index 35acafe..270478a 100644 --- a/plugin/adapter.py +++ b/plugin/adapter.py @@ -1195,6 +1195,8 @@ class RocketChatAdapter(BasePlatformAdapter): # ── CLARIFY Response Handling ─────────────────────────────────── # Handle CLARIFY button responses: CLARIFY:: or CLARIFY::other if is_clarify_response and text.startswith("CLARIFY:"): + routing_counter.increment('clarify_answer_bypass') + logger.info("ROUTING BYPASS: reason=clarify_answer_bypass, origin_room=%s", room_id) try: if "::" in text: # Neues Format: CLARIFY::: (via _build_custom_buttons) @@ -1428,6 +1430,8 @@ class RocketChatAdapter(BasePlatformAdapter): if not is_button_response: logger.debug("[rocketchat] Room %s had pending question — Archivar bypassed", room_id) logger.debug("[rocketchat] ARCHIVAR-DEBUG: Archivar bypassed — pending_questions") + routing_counter.increment('pending_questions_bypass') + logger.info("ROUTING BYPASS: reason=pending_questions_bypass, origin_room=%s", room_id) self._rooms_with_pending_questions.discard(room_id) elif self.archivar._state.should_stay_in_room(room_id) == "always": # Bug 4 fix: Persistierte Entscheidung (always) aus ArchivarState lesen. @@ -1492,6 +1496,8 @@ class RocketChatAdapter(BasePlatformAdapter): with _question_counter_lock: _question_counter += 1 except Exception as e: + routing_counter.increment('exception_fallback') + logger.info("ROUTING BYPASS: reason=exception_fallback, origin_room=%s", room_id) logger.debug("[rocketchat] Archivar classification skipped: %s", e) # ── User-Flow C: Nachricht kopieren, Antwort IMMER hier ──────── diff --git a/plugin/archivar/router.py b/plugin/archivar/router.py index fc81fa4..0da5407 100644 --- a/plugin/archivar/router.py +++ b/plugin/archivar/router.py @@ -714,6 +714,7 @@ class BidirectionalRouter: FAISS_AUTO_ROUTE, ) routing_counter.increment('faiss_butler') + logger.info("ROUTING DECISION: reason=faiss_butler, origin_room=%s, target_room=%s, stay=False, butler_mode=True", origin_room_id, top_room_id) # ── Schritt 4: Embedding-Vorfilter (binär) ──────────────────── # Nur noch binär: "Smalltalk" vs. "potenzieller Auftrag"