P-086: Onboarding respektiert excluded_rooms + Überspringen persistiert
Fix 1 (archivar/onboarding.py):
- check_room_map_completeness() prüft zusätzlich room_map.is_excluded(room_id)
im missing-Loop → excluded Räume werden nicht mehr als missing gemeldet.
- Single-Room-Regel: excluded Raum wird nicht mehr als catch_all auto-assigned.
Fix 2 (adapter.py):
- _persist_excluded_rooms() Helper persistiert room_ids in room-map.json
→ excluded_rooms (idempotent, save+reload).
- 'Überspringen' (Einzelraum) und 'Alle überspringen' rufen den Helper auf,
sodass der Entscheid einen Gateway-Restart überlebt (kein B9-Re-Trigger).
RoomMap (archivar/room_map.py):
- add_excluded_room() Methode (idempotent, kein rooms{}-Eintrag nötig).
Tests: test_p086_excluded_rooms.py (6 neue Tests).
This commit is contained in:
@@ -370,6 +370,15 @@ def check_room_map_completeness(
|
||||
# nicht in der Map ist → automatisch als catch_all eintragen
|
||||
if len(relevant_rooms) == 1:
|
||||
single_room_id = list(relevant_rooms.keys())[0]
|
||||
# P-086: Ein excluded Raum darf NICHT via Single-Room-Regel als
|
||||
# catch_all auto-assigned werden — er ist bewusst ausgeklammert.
|
||||
if room_map.is_excluded(single_room_id):
|
||||
logger.info(
|
||||
"check_room_map_completeness: Einziger Raum '%s' ist excluded "
|
||||
"— kein Auto-Assign, kein Onboarding-Trigger",
|
||||
relevant_rooms[single_room_id].get("name", single_room_id),
|
||||
)
|
||||
return []
|
||||
if single_room_id not in room_map.rooms:
|
||||
global _single_room_catch_all_overwrite_attempted
|
||||
_single_room_catch_all_overwrite_attempted += 1
|
||||
@@ -490,6 +499,15 @@ def check_room_map_completeness(
|
||||
room_info.get("name", room_id),
|
||||
)
|
||||
continue
|
||||
# P-086: excluded_rooms berücksichtigen — ein excluded Raum ist
|
||||
# NICHT missing (kein Onboarding-Trigger, kein B9-Reconnect-Loop).
|
||||
if room_map.is_excluded(room_id):
|
||||
logger.info(
|
||||
"check_room_map_completeness: Raum '%s' ist excluded "
|
||||
"— kein Onboarding-Trigger",
|
||||
room_info.get("name", room_id),
|
||||
)
|
||||
continue
|
||||
if room_id not in room_map.rooms:
|
||||
missing.append({"room_id": room_id, "name": room_info["name"]})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user