TEIL 1 — booster.py:
- Split _keyword_to_rooms into _kw100_to_rooms + _kwctx_to_rooms
- keywords_100 matched via match_keyword_exact (no fuzzy/stemming, hyphen-insensitive)
- keywords_context matched via match_keyword (fuzzy/stemming preserved)
- _build_mapping() builds both mappings separately
- boost() uses separate matchers per keyword type
- _count_unique_matches() checks both mappings with respective matchers
- _record_matches() now takes only matched_kw100 (context keywords never tracked)
- cleanup_orphaned_rooms() rebuilds both mappings
TEIL 2 — room-map.json (data, not in git):
- Removed 39 space-variant dual keywords (e.g. 'presence engine' removed,
'presence-engine' kept). No longer needed since match_keyword_exact
is hyphen-insensitive.
- Backup: .bak-pre-curation-20260805
Tests: 35/35 passed (pytest -k booster)
Erweitert _sync_room_map_with_membership() um die von Andreas geforderten
Bereinigungsschritte nach room-map.json-GC:
1. FAISS-Index: rebuild + save (war bereits in M13, jetzt robuster)
2. KeywordBooster: cleanup_orphaned_rooms() — baut _keyword_to_rooms
Mapping aus bereinigter RoomMap neu
3. ArchivarState: cleanup_orphaned_rooms() — entfernt stay_decision,
keyword_weights, sticky_keywords, manual_overrides, promotion_candidates
für gelöschte Räume
4. Onboarding _stay_tracker: entfernt Einträge für gelöschte Räume
Reihenfolge im Gateway-Start (adapter.py connect()):
DDP connect → _sync_room_map_with_membership() → DDP subscribe →
Archivar init → Auto-Onboarding
Alle neuen Methoden sind idempotent und mit Tests abgedeckt:
- test_archivar_state.py: +8 Tests (cleanup_orphaned_rooms)
- test_booster.py: +4 Tests (cleanup_orphaned_rooms)