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(update): repair the apply-route tests hidden in the CI baseline

rubenluetke10-beep12b486756421
diff --git a/scripts/ci/test-baseline-linux.json b/scripts/ci/test-baseline-linux.json
index fe45591cfa..b350577aea 100644
--- a/scripts/ci/test-baseline-linux.json
+++ b/scripts/ci/test-baseline-linux.json
@@ -155,14 +155,6 @@
"tests.unit.ui.web.test_skills_routes::test_creator_author_writes_a_draft_skill_with_a_brain",
"tests.unit.ui.web.test_society_figure_routes::test_a_contract_figure_is_accepted_stored_and_served",
"tests.unit.ui.web.test_society_routes::test_memory_file_serves_society_page_and_refuses_escape",
- "tests.unit.ui.web.test_update_routes::test_apply_falls_back_to_cached_release_when_refetch_fails",
- "tests.unit.ui.web.test_update_routes::test_apply_git_fetch_failure_is_502",
- "tests.unit.ui.web.test_update_routes::test_apply_happy_path_pulls_and_signals_restart",
- "tests.unit.ui.web.test_update_routes::test_apply_invalidates_status_cache",
- "tests.unit.ui.web.test_update_routes::test_apply_preserves_headless_profile_for_deferred_installer",
- "tests.unit.ui.web.test_update_routes_frozen::test_apply_downloads_verifies_and_hands_over",
- "tests.unit.ui.web.test_update_routes_frozen::test_apply_falls_back_to_the_last_good_release",
- "tests.unit.ui.web.test_update_routes_frozen::test_apply_surfaces_a_verification_failure",
"tests.unit.web.test_agentic_ide_prompt_writer_route::test_a_connected_cli_is_listed_under_its_own_name",
"tests.unit.web.test_agentic_ide_prompt_writer_route::test_a_disconnected_subscription_is_listed_but_marked",
"tests.unit.web.test_agentic_ide_prompt_writer_route::test_a_usable_tool_model_can_be_chosen",
diff --git a/scripts/ci/test-baseline-windows.json b/scripts/ci/test-baseline-windows.json
index c92fa16831..cead3ecbd3 100644
--- a/scripts/ci/test-baseline-windows.json
+++ b/scripts/ci/test-baseline-windows.json
@@ -162,14 +162,6 @@
"tests.unit.ui.web.test_skills_routes::test_creator_author_writes_a_draft_skill_with_a_brain",
"tests.unit.ui.web.test_society_figure_routes::test_a_contract_figure_is_accepted_stored_and_served",
"tests.unit.ui.web.test_society_routes::test_memory_file_serves_society_page_and_refuses_escape",
- "tests.unit.ui.web.test_update_routes::test_apply_falls_back_to_cached_release_when_refetch_fails",
- "tests.unit.ui.web.test_update_routes::test_apply_git_fetch_failure_is_502",
- "tests.unit.ui.web.test_update_routes::test_apply_happy_path_pulls_and_signals_restart",
- "tests.unit.ui.web.test_update_routes::test_apply_invalidates_status_cache",
- "tests.unit.ui.web.test_update_routes::test_apply_preserves_headless_profile_for_deferred_installer",
- "tests.unit.ui.web.test_update_routes_frozen::test_apply_downloads_verifies_and_hands_over",
- "tests.unit.ui.web.test_update_routes_frozen::test_apply_falls_back_to_the_last_good_release",
- "tests.unit.ui.web.test_update_routes_frozen::test_apply_surfaces_a_verification_failure",
"tests.unit.web.test_agentic_ide_prompt_writer_route::test_a_connected_cli_is_listed_under_its_own_name",
"tests.unit.web.test_agentic_ide_prompt_writer_route::test_a_disconnected_subscription_is_listed_but_marked",
"tests.unit.web.test_agentic_ide_prompt_writer_route::test_a_usable_tool_model_can_be_chosen",
diff --git a/tests/unit/ui/web/test_update_routes.py b/tests/unit/ui/web/test_update_routes.py
index 2489288b41..91812bca23 100644
--- a/tests/unit/ui/web/test_update_routes.py
+++ b/tests/unit/ui/web/test_update_routes.py
@@ -194,7 +194,7 @@ def test_apply_happy_path_pulls_and_signals_restart(
},
)
- async def _fake_git(args, *, cwd, timeout_s=60.0):
+ async def _fake_git(args, *, cwd, timeout_s=60.0, on_stderr_line=None):
calls.append(args)
return 0, "", ""
@@ -221,8 +221,11 @@ def test_apply_happy_path_pulls_and_signals_restart(
assert body["desktop_integration_pending"] is True
assert body["desktop_integration_ok"] is None
assert body["desktop_integration_warning"] is None
+ # ``--progress`` makes git report object counters through a pipe, which
+ # is what drives the download phase of the progress bar.
assert [
"fetch",
+ "--progress",
"--depth",
"1",
"origin",
@@ -246,7 +249,7 @@ def test_apply_git_fetch_failure_is_502(
monkeypatch.setattr(u, "_running_version", lambda: "1.0.1")
_patch_latest(monkeypatch, {"version": "1.0.2", "tag": "v1.0.2"})
- async def _fake_git(args, *, cwd, timeout_s=60.0):
+ async def _fake_git(args, *, cwd, timeout_s=60.0, on_stderr_line=None):
return 1, "", "network down"
async def _fake_git_output(args, *, cwd, timeout_s=15.0):
@@ -267,7 +270,7 @@ def test_apply_preserves_headless_profile_for_deferred_installer(
monkeypatch.setattr(u, "_running_version", lambda: "1.0.1")
_patch_latest(monkeypatch, {"version": "1.0.2", "tag": "v1.0.2"})
- async def _fake_git(args, *, cwd, timeout_s=60.0):
+ async def _fake_git(args, *, cwd, timeout_s=60.0, on_stderr_line=None):
return 0, "", ""
async def _fake_git_output(args, *, cwd, timeout_s=15.0):
@@ -340,7 +343,7 @@ def test_apply_falls_back_to_cached_release_when_refetch_fails(
_patch_latest(monkeypatch, None)
u._last_good_release = {"version": "1.0.2", "tag": "v1.0.2"}
- async def _fake_git(args, *, cwd, timeout_s=60.0):
+ async def _fake_git(args, *, cwd, timeout_s=60.0, on_stderr_line=None):
return 0, "", ""
async def _fake_git_output(args, *, cwd, timeout_s=15.0):
@@ -487,7 +490,7 @@ def test_apply_invalidates_status_cache(
client.get("/api/update/status")
assert u._status_cache is not None
- async def _fake_git(args, *, cwd, timeout_s=60.0):
+ async def _fake_git(args, *, cwd, timeout_s=60.0, on_stderr_line=None):
return 0, "", ""
async def _fake_git_output(args, *, cwd, timeout_s=15.0):
diff --git a/tests/unit/ui/web/test_update_routes_frozen.py b/tests/unit/ui/web/test_update_routes_frozen.py
index e702f99763..badf65e88f 100644
--- a/tests/unit/ui/web/test_update_routes_frozen.py
+++ b/tests/unit/ui/web/test_update_routes_frozen.py
@@ -216,7 +216,9 @@ def _capture_install(monkeypatch: pytest.MonkeyPatch) -> dict[str, Any]:
path.write_bytes(b"verified installer")
return path
- async def _download(asset: Any, checksums: Any, *, dest_dir: Path) -> Path:
+ async def _download(
+ asset: Any, checksums: Any, *, dest_dir: Path, on_progress: Any = None
+ ) -> Path:
seen["asset"] = asset
seen["checksums"] = checksums
return _write_verified(dest_dir, asset.name)
@@ -305,7 +307,9 @@ def test_apply_surfaces_a_verification_failure(
_patch_frozen(monkeypatch)
_patch_latest(monkeypatch, _release("1.6.0"))
- async def _download(asset: Any, checksums: Any, *, dest_dir: Path) -> Path:
+ async def _download(
+ asset: Any, checksums: Any, *, dest_dir: Path, on_progress: Any = None
+ ) -> Path:
raise InstallerUpdateError("PersonalJarvis-Setup-x64.exe failed its SHA-256 check")
def _never(installer: Path) -> str: