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 09:53)

Ruben Lütkebac669102edd
diff --git a/scripts/wake_bench.py b/scripts/wake_bench.py
index 72a2179815..512c4fa128 100644
--- a/scripts/wake_bench.py
+++ b/scripts/wake_bench.py
@@ -124,7 +124,7 @@ def discover_fixtures(
ambient_pool.append(entry)
elif 0.003 <= r < 0.01:
quiet_pool.append(entry)
- rng = random.Random(seed)
+ rng = random.Random(seed) # noqa: S311 — deterministic fixture sampling, not crypto
fx.neg_ambient = sorted(rng.sample(ambient_pool, min(neg_cap, len(ambient_pool))))
fx.neg_quiet = sorted(rng.sample(quiet_pool, min(neg_cap // 2, len(quiet_pool))))
fx.neg_bare = fx.neg_bare[: neg_cap]
diff --git a/tests/unit/speech/test_wake_matcher_integration.py b/tests/unit/speech/test_wake_matcher_integration.py
index ecb22699fc..3497e86fc2 100644
--- a/tests/unit/speech/test_wake_matcher_integration.py
+++ b/tests/unit/speech/test_wake_matcher_integration.py
@@ -17,7 +17,6 @@ from jarvis.speech.wake_verifier import (
verify_wake_with_stt,
)
-
# --------------------------------------------------------------------------
# Single source of truth: rolling-whisper re-exports the canonical pattern.
# --------------------------------------------------------------------------
@@ -139,8 +138,9 @@ async def _first_yield(stt: _ScriptedSTT, phrase: str, wait_s: float) -> str | N
feeder = asyncio.create_task(_feed())
driver = asyncio.create_task(_drain())
try:
- deadline = asyncio.get_running_loop().time() + wait_s
- while not got and asyncio.get_running_loop().time() < deadline:
+ for _ in range(int(wait_s / 0.05)):
+ if got:
+ break
await asyncio.sleep(0.05)
finally:
driver.cancel()
diff --git a/tests/unit/speech/test_wake_phrase.py b/tests/unit/speech/test_wake_phrase.py
index ee855f0a9b..45e7afb65d 100644
--- a/tests/unit/speech/test_wake_phrase.py
+++ b/tests/unit/speech/test_wake_phrase.py
@@ -18,13 +18,11 @@ import pytest
from jarvis.speech import wake_constants as wc
from jarvis.speech import wake_phrase as wp
from jarvis.speech.wake_phrase import (
- WakeMatcher,
compile_wake_matcher,
resolve_wake_plan,
sensitivity_to_threshold,
)
-
# --------------------------------------------------------------------------
# WAKE_ENGINES single source of truth
# --------------------------------------------------------------------------