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-01 14:59)

Ruben Lütkef6fee3055ed9
diff --git a/jarvis/audio/vad.py b/jarvis/audio/vad.py
index 82189d9113..88125710da 100644
--- a/jarvis/audio/vad.py
+++ b/jarvis/audio/vad.py
@@ -54,7 +54,12 @@ class SileroEndpointer:
def __init__(
self,
speech_threshold: float = 0.5,
- silence_ms: int = 1000,
+ # Product default = the configured "Thinking pause" (1.5 s "1.5s rule",
+ # jarvis.core.config.SpeechConfig.vad_silence_ms). Every real caller passes
+ # the configured value explicitly (pipeline from config; wake overrides to
+ # 500 ms); this default only governs a bare construction, and it must match
+ # the product default so a stale pre-1.5s-rule 1.0 s can never creep back.
+ silence_ms: int = 1500,
min_speech_ms: int = 250,
max_utterance_s: int = 30,
min_speech_rms: float = 0.002,
diff --git a/tests/unit/core/test_silence_window_config.py b/tests/unit/core/test_silence_window_config.py
index 6ed9e3a7f7..b974f35243 100644
--- a/tests/unit/core/test_silence_window_config.py
+++ b/tests/unit/core/test_silence_window_config.py
@@ -11,6 +11,19 @@ def test_default_is_1500_ms() -> None:
assert SpeechConfig().vad_silence_ms == 1500
+def test_vad_constructor_default_matches_product_default() -> None:
+ """Single source of truth: a bare ``SileroEndpointer()`` must fall back to the
+ SAME silence window as the product default (1.5 s), never the pre-"1.5s rule"
+ 1.0 s value. Every real caller passes the configured value explicitly, but
+ keeping the constructor default aligned stops a stale 1.0 s from creeping back
+ via any future bare construction (the maintainer's mandate: the default is
+ 1.5 s everywhere; a single 1.0 s user setting stays a *user* choice)."""
+ from jarvis.audio.vad import SileroEndpointer
+
+ default_ms = SpeechConfig().vad_silence_ms
+ assert SileroEndpointer()._silence_frames == default_ms // 32
+
+
def test_accepts_in_range_value() -> None:
assert SpeechConfig(vad_silence_ms=2500).vad_silence_ms == 2500