From 63ca3bed96181337249173dce76317de37011576 Mon Sep 17 00:00:00 2001 From: "Bernd (Hermes)" Date: Sun, 12 Jul 2026 15:13:27 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20R8=20Origin-First=20Guard=20=E2=80=94=20?= =?UTF-8?q?3=20Auto-Route-Pfade=20entfernt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Keyword Schritt 3: Cross-Room → move_request_sent=True + STAY - FAISS Schritt 3.5: Cross-Room → move_request_sent=True + STAY - Hybrid Schritt 4.5: Cross-Room → move_request_sent=True + STAY - should_route(): not move_request_sent als Bedingung - Same-Room-Match wird noch geroutet (korrekt) - move_request_target_{name,id} für Butler-Button gesetzt Rainer-Quality-Loop: freigegeben (1 Iteration, alle 4 Stellen korrekt) --- plugin/archivar/router.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/plugin/archivar/router.py b/plugin/archivar/router.py index 1e493c7..ff2cbb9 100644 --- a/plugin/archivar/router.py +++ b/plugin/archivar/router.py @@ -153,13 +153,16 @@ class RoutingDecision: Im neuen Flow (Embedding-Vorfilter + LLM-Raum-Router + Move-Request): Routing erfolgt nur, wenn ein Zielraum gesetzt ist und kein - stay_in_room/meta/catch_all/unrouteable vorliegt. + stay_in_room/meta/catch_all/unrouteable/move_request_sent vorliegt. + move_request_sent=True bedeutet: Butler-Prinzip aktiv — erst auf + Button-Antwort warten, nicht direkt routen. """ return ( not self.stay_in_room and not self.is_meta and not self.is_catch_all and not self.is_unrouteable and + not self.move_request_sent and bool(self.target_room) ) @@ -362,6 +365,9 @@ class BidirectionalRouter: matched_room_name=matched_room.name, source_room_notification=notification, matched_keywords=matched_keywords, + move_request_sent=True, + move_request_target_name=matched_room.name, + move_request_target_id=matched_room.room_id, ) # ── Schritt 3.5: FAISS Phase-1 (Raum-Index + Keyword-Booster) ─ @@ -431,6 +437,9 @@ class BidirectionalRouter: faiss_room_name=room.name, is_faiss_routed=True, booster_applied=booster_applied, + move_request_sent=True, + move_request_target_name=room.name, + move_request_target_id=top_room_id, ) # ── Score unter Schwelle → Fall-through zu Embedding + LLM @@ -499,6 +508,9 @@ class BidirectionalRouter: matched_room_name=matched_room.name, source_room_notification=notification, matched_keywords=matched_keywords, + move_request_sent=True, + move_request_target_name=matched_room.name, + move_request_target_id=matched_room.room_id, ) # ── Schritt 5: LLM-Raum-Router (zentraler Prompt) ────────────