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:
@@ -1028,6 +1028,23 @@ class RoomMap:
|
||||
self._excluded_room_ids.add(room_id)
|
||||
self._version += 1
|
||||
|
||||
def add_excluded_room(self, room_id: str) -> None:
|
||||
"""Fügt eine room_id zu excluded_room_ids hinzu (idempotent).
|
||||
|
||||
P-086: Wird vom Onboarding-'Überspringen'-Flow genutzt, um einen
|
||||
übersprungenen Raum dauerhaft auszuklammern (überlebt Gateway-Restart).
|
||||
Im Gegensatz zu ``remove_room`` wird KEIN Eintrag in ``rooms{}``
|
||||
vorausgesetzt — der Raum kann (und wird typischerweise) noch gar nicht
|
||||
in der Map existieren.
|
||||
|
||||
Args:
|
||||
room_id: Die Raum-ID.
|
||||
"""
|
||||
if room_id in self._excluded_room_ids:
|
||||
return
|
||||
self._excluded_room_ids.add(room_id)
|
||||
self._version += 1
|
||||
|
||||
def increment_stay_count(self, room_id: str, keyword: str) -> int:
|
||||
"""Inkrementiert den stay-Count für ein Keyword.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user