tune(P2): adaptive pause factor ×3 → ×6 (V7-5: 30 Min bei 5-Min-Abstand)
This commit is contained in:
@@ -651,7 +651,9 @@ class ArchivarState:
|
||||
|
||||
Drei Verfall-Trigger:
|
||||
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)
|
||||
|
||||
Args:
|
||||
@@ -697,19 +699,19 @@ class ArchivarState:
|
||||
conversation_history, room_id
|
||||
)
|
||||
if median_gap is not None:
|
||||
# Prüfe: now - last_extended > median × 3
|
||||
# Prüfe: now - last_extended > median × 6
|
||||
if last_extended_str:
|
||||
try:
|
||||
last_extended = datetime.fromisoformat(
|
||||
last_extended_str
|
||||
)
|
||||
gap = (now - last_extended).total_seconds()
|
||||
if gap > median_gap * 3:
|
||||
if gap > median_gap * 6:
|
||||
expired = True
|
||||
reason = (
|
||||
f"adaptive pause "
|
||||
f"(gap={gap:.0f}s > "
|
||||
f"median={median_gap:.0f}s × 3)"
|
||||
f"median={median_gap:.0f}s × 6)"
|
||||
)
|
||||
except (ValueError, TypeError):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user