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.

fix(ci): verify the release checkout and update the bootstrap fixture

rubenluetke10-beep8c0ffee4b834
diff --git a/scripts/ci/check_release_completeness.py b/scripts/ci/check_release_completeness.py
index d0626837a4..a7518734da 100644
--- a/scripts/ci/check_release_completeness.py
+++ b/scripts/ci/check_release_completeness.py
@@ -163,20 +163,22 @@ def check_not_behind_public(root: Path, *, remote: str, branch: str) -> tuple[bo
rc, out = _run_git(["fetch", "--quiet", remote, branch], cwd=root)
if rc != 0:
return False, f"could not fetch {remote}/{branch} (offline?): {out}"
- rc, out = _run_git(["rev-list", "--count", f"{branch}..{remote}/{branch}"], cwd=root)
+ # Inspect the checkout being released; a linked worktree's local main may
+ # still point at the user's unrelated, actively edited desktop checkout.
+ rc, out = _run_git(["rev-list", "--count", f"HEAD..{remote}/{branch}"], cwd=root)
out = out.strip()
if rc != 0 or not out.isdigit():
return False, f"could not compare {branch} against {remote}/{branch}: {out}"
behind = int(out)
if behind:
return False, (
- f"{branch} is {behind} commit(s) BEHIND {remote}/{branch} - reconcile "
+ f"release checkout is {behind} commit(s) BEHIND {remote}/{branch} - reconcile "
"first (a release must never roll the public line back)"
)
- rc, ahead = _run_git(["rev-list", "--count", f"{remote}/{branch}..{branch}"], cwd=root)
+ rc, ahead = _run_git(["rev-list", "--count", f"{remote}/{branch}..HEAD"], cwd=root)
ahead = ahead.strip()
note = f" ({ahead} local commit(s) will publish)" if ahead.isdigit() and int(ahead) else ""
- return True, f"{branch} is not behind {remote}/{branch}{note}"
+ return True, f"release checkout is not behind {remote}/{branch}{note}"
def _last_commit_ts(root: Path, *pathspecs: str) -> int | None:
diff --git a/tests/contract/test_browser_desktop_mcp.py b/tests/contract/test_browser_desktop_mcp.py
index fbb6f3257b..490deba71c 100644
--- a/tests/contract/test_browser_desktop_mcp.py
+++ b/tests/contract/test_browser_desktop_mcp.py
@@ -12,6 +12,7 @@ from jarvis.core.protocols import SupervisorToolRequest, ToolResult
async def test_desktop_bootstrap_publishes_the_mcp_endpoint(monkeypatch):
from jarvis.agent_chat import jarvis_harness
from jarvis.core import runtime_refs
+ from jarvis.core.bus import EventBus
from jarvis.ui.web.server import WebServer
urls = []
@@ -26,6 +27,7 @@ async def test_desktop_bootstrap_publishes_the_mcp_endpoint(monkeypatch):
raise ProbeFinished()
probe = SimpleNamespace(
+ bus=EventBus(),
cfg=SimpleNamespace(ui=SimpleNamespace(admin_api_port=48123)),
_voice_ready=True,
_schedule_anyio_pool_warm=finish,
diff --git a/tests/unit/ci/test_check_release_completeness.py b/tests/unit/ci/test_check_release_completeness.py
index 75ca08b3ad..12308ad547 100644
--- a/tests/unit/ci/test_check_release_completeness.py
+++ b/tests/unit/ci/test_check_release_completeness.py
@@ -12,6 +12,7 @@ from __future__ import annotations
import subprocess
from pathlib import Path
+from jarvis.core.process_utils import NO_WINDOW_CREATIONFLAGS
from scripts.ci import check_release_completeness as gate
@@ -83,3 +84,29 @@ def test_release_matches_accepts_v_prefix_and_rejects_other_versions():
# No published release at all must never satisfy the gate.
assert not gate.release_matches("", "1.1.0")
assert not gate.release_matches("v1.1.0", "")
+
+
+def test_release_checks_current_branch_when_local_main_is_stale(tmp_path: Path):
+ """A release worktree may include upstream fixes while local main does not."""
+ def git(*args: str) -> None:
+ subprocess.run(
+ ["git", *args], cwd=tmp_path, check=True, capture_output=True,
+ text=True, encoding="utf-8", creationflags=NO_WINDOW_CREATIONFLAGS,
+ )
+
+ git("init", "--quiet", "-b", "main")
+ git("config", "user.name", "Release test")
+ git("config", "user.email", "[email protected]")
+ git("commit", "--allow-empty", "-m", "base")
+ git("init", "--bare", "--quiet", "public.git")
+ git("remote", "add", "public", str(tmp_path / "public.git"))
+ git("push", "public", "main")
+ git("checkout", "-b", "release")
+ git("commit", "--allow-empty", "-m", "upstream fix")
+ git("push", "public", "HEAD:main")
+ git("commit", "--allow-empty", "-m", "release")
+ ok, message = gate.check_not_behind_public(tmp_path, remote="public", branch="main")
+ assert ok, message
+ git("checkout", "--detach", "HEAD~2")
+ ok, _ = gate.check_not_behind_public(tmp_path, remote="public", branch="main")
+ assert not ok