tune(P2): adaptive pause factor ×3 → ×6 (V7-5: 30 Min bei 5-Min-Abstand)

This commit is contained in:
Bernd (Hermes)
2026-08-13 16:54:38 +02:00
parent 4ad0cf56ca
commit 0ac503190b
+6 -4
View File
@@ -651,7 +651,9 @@ class ArchivarState:
Drei Verfall-Trigger: Drei Verfall-Trigger:
1. 24h Timeout: last_extended älter als 24h → VERBLASST (hard limit) 1. 24h Timeout: last_extended älter als 24h → VERBLASST (hard limit)
2. Adaptive Pause: Inaktivität > Median(Nachrichten-Abstände) × 3 → VERBLASST 2. Adaptive Pause: Inaktivität > Median(Nachrichten-Abstände) × 6 → VERBLASST
Faktor 6: bei 5-Min-Abstand (300s) → 30 Min Verfall (V7-5 Spec).
Bei 30-Min-Abstand (1800s) → 3 Std Verfall (weit unter 24h hard limit).
3. Themenwechsel: wird in router.py behandelt (nicht hier) 3. Themenwechsel: wird in router.py behandelt (nicht hier)
Args: Args:
@@ -697,19 +699,19 @@ class ArchivarState:
conversation_history, room_id conversation_history, room_id
) )
if median_gap is not None: if median_gap is not None:
# Prüfe: now - last_extended > median × 3 # Prüfe: now - last_extended > median × 6
if last_extended_str: if last_extended_str:
try: try:
last_extended = datetime.fromisoformat( last_extended = datetime.fromisoformat(
last_extended_str last_extended_str
) )
gap = (now - last_extended).total_seconds() gap = (now - last_extended).total_seconds()
if gap > median_gap * 3: if gap > median_gap * 6:
expired = True expired = True
reason = ( reason = (
f"adaptive pause " f"adaptive pause "
f"(gap={gap:.0f}s > " f"(gap={gap:.0f}s > "
f"median={median_gap:.0f}s × 3)" f"median={median_gap:.0f}s × 6)"
) )
except (ValueError, TypeError): except (ValueError, TypeError):
pass pass