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.

test(local-models): the offline sweep must not overwrite the good snapshot

rubenluetke10-beepa51b8206ecc7
diff --git a/tests/unit/ui/web/test_local_models_overview_parity.py b/tests/unit/ui/web/test_local_models_overview_parity.py
index 289d8ec983..680b03d96d 100644
--- a/tests/unit/ui/web/test_local_models_overview_parity.py
+++ b/tests/unit/ui/web/test_local_models_overview_parity.py
@@ -132,8 +132,12 @@ def test_the_route_answers_live_then_the_cache(server: WebServer, fake, tmp_path
assert forced["source"] == "live"
assert forced["server"]["running"] is False
assert "did not answer" in forced["inventory"]["error"]
+ # The offline sweep is a truthful answer NOW but a ruinous head start
+ # later, so `is_paintable` keeps it off disk: the last honest snapshot
+ # survives the outage that would otherwise wipe it (BUG-188).
saved = json.loads((tmp_path / ollama_overview.SNAPSHOT_FILE_NAME).read_text("utf-8"))
- assert saved["payload"]["server"]["running"] is False
+ assert saved["payload"]["server"]["running"] is True
+ assert saved["payload"]["inventory"]["disk_bytes"] == 3_400_000_000
def test_the_overview_refuses_cards_without_a_pull_api(server: WebServer, fake) -> None: