STAY wird wieder zu 'passt hier' (sicher) — stay_in_room OHNE Red Flag,
unabhängig von der Raumzahl. UNSICHER wird zum expliziten Red-Flag-Trigger
(>=1 Raum statt >1). Timeout (llm_unavailable) bleibt Red Flag bei >1 Raum.
- config.py: LLM_ROOM_PROMPT mit drei Antwortmöglichkeiten (STAY/UNSICHER/Raum-ID)
- router.py: _llm_room_lookup parst UNSICHER als drittes Token (reason='unsicher')
- router.py: STAY-Branch → stay_in_room ohne Red Flag; UNSICHER-Branch → Red Flag
- router.py: _build_red_flag_decision kennt reason='llm_unsicher'
- routing_telemetry.py: Timeout als decision='timeout' (nicht mit STAY vermischt)
- Tests: 11 neue Tests (test_unsicher_red_flag.py) + bestehende STAY-Tests auf
neue Semantik umgestellt
Abnahmekriterien t_f81acd6f: STAY ohne Red Flag, UNSICHER mit Red Flag,
STAY bei 4 Alternativräumen ohne Red Flag, UNSICHER bei 1 Alternativraum mit
Red Flag, Timeout bei >1 mit Red Flag, Parser erkennt UNSICHER.
Two fixes in test_v8_4.py:
1. _make_router() now uses a temp state file (/tmp/archivar_test_state.json)
instead of the default ArchivarState() path. This isolates tests from
persisted never_route entries that were blocking keyword-match routing.
2. test_red_flag_not_triggered_when_keyword_matches: changed test message
from "Bitte dokumentiere das neue Feature" to "Bitte erstelle eine
Dokumentation für das neue Feature" so the 100% keyword "dokumentation"
actually appears as a substring (find_room_by_keywords uses substring
matching, not stemming).
Result: 24/24 V8.4 tests passed. Full suite: 566 passed, 1 pre-existing
failure (test_no_env_vars — ARCHIVAR_PROJECT_ROOMS env var), 2 skipped.