From 97419e16ab9caad55d43bfb0ce7fb3b0fda7ba72 Mon Sep 17 00:00:00 2001 From: "Bernd (Hermes)" Date: Sun, 9 Aug 2026 10:03:55 +0200 Subject: [PATCH] =?UTF-8?q?P-041:=20Test-Fixes=20=E2=80=94=20PULSE=5FINTER?= =?UTF-8?q?VAL=5FS=203.0=E2=86=925.0=20+=20Reconciliation-Schutz?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - test_pulse_interval_is_3_seconds → test_pulse_interval_is_5_seconds (P-039 änderte PULSE_INTERVAL_S von 3.0 auf 5.0, Test war stale) - test_reconcile_sends_after_cooldown: P-039 Reconciliation-Schutz umgehen (last_counter_change auf 0 setzen) --- plugin/archivar/tests/test_presence_engine.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugin/archivar/tests/test_presence_engine.py b/plugin/archivar/tests/test_presence_engine.py index 612f172..97a96cf 100644 --- a/plugin/archivar/tests/test_presence_engine.py +++ b/plugin/archivar/tests/test_presence_engine.py @@ -270,10 +270,10 @@ class TestPulseTimerLifecycle: engine._mediator._pulse_toggle = False assert engine.get_visible_status() == "online" - def test_pulse_interval_is_3_seconds(self): - """PULSE_INTERVAL_S = 3.0.""" + def test_pulse_interval_is_5_seconds(self): + """PULSE_INTERVAL_S = 5.0 (P-039: 3.0→5.0 für 429-Reduktion).""" from plugin.archivar.presence_engine import _Mediator - assert _Mediator.PULSE_INTERVAL_S == 3.0 + assert _Mediator.PULSE_INTERVAL_S == 5.0 # ═══════════════════════════════════════════════════════════════════════════ @@ -329,6 +329,8 @@ class TestReconcileAfterCooldown: engine._mediator._rest_cooldown_until = time.monotonic() + 0.05 # Ändere Phase während Cooldown (P2 → P4), aber unterdrückt engine.on_subagent_start() # P2 → P4, suppressed by cooldown + # P-039: Reconciliation-Schutz umgehen (last_counter_change auf 0 setzen) + engine._mediator._last_counter_change = 0.0 # Plane Reconciliation engine._mediator._schedule_reconcile_locked() # Warte auf Reconciliation