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.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
fix(dictation): cap the wording ceiling at 2 s, not 4
Harald6b7a7e7ec5d7
diff --git a/jarvis/core/config.py b/jarvis/core/config.pyindex 7ccabbdb7d..e5fe1cfaa7 100644--- a/jarvis/core/config.py+++ b/jarvis/core/config.py@@ -3173,7 +3173,7 @@ class DictationConfig(BaseModel):#:#: Set it equal to (or below) ``polish_timeout_ms`` to switch the ramp off#: and get the old fixed ceiling back.- polish_timeout_max_ms: int = Field(default=4000, ge=200, le=20_000)+ polish_timeout_max_ms: int = Field(default=2000, ge=200, le=20_000)#: Skip the pass above this many characters. ``0`` — the default — means#: no cap.@@ -3425,7 +3425,7 @@ class DictationConfig(BaseModel):@field_validator("polish_timeout_max_ms", mode="before")@classmethoddef _clamp_polish_timeout_max_ms(cls, value: object) -> int:- return _clamped_polish_int(value, default=4000, low=200, high=20_000)+ return _clamped_polish_int(value, default=2000, low=200, high=20_000)@field_validator("polish_max_input_chars", mode="before")@classmethoddiff --git a/jarvis/dictation/polish.py b/jarvis/dictation/polish.pyindex 9cb0be2d07..7156e30277 100644--- a/jarvis/dictation/polish.py+++ b/jarvis/dictation/polish.py@@ -238,7 +238,7 @@ _MIN_CALL_TIMEOUT_S = 0.05# hit, and never said so._TIMEOUT_FREE_WORDS = 25_TIMEOUT_MS_PER_WORD = 15-_DEFAULT_TIMEOUT_MAX_MS = 4000+_DEFAULT_TIMEOUT_MAX_MS = 2000@dataclass(frozen=True, slots=True)diff --git a/tests/unit/dictation/test_polish_timeout_ramp.py b/tests/unit/dictation/test_polish_timeout_ramp.pyindex e76b5f937d..7e4d124bc0 100644--- a/tests/unit/dictation/test_polish_timeout_ramp.py+++ b/tests/unit/dictation/test_polish_timeout_ramp.py@@ -55,7 +55,7 @@ class _Cfg:polish_provider: str = "auto"polish_model: str = ""polish_timeout_ms: int = 1200- polish_timeout_max_ms: int = 4000+ polish_timeout_max_ms: int = 2000polish_min_words: int = 4polish_max_input_chars: int = 0polish_max_output_tokens: int = 1200@@ -132,13 +132,13 @@ async def test_a_long_dictation_is_given_more_time_than_a_short_one("""short = await _deadline_for(monkeypatch, 20, _Cfg())polish.reset_polish_state()- long = await _deadline_for(monkeypatch, 100, _Cfg())+ long = await _deadline_for(monkeypatch, 60, _Cfg())assert long > short- # 100 words = 75 over the free allowance, 15 ms each on top of 1200 ms,- # and still short of the 4000 ms cap — so this asserts the RAMP rather- # than the ceiling the next test owns.- assert 2.1 < long <= 2.325+ # 60 words = 35 over the free allowance, 15 ms each on top of 1200 ms, and+ # still short of the 2000 ms cap — so this asserts the RAMP rather than+ # the ceiling the next test owns.+ assert 1.5 < long <= 1.725async def test_the_extra_time_stops_at_the_configured_maximum(