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:34)

Ruben Lütke7c56bddf1328
diff --git a/tests/unit/harness/test_cu_engine_switch.py b/tests/unit/harness/test_cu_engine_switch.py
index 98418b46aa..f5124d15f4 100644
--- a/tests/unit/harness/test_cu_engine_switch.py
+++ b/tests/unit/harness/test_cu_engine_switch.py
@@ -103,12 +103,18 @@ def test_selector_picks_june13_when_configured(monkeypatch):
assert loop.__module__ == "jarvis.harness.screenshot_only_loop_june13"
-def test_selector_picks_current_by_default(monkeypatch):
+def test_selector_picks_current_when_configured(monkeypatch):
_patch_engine(monkeypatch, "current")
loop = harness._resolve_run_cu_loop()
assert loop.__module__ == "jarvis.harness.screenshot_only_loop"
+def test_selector_picks_v2_when_configured(monkeypatch):
+ _patch_engine(monkeypatch, "v2")
+ loop = harness._resolve_run_cu_loop()
+ assert loop.__module__ == "jarvis.cu.engine"
+
+
def test_selector_picks_stable_when_configured(monkeypatch):
# The pre-Wave-1 frozen fallback the user flips to if the new work misbehaves.
_patch_engine(monkeypatch, "stable")
@@ -116,10 +122,12 @@ def test_selector_picks_stable_when_configured(monkeypatch):
assert loop.__module__ == "jarvis.harness.screenshot_only_loop_stable"
-def test_selector_falls_back_to_current_on_config_error(monkeypatch):
+def test_selector_falls_back_to_default_engine_on_config_error(monkeypatch):
+ # The default engine is v2 since the rebuild; a config-read failure must
+ # land on the same default, never on an older engine.
def _boom() -> Any:
raise RuntimeError("config unreadable")
monkeypatch.setattr("jarvis.core.config.load_config", _boom)
loop = harness._resolve_run_cu_loop()
- assert loop.__module__ == "jarvis.harness.screenshot_only_loop"
+ assert loop.__module__ == "jarvis.cu.engine"
diff --git a/tests/unit/plugins/tool/test_scroll.py b/tests/unit/plugins/tool/test_scroll.py
index 6367c92c6e..9794765c95 100644
--- a/tests/unit/plugins/tool/test_scroll.py
+++ b/tests/unit/plugins/tool/test_scroll.py
@@ -30,7 +30,7 @@ def _ctx() -> ExecutionContext:
def captured(monkeypatch: pytest.MonkeyPatch) -> list[dict[str, object]]:
"""Patch both native paths to record the call instead of moving the mouse.
- The tool dispatches to ``_scroll_windows`` on Windows and ``_scroll_pyautogui``
+ The tool dispatches to ``_scroll_windows`` on Windows and ``_scroll_posix``
elsewhere; patching both keeps the test platform-agnostic.
"""
calls: list[dict[str, object]] = []
@@ -41,7 +41,7 @@ def captured(monkeypatch: pytest.MonkeyPatch) -> list[dict[str, object]]:
return notch
monkeypatch.setattr(scroll_mod, "_scroll_windows", _fake)
- monkeypatch.setattr(scroll_mod, "_scroll_pyautogui", _fake)
+ monkeypatch.setattr(scroll_mod, "_scroll_posix", _fake)
return calls