fix: R8 Origin-First Guard — 3 Auto-Route-Pfade entfernt

- 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)
This commit is contained in:
Bernd (Hermes)
2026-07-12 15:13:27 +02:00
parent 3f1d688983
commit 63ca3bed96
+13 -1
View File
@@ -153,13 +153,16 @@ class RoutingDecision:
Im neuen Flow (Embedding-Vorfilter + LLM-Raum-Router + Move-Request): Im neuen Flow (Embedding-Vorfilter + LLM-Raum-Router + Move-Request):
Routing erfolgt nur, wenn ein Zielraum gesetzt ist und kein 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 ( return (
not self.stay_in_room and not self.stay_in_room and
not self.is_meta and not self.is_meta and
not self.is_catch_all and not self.is_catch_all and
not self.is_unrouteable and not self.is_unrouteable and
not self.move_request_sent and
bool(self.target_room) bool(self.target_room)
) )
@@ -362,6 +365,9 @@ class BidirectionalRouter:
matched_room_name=matched_room.name, matched_room_name=matched_room.name,
source_room_notification=notification, source_room_notification=notification,
matched_keywords=matched_keywords, 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) ─ # ── Schritt 3.5: FAISS Phase-1 (Raum-Index + Keyword-Booster) ─
@@ -431,6 +437,9 @@ class BidirectionalRouter:
faiss_room_name=room.name, faiss_room_name=room.name,
is_faiss_routed=True, is_faiss_routed=True,
booster_applied=booster_applied, 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 # ── Score unter Schwelle → Fall-through zu Embedding + LLM
@@ -499,6 +508,9 @@ class BidirectionalRouter:
matched_room_name=matched_room.name, matched_room_name=matched_room.name,
source_room_notification=notification, source_room_notification=notification,
matched_keywords=matched_keywords, 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) ──────────── # ── Schritt 5: LLM-Raum-Router (zentraler Prompt) ────────────