Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

chore: auto-save WIP via Claude stop-hook safety net (2026-07-02 17:59)

Ruben Lütke80acb8ee4ad4
diff --git a/tests/unit/speech/test_wake_phrase.py b/tests/unit/speech/test_wake_phrase.py
index 45e7afb65d..f83f9b35dd 100644
--- a/tests/unit/speech/test_wake_phrase.py
+++ b/tests/unit/speech/test_wake_phrase.py
@@ -365,3 +365,18 @@ def test_just_jarvis_stays_typeable_resolves_to_hey_jarvis_model() -> None:
assert plan.oww_keyword == "hey_jarvis"
assert plan.degraded is False
assert plan.verify_prefix is True
+
+
+def test_sensitivity_to_poll_interval_makes_the_slider_control_speed() -> None:
+ # The Sensitivity slider was a no-op on the stt_match (local-Whisper) path:
+ # it only fed the openWakeWord threshold, which that path never scores
+ # against. It now drives the poll interval, so moving it changes how fast a
+ # spoken wake is picked up. Higher sensitivity => shorter interval => snappier.
+ assert wp.sensitivity_to_poll_interval(0.0) == pytest.approx(0.20)
+ assert wp.sensitivity_to_poll_interval(1.0) == pytest.approx(0.08)
+ assert wp.sensitivity_to_poll_interval(0.5) == pytest.approx(0.14)
+ # strictly monotonic decreasing
+ assert wp.sensitivity_to_poll_interval(0.2) > wp.sensitivity_to_poll_interval(0.8)
+ # clamps out-of-range input instead of producing absurd intervals
+ assert wp.sensitivity_to_poll_interval(-5) == wp.sensitivity_to_poll_interval(0.0)
+ assert wp.sensitivity_to_poll_interval(9) == wp.sensitivity_to_poll_interval(1.0)