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.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
fix(portability): repair macOS lifecycle and release regressions
rubenluetke10-beep10f208c81dc2
diff --git a/docs/os-parity.md b/docs/os-parity.mdindex 9fd4d21e22..8711a312eb 100644--- a/docs/os-parity.md+++ b/docs/os-parity.md@@ -1636,3 +1636,14 @@ container. Windows additionally has real subscription audio/delegation evidencewith project API credentials disabled, and a native login-binary check with Nodeabsent. These checks do not establish physical-device or latency parity on otherplatforms. The private upstream voice protocol remains experimental.++## Profile locks and notebook migration++On macOS and Linux, closing the parent's profile-lock descriptor retains the+lock while a live child still owns an inherited descriptor. Windows retains+its existing process-lock implementation.++Agent notebook migration explicitly normalizes the final `USER.md` and+`MEMORY.md` filename spelling on case-insensitive filesystems. The migration+journal and backups continue to preserve the original content on every OS.+The inherited-lock and migration recovery contracts run in the OS test shards.diff --git a/jarvis/autostart/windows.py b/jarvis/autostart/windows.pyindex c05f97895b..876ca7007d 100644--- a/jarvis/autostart/windows.py+++ b/jarvis/autostart/windows.py@@ -34,6 +34,7 @@ from __future__ import annotationsimport base64import binasciiimport logging+import ntpathimport osimport subprocessimport tempfile@@ -95,7 +96,7 @@ def _shortcut_path() -> Path:def _norm(p: str | None) -> str:- return os.path.normcase(os.path.normpath(p)) if p else ""+ return ntpath.normcase(ntpath.normpath(p)) if p else ""def _current_user_id() -> str:diff --git a/jarvis/brain/manager.py b/jarvis/brain/manager.pyindex 6525580757..77717961a0 100644--- a/jarvis/brain/manager.py+++ b/jarvis/brain/manager.py@@ -2596,24 +2596,24 @@ _PROVIDER_DOWN_CAUSE_PHRASES: dict[str, dict[str, str]] = {"de nuevo en un momento."),},- # A screenshot was attached but every reachable brain reported blind.+ # A screen capture or attachment exists, but every reachable brain is blind.# This is NOT a missing/invalid API key — the key is often present and# the API-Keys card is green; the model simply cannot inspect images.# Spoken separately so a vision skip is not heard as "your key is broken"."vision_unsupported": {"de": (- "Entschuldige — ich habe den Bildschirm aufgenommen, aber keiner " # i18n-allow+ "Entschuldige — keiner " # i18n-allow"der verbundenen Assistenten kann gerade Bilder auswerten. Der " # i18n-allow"Schlüssel ist da, nur das Sehen fehlt. Nimm unter API-Keys " # i18n-allow"einen Anbieter mit Bildverarbeitung." # i18n-allow),"en": (- "Sorry — I captured the screen, but none of the connected "+ "Sorry — none of the connected ""assistants can inspect images right now. The key is there; ""vision is not. Pick a vision-capable provider under API keys."),"es": (- "Lo siento: capturé la pantalla, pero ninguno de los asistentes "+ "Lo siento: ninguno de los asistentes ""conectados puede analizar imágenes ahora. La clave está; falta ""la visión. Elige un proveedor con visión en Claves API."),diff --git a/jarvis/core/exclusive_process_lock.py b/jarvis/core/exclusive_process_lock.pyindex c54f0e3855..7fa3dfe727 100644--- a/jarvis/core/exclusive_process_lock.py+++ b/jarvis/core/exclusive_process_lock.py@@ -426,10 +426,9 @@ def _release_fd(fd: int) -> None:import msvcrt # noqa: PLC0415 - Windows-only, off import floormsvcrt.locking(fd, msvcrt.LK_UNLCK, 1)- else:- import fcntl # noqa: PLC0415 - POSIX-only, off import floor-- fcntl.flock(fd, fcntl.LOCK_UN)+ # POSIX flock belongs to the shared open-file description. Closing our+ # descriptor preserves the lock while a child still holds an inherited+ # descriptor; LOCK_UN here would also unlock that live child.finally:os.close(fd)diff --git a/jarvis/missions/kontrollierer/deliverable.py b/jarvis/missions/kontrollierer/deliverable.pyindex 99e5d367a0..f270527e90 100644--- a/jarvis/missions/kontrollierer/deliverable.py+++ b/jarvis/missions/kontrollierer/deliverable.py@@ -104,9 +104,9 @@ _DELIVERABLE_TEMPLATES: Final[dict[str, dict[str, str]]] = {"many": "Fertig. {count} Dateien als Artefakte hinterlegt.", # i18n-allow},"en": {- "one": "Done. I've filed {name} as an artifact.",- "few": "Done. {count} files filed as artifacts: {joined}.",- "many": "Done. {count} files filed as artifacts.",+ "one": "Done. I have saved {name} as an artifact.",+ "few": "Done. I have saved {count} files as artifacts: {joined}.",+ "many": "Done. I have saved {count} files as artifacts.",},}diff --git a/jarvis/missions/workers/worker_tool_broker.py b/jarvis/missions/workers/worker_tool_broker.pyindex c7474c6942..99a869d6d5 100644--- a/jarvis/missions/workers/worker_tool_broker.py+++ b/jarvis/missions/workers/worker_tool_broker.py@@ -782,6 +782,9 @@ class WorkerToolBroker:if not scope.specs:return Noneserver = self._ensure_server()+ # A cold loopback server must not consume the worker's grant lifetime+ # before the capability is handed to it. This scope is not published yet.+ scope.expires_at = time.monotonic() + max(1.0, float(ttl_s))token = secrets.token_urlsafe(32)with self._lock:self._reap_locked()diff --git a/jarvis/skills/builtin/__init__.py b/jarvis/skills/builtin/__init__.pyindex c58196e41a..f130fa003d 100644--- a/jarvis/skills/builtin/__init__.py+++ b/jarvis/skills/builtin/__init__.py@@ -49,6 +49,28 @@ _PLUGIN_PAIRED_SKILLS: tuple[str, ...] = ("plugin-spotify","plugin-youtube_music","plugin-higgsfield",+ "plugin-agentmail",+ "plugin-amd_gpu",+ "plugin-apollo",+ "plugin-aws",+ "plugin-azure",+ "plugin-figma",+ "plugin-gitlab",+ "plugin-google_cloud",+ "plugin-granola",+ "plugin-hubspot",+ "plugin-linkedin",+ "plugin-meta",+ "plugin-microsoft_todo",+ "plugin-onedrive",+ "plugin-onenote",+ "plugin-outlook",+ "plugin-salesforce",+ "plugin-sharepoint",+ "plugin-teams",+ "plugin-x",+ "plugin-youtube_studio",+ "plugin-zoom",)BUILTIN_SKILL_NAMES: tuple[str, ...] = (diff --git a/jarvis/society/memory_books.py b/jarvis/society/memory_books.pyindex 2ebba82feb..53594ba345 100644--- a/jarvis/society/memory_books.py+++ b/jarvis/society/memory_books.py@@ -101,7 +101,13 @@ def _recover(folder: Path, journal: Path) -> None:for item in plan["legacy"]:legacy = folder / item["name"]canonical = folder / ("USER.md" if item["name"].lower() == "user.md" else "MEMORY.md")- if legacy.is_file() and not legacy.samefile(canonical):+ if legacy.is_file() and legacy.samefile(canonical):+ # Replacing content can retain the old directory-entry spelling+ # on case-insensitive filesystems. Rename that same file explicitly;+ # its original content is already preserved in the migration backup.+ if legacy.name != canonical.name:+ os.replace(legacy, canonical)+ elif legacy.is_file():if _hash(_read(legacy)) != item["hash"]:raise ValueError("Legacy memory changed during migration; originals were preserved")os.replace(legacy, folder / f".legacy-{item['name']}-{item['hash']}.bak")diff --git a/tests/integration/test_capability_coupling_e2e.py b/tests/integration/test_capability_coupling_e2e.pyindex d61bf67a84..cae565459d 100644--- a/tests/integration/test_capability_coupling_e2e.py+++ b/tests/integration/test_capability_coupling_e2e.py@@ -27,7 +27,7 @@ from __future__ import annotationsimport pytestfrom jarvis.brain.local_action_gate import LocalActionMode, match_local_action-from jarvis.core.capabilities import CapabilityRegistry, get_registry+from jarvis.core.capabilities import CapabilityRegistryfrom jarvis.core.capabilities_seed import seed_registry@@ -36,11 +36,13 @@ from jarvis.core.capabilities_seed import seed_registry# ---------------------------------------------------------------------------@pytest.fixture(scope="module")-def seeded_registry() -> CapabilityRegistry:- """Production-equivalent registry: seeded once per module."""- reg = get_registry()- seed_registry(reg)- return reg+def seeded_registry():+ """A fresh base install with no connected plugins, independent of prior tests."""+ reg = CapabilityRegistry()+ with pytest.MonkeyPatch.context() as patch:+ patch.setattr("jarvis.core.capabilities._registry_instance", reg)+ seed_registry(reg)+ yield regHARD_NEGATIVE_UTTERANCES = [@@ -150,12 +152,11 @@ def test_hard_positive_local_action_not_unsupported(def test_hard_positive_file_ops_resolves_to_file_capability(seeded_registry: CapabilityRegistry,) -> None:- """'Lies die Datei foo.txt' must resolve to a file-capable harness."""+ """A file-read request resolves to the shell capability that owns file operations."""cap = seeded_registry.resolve_intent("Lies die Datei foo.txt") # i18n-allowassert cap is not None, "Expected a capability match for file-read"- assert "file" in cap.id or cap.source == "harness", (- f"Expected a file-capable harness/tool, got {cap!r}"- )+ assert cap.id == "tool.run-shell"+ assert cap.requires_evidence is Truedef test_hard_positive_smalltalk_not_action_intent(diff --git a/tests/integration/test_capability_seed_boot.py b/tests/integration/test_capability_seed_boot.pyindex 423e704ce6..280f131292 100644--- a/tests/integration/test_capability_seed_boot.py+++ b/tests/integration/test_capability_seed_boot.py@@ -68,7 +68,7 @@ def test_build_default_brain_seeds_capability_registry(empty_registry) -> None:)resolved = empty_registry.resolve_intent(- "Kannst du mir einen Subagent spawnen, der eine Datei macht" # i18n-allow+ "Kannst du mir einen Subagent spawnen" # i18n-allow)assert resolved is not None, ("a sub-agent spawn request must resolve to a registered capability"diff --git a/tests/integration/test_ollama_catalog_is_current.py b/tests/integration/test_ollama_catalog_is_current.pyindex 4fc6866332..29e1b4cd18 100644--- a/tests/integration/test_ollama_catalog_is_current.py+++ b/tests/integration/test_ollama_catalog_is_current.py@@ -57,8 +57,6 @@ _SHORTLIST_2026_08_24 = ("qwen3.6:27b","muse-glimmer:30b","ornith:35b",- "embeddinggemma",- "qwen3-embedding:4b",)_RUNTIME_OLLAMA_MODELS = tuple(@@ -83,7 +81,7 @@ def _manifest(client: httpx.Client, model: str) -> httpx.Response:def registry() -> httpx.Client:with httpx.Client(timeout=15.0) as client:try:- probe = _manifest(client, "qwen3-embedding:4b")+ probe = _manifest(client, RECOMMENDED_MODELS[0].id)except Exception as exc: # noqa: BLE001 — offline is a skip, not a failurepytest.skip(f"Ollama registry unreachable: {type(exc).__name__} {exc}")if probe.status_code != 200:diff --git a/tests/integration/test_provider_routes.py b/tests/integration/test_provider_routes.pyindex 46c755d5b6..3910ec5df8 100644--- a/tests/integration/test_provider_routes.py+++ b/tests/integration/test_provider_routes.py@@ -186,6 +186,7 @@ def test_section_health_returns_all_tabs("dictation","subagents","advanced",+ "local_models",}valid = {"ok", "needs_setup", "error", "unknown"}for sec in body["sections"].values():@@ -656,12 +657,15 @@ def test_list_providers_reports_codex_without_leaking_auth_files()monkeypatch.setattr("jarvis.ui.web.provider_routes.CodexAuthService", _FakeCodexService)+ monkeypatch.setattr("jarvis.codex_auth.CodexAuthService", _FakeCodexService)with TestClient(server_with_brain.app) as client:body = client.get("/api/providers").json()codex = next(p for p in body["providers"] if p["id"] == "codex")assert codex["configured"] is Trueassert codex["codex_status"]["mode"] == "chatgpt"- assert "auth.json" not in client.get("/api/providers").text+ assert "auth.json" not in str(codex["codex_status"])+ forbidden = {"auth", "api_key", "access_token", "refresh_token"}+ assert not forbidden & codex["codex_status"].keys()def test_codex_binary_path_persists_to_config(diff --git a/tests/integration/test_tasks_recurring.py b/tests/integration/test_tasks_recurring.pyindex dd559c7e45..2f7abbe8ef 100644--- a/tests/integration/test_tasks_recurring.py+++ b/tests/integration/test_tasks_recurring.py@@ -177,7 +177,9 @@ async def test_runner_agent_dispatches_to_brain(store: TaskStore):seen: dict[str, object] = {}class _FakeBrain:- async def run_task(self, *, prompt: str, allowed_tools, model_tier, trace_id=None):+ async def run_task(+ self, *, prompt: str, allowed_tools, model_tier, trace_id=None, prefer_api=False,+ ):seen["prompt"] = promptseen["allowed_tools"] = list(allowed_tools)seen["model_tier"] = model_tier@@ -202,8 +204,11 @@ async def test_runner_agent_dispatches_to_brain(store: TaskStore):assert seen["model_tier"] == "deep"-async def test_runner_agent_delivers_result_as_announcement(store: TaskStore):- """A finished agent task speaks its result via AnnouncementRequested."""[email protected]("announcement", ["", "Briefing ready."])+async def test_runner_agent_retains_result_and_only_speaks_on_opt_in(+ store: TaskStore, announcement,+):+ """The result stays visible; automatic speech needs an explicit choice."""bus = EventBus()announced: list[object] = []@@ -214,7 +219,9 @@ async def test_runner_agent_delivers_result_as_announcement(store: TaskStore):bus.subscribe_all(_capture)class _FakeBrain:- async def run_task(self, *, prompt, allowed_tools, model_tier, trace_id=None):+ async def run_task(+ self, *, prompt, allowed_tools, model_tier, trace_id=None, prefer_api=False,+ ):return "Your briefing: 2 meetings today."runner = TaskRunner(store=store, bus=bus, agent_brain=_FakeBrain())@@ -222,10 +229,18 @@ async def test_runner_agent_delivers_result_as_announcement(store: TaskStore):title="brief",trigger=TriggerAfterDelay(delay_seconds=5.0),action=AgentAction(prompt="brief me"),+ announce_on_success=announcement,)tid = await store.insert(spec)await runner.run(tid)- assert any("briefing" in getattr(ev, "text", "").lower() for ev in announced)+ row = await store.get(tid)+ assert row["state"] == "completed"+ assert any(+ step["payload"].get("event") == "agent_result"+ and "briefing" in step["payload"].get("text", "").lower()+ for step in row["steps"]+ )+ assert [event.text for event in announced] == ([announcement] if announcement else [])async def test_runner_arms_auto_approver_for_write_grants(store: TaskStore):@@ -244,7 +259,7 @@ async def test_runner_arms_auto_approver_for_write_grants(store: TaskStore):bus.subscribe_all(_cap)class _Brain:- async def run_task(self, *, prompt, allowed_tools, model_tier, trace_id):+ async def run_task(self, *, prompt, allowed_tools, model_tier, trace_id, prefer_api=False):# Simulate the tool loop proposing an ask-tier action mid-turn.await bus.publish(ActionApprovalRequired(@@ -284,7 +299,7 @@ async def test_runner_does_not_auto_approve_read_grants(store: TaskStore):bus.subscribe_all(_cap)class _Brain:- async def run_task(self, *, prompt, allowed_tools, model_tier, trace_id):+ async def run_task(self, *, prompt, allowed_tools, model_tier, trace_id, prefer_api=False):await bus.publish(ActionApprovalRequired(trace_id=trace_id, tool_name="gmail", risk_tier="ask"@@ -310,7 +325,7 @@ async def test_runner_does_not_auto_approve_read_grants(store: TaskStore):async def test_runner_agent_without_brain_fails_cleanly(store: TaskStore):"""No agent brain configured → clean failure, not an unknown-kind crash."""bus = EventBus()- runner = TaskRunner(store=store, bus=bus) # no agent_brain+ runner = TaskRunner(store=store, bus=bus, agent_brain_wait_s=0) # no agent_brainspec = TaskSpec(title="brief",trigger=TriggerAfterDelay(delay_seconds=5.0),diff --git a/tests/integration/test_uninstall_bootstrap.py b/tests/integration/test_uninstall_bootstrap.pyindex 38a868369d..8eff638c92 100644--- a/tests/integration/test_uninstall_bootstrap.py+++ b/tests/integration/test_uninstall_bootstrap.py@@ -76,7 +76,8 @@ def _start_process_from(fake: Path) -> subprocess.Popen[bytes]:target = bin_dir / "jarvis-fake"sleep_bin = shutil.which("sleep")assert sleep_bin, "CI runner without a sleep binary"- shutil.copy2(sleep_bin, target)+ # Keep executable mode without copying the macOS system file's SIP flags.+ shutil.copy(sleep_bin, target)target.chmod(0o755)return subprocess.Popen( # noqa: S603 — self-copied system binary[str(target), "120"],diff --git a/tests/integration/test_when_then_e2e.py b/tests/integration/test_when_then_e2e.pyindex 4cbf450bbd..5f173f36ee 100644--- a/tests/integration/test_when_then_e2e.py+++ b/tests/integration/test_when_then_e2e.py@@ -102,10 +102,10 @@ async def test_mission_finished_opens_browser_and_speaks(store: TaskStore) -> Noassert announcements[0].text == "Your mission is ready — I opened /outputs/report.md."assert announcements[0].kind == "subagent"- # The task itself completed.+ # An unlimited standing event rule re-arms after delivering this result.task_row = await store.get(str(rule.id))assert task_row is not None- assert task_row["state"] == "completed"+ assert task_row["state"] == "scheduled"async def test_failed_mission_does_not_fire_an_approved_rule(store: TaskStore) -> None:diff --git a/tests/missions/kontrollierer/test_approve_materialises_report.py b/tests/missions/kontrollierer/test_approve_materialises_report.pyindex 0dd5c97b1f..a079256951 100644--- a/tests/missions/kontrollierer/test_approve_materialises_report.py+++ b/tests/missions/kontrollierer/test_approve_materialises_report.py@@ -162,7 +162,7 @@ async def test_approve_builds_english_summary_en_for_file_deliverable(f"summary_en must be English, got {approved.summary_en!r}")# The German field still speaks German — the two diverge as designed.- assert "Fertig" in approved.summary_de and "Datei" in approved.summary_de # i18n-allow (German value under summary_de field)+ assert "Fertig" in approved.summary_de and "Artefakt" in approved.summary_de # i18n-allowasync def test_approve_mirrors_materialised_report_to_user_folder(diff --git a/tests/missions/test_worker_tool_broker.py b/tests/missions/test_worker_tool_broker.pyindex 0fc453d643..dd9c74e9a5 100644--- a/tests/missions/test_worker_tool_broker.py+++ b/tests/missions/test_worker_tool_broker.py@@ -161,6 +161,26 @@ async def test_binding_is_filtered_and_executes_only_through_supervisor() -> Nonassert len(executor.calls) == 1+async def test_cold_server_start_does_not_expire_a_new_worker_grant(monkeypatch) -> None:+ from jarvis.missions.workers import worker_tool_broker as broker_module++ _wire_manager(_Executor())+ now = [100.0]+ monkeypatch.setattr(broker_module, "time", SimpleNamespace(monotonic=lambda: now[0]))++ def slow_start():+ now[0] += 60.0+ return SimpleNamespace(server_address=("127.0.0.1", 12345))++ monkeypatch.setattr(_BROKER, "_ensure_server", slow_start)+ binding = _inventory().bind_broker(ttl_s=30)+ assert binding is not None and "github/list_issues" in binding.tool_names+ now[0] += 29+ assert "github/list_issues" in binding.tool_names+ now[0] += 1+ assert binding.tool_names == ()++@pytest.mark.parametrize("name",(diff --git a/tests/missions/worker_runtime/test_provider_map.py b/tests/missions/worker_runtime/test_provider_map.pyindex c4a1341c5e..d9e0289ff6 100644--- a/tests/missions/worker_runtime/test_provider_map.py+++ b/tests/missions/worker_runtime/test_provider_map.py@@ -207,6 +207,7 @@ def test_ad6_table_is_complete() -> None:"openrouter","grok","nvidia",+ "vertex","ollama","local-openai",}diff --git a/tests/review/test_jarvis_agent_files.py b/tests/review/test_jarvis_agent_files.pyindex 2fb940f9e1..9a8a41b7f7 100644--- a/tests/review/test_jarvis_agent_files.py+++ b/tests/review/test_jarvis_agent_files.py@@ -1,9 +1,4 @@-"""Tests for .claude/agents/jarvis-{worker,reviewer}.md (Phase 8.2).--Plan reference: §6.2 acceptance criterion 1, §AD-2 (reviewer read-only),-Anthropic doc footgun: without a `tools:` frontmatter, the sub-agent-inherits the parent's full toolset.-"""+"""Active review definitions and runtime tool boundaries after agent retirement."""from __future__ import annotationsfrom pathlib import Path@@ -11,115 +6,55 @@ from pathlib import Pathimport pytestimport yaml-REPO_ROOT = Path(__file__).resolve().parents[2]-AGENTS_DIR = REPO_ROOT / ".claude" / "agents"-WORKER_FILE = AGENTS_DIR / "jarvis-worker.md"-REVIEWER_FILE = AGENTS_DIR / "jarvis-reviewer.md"---def _split_frontmatter(text: str) -> tuple[dict, str]:- """Splits the YAML frontmatter from the Markdown body.+from jarvis.core.review.spawns import DEFAULT_REVIEWER_TOOLS, DEFAULT_WORKER_TOOLS- Expects the usual Pandoc/MkDocs/Jarvis-Agent format:- ---- key: value- ---- body...- """- if not text.startswith("---\n"):- raise AssertionError(f"file does not start with --- marker:\n{text[:80]!r}")- end = text.find("\n---\n", 4)- if end == -1:- raise AssertionError("no closing --- marker for frontmatter")- fm_block = text[4:end]- body = text[end + 5 :]- return yaml.safe_load(fm_block) or {}, body+REPO_ROOT = Path(__file__).resolve().parents[2]+AGENTS_DIR = REPO_ROOT / ".agents" / "agents"+REVIEWER_FILE = AGENTS_DIR / "code-reviewer.md"-# -----------------------------------------------------------------------# Existence-# ----------------------------------------------------------------------+def _reviewer():+ text = REVIEWER_FILE.read_text(encoding="utf-8")+ frontmatter, body = text.removeprefix("---\n").split("\n---\n", 1)+ return yaml.safe_load(frontmatter), bodydef test_agents_dir_exists() -> None:- assert AGENTS_DIR.is_dir(), f"{AGENTS_DIR} is missing"-+ assert AGENTS_DIR.is_dir()[email protected]("path", [WORKER_FILE, REVIEWER_FILE])-def test_subagent_file_exists(path: Path) -> None:- assert path.is_file(), f"{path} is missing"--# -----------------------------------------------------------------------# Reviewer — strict tool-allowlist (AD-2)-# ----------------------------------------------------------------------[email protected]("root", [".agents", ".claude"])+def test_active_reviewer_file_exists(root: str) -> None:+ assert (REPO_ROOT / root / "agents" / "code-reviewer.md").is_file()def test_reviewer_frontmatter_strict() -> None:- fm, body = _split_frontmatter(REVIEWER_FILE.read_text(encoding="utf-8"))-- assert fm.get("name") == "jarvis-reviewer"- assert isinstance(fm.get("description"), str) and fm["description"].strip()- assert fm.get("model") == "opus"-- # AD-2: tools EXACTLY "Read, Grep, Glob" — no more, no less.- tools_raw = fm.get("tools")- assert isinstance(tools_raw, str), (- f"tools must be a string in YAML, got {type(tools_raw).__name__}"- )- parsed_tools = [t.strip() for t in tools_raw.split(",")]- assert parsed_tools == ["Read", "Grep", "Glob"], (- f"Reviewer tool-allowlist drift: {parsed_tools!r} "- "— AD-2 requires EXACTLY [Read, Grep, Glob]"+ frontmatter, body = _reviewer()+ assert frontmatter["name"] == "code-reviewer"+ assert frontmatter["description"].strip()+ assert frontmatter["role"] == "reviewer"+ assert tuple(part.strip() for part in frontmatter["tools"].split(",")) == (+ "Read", "Grep", "Glob",)+ assert body.strip()- assert body.strip(), "reviewer body must contain the system-prompt"---def test_reviewer_body_contains_hard_rules() -> None:- """Smoke check: reviewer prompt contains the critical instructions."""- body = REVIEWER_FILE.read_text(encoding="utf-8")- assert "DO NOT solve the task" in body- assert "DO NOT write code" in body- assert "DO NOT edit files" in body- # JSON-only output constraint- assert "JSON only" in body or "Output ONLY valid JSON" in body- # Status enum visible- assert "needs_revision" in body- # Cap-fire-relevant severity values- assert "critical" in body- assert "warning" in body- assert "suggestion" in body+def test_reviewer_body_contains_read_only_instruction() -> None:+ _, body = _reviewer()+ assert "You write NO code" in body+ assert "AGENTS.md" in body+ assert "REQUEST_CHANGES" in body and "BLOCK" in body-# -----------------------------------------------------------------------# Worker — full toolset-# ----------------------------------------------------------------------+def test_runtime_reviewer_cannot_edit_or_execute() -> None:+ assert DEFAULT_REVIEWER_TOOLS == ("Read", "Grep", "Glob")-def test_worker_frontmatter() -> None:- fm, body = _split_frontmatter(WORKER_FILE.read_text(encoding="utf-8"))-- assert fm.get("name") == "jarvis-worker"- assert isinstance(fm.get("description"), str) and fm["description"].strip()- assert fm.get("model") == "sonnet"-- tools_raw = fm.get("tools")- assert isinstance(tools_raw, str), "tools must be a YAML scalar string"- parsed = {t.strip() for t in tools_raw.split(",")}- # Plan §6.2 worker tools: Read, Write, Edit, Bash, Grep, Glob- assert parsed == {"Read", "Write", "Edit", "Bash", "Grep", "Glob"}, (- f"Worker tool-allowlist drift: {parsed!r}"- )- assert body.strip(), "worker body must contain the system-prompt"+def test_runtime_worker_has_its_required_tools() -> None:+ assert set(DEFAULT_WORKER_TOOLS) == {"Read", "Write", "Edit", "Bash", "Grep", "Glob"}-def test_worker_body_mentions_feedback_block() -> None:- """Worker must understand what feedback from previous iterations looks like."""- body = WORKER_FILE.read_text(encoding="utf-8")- # Normalize whitespace, because the plan wording wraps- # after `Reviewer feedback from`.- flat = " ".join(body.split())- assert "Reviewer feedback from iteration" in flat- assert "hard requirement" in flat[email protected]("root", [".agents", ".claude"])+def test_retired_generic_agent_definitions_stay_removed(root: str) -> None:+ for name in ("jarvis-worker.md", "jarvis-reviewer.md"):+ assert not (REPO_ROOT / root / "agents" / name).exists()diff --git a/tests/unit/agentic_ide/test_workspace_explorer.py b/tests/unit/agentic_ide/test_workspace_explorer.pyindex dd172805fa..885675ede0 100644--- a/tests/unit/agentic_ide/test_workspace_explorer.py+++ b/tests/unit/agentic_ide/test_workspace_explorer.py@@ -19,7 +19,7 @@ def test_listing_includes_hidden_and_dependency_directories(tmp_path: Path) -> N(tmp_path / "node_modules").mkdir()(tmp_path / ".github").mkdir()(tmp_path / ".env.example").write_text("TOKEN=\n", encoding="utf-8")- (tmp_path / "README.md").write_text("hello\n", encoding="utf-8")+ (tmp_path / "README.md").write_bytes(b"hello\n")listing = list_workspace_dir(tmp_path)@@ -32,7 +32,7 @@ def test_listing_includes_hidden_and_dependency_directories(tmp_path: Path) -> N"README.md",]assert [entry.is_directory for entry in listing.entries[:3]] == [True, True, True]- assert listing.entries[-1].size == 7+ assert listing.entries[-1].size == 6def test_nested_listing_keeps_every_path_workspace_relative(tmp_path: Path) -> None:diff --git a/tests/unit/audio/test_player_persistent_stream.py b/tests/unit/audio/test_player_persistent_stream.pyindex d4b6ff3d2e..2fcd86978e 100644--- a/tests/unit/audio/test_player_persistent_stream.py+++ b/tests/unit/audio/test_player_persistent_stream.py@@ -60,6 +60,7 @@ def _make_player(monkeypatch) -> tuple[AudioPlayer, list[str]]:player._active_source_rate = Noneplayer._active_device_rate = Noneplayer._device_rate_cache = {}+ player._device_rate_failed = set()events: list[str] = []@@ -275,6 +276,7 @@ async def test_live_portaudio_write_error_still_propagates(monkeypatch) -> None:"""Cancellation handling must not hide an active device failure."""player, _ = _make_player(monkeypatch)+ monkeypatch.setattr(player_module, "_ranked_output_device_indices", lambda *_: [])monkeypatch.setattr(player,"_write_samples",diff --git a/tests/unit/brain/test_honesty_language_parity.py b/tests/unit/brain/test_honesty_language_parity.pyindex 785968e4d0..b526f18f16 100644--- a/tests/unit/brain/test_honesty_language_parity.py+++ b/tests/unit/brain/test_honesty_language_parity.py@@ -33,7 +33,10 @@ def test_no_output_language_call_pins_its_own_default() -> None:source = _MANAGER.read_text(encoding="utf-8")offenders = [call for call in _RESOLVE_CALL_RE.findall(source)- if "default=" in call and "default=DEFAULT_LOCALE" not in call+ if "default=" in call+ and "default=DEFAULT_LOCALE" not in call+ # Detection may defer the choice without choosing a competing locale.+ and 'default="unknown"' not in call]assert not offenders, ("resolve_output_language must use the shared DEFAULT_LOCALE: "diff --git a/tests/unit/brain/test_manager_screen_context.py b/tests/unit/brain/test_manager_screen_context.pyindex 7669915fd3..48da2b977b 100644--- a/tests/unit/brain/test_manager_screen_context.py+++ b/tests/unit/brain/test_manager_screen_context.py@@ -324,8 +324,9 @@ async def test_blind_provider_is_skipped_for_a_screen_turn(result = await manager.generate("take a screenshot", use_history=False)assert result == "grounded answer"- assert created == ["blind", "seeing"]+ assert created[0] == "blind" and set(created[1:]) == {"seeing"}assert len(recorder.calls) == 1+ assert recorder.calls[0]["images"]@pytest.mark.asynciodiff --git a/tests/unit/brain/test_ollama_overview_resident.py b/tests/unit/brain/test_ollama_overview_resident.pyindex a3715d5b4b..450fbb4160 100644--- a/tests/unit/brain/test_ollama_overview_resident.py+++ b/tests/unit/brain/test_ollama_overview_resident.py@@ -66,19 +66,19 @@ def _state(role: str, current: str, **extra) -> ollama_roles.RoleState:def test_resident_payload_adds_up_what_the_jobs_load_at_once() -> None:chat = _model("qwen3.8-16gb:latest", 7.8, "completion", "tools", params="26.9B")voice = _model("ornith:9b", 5.2, "completion", "tools", params="9.0B")- embed = _model("bge-m3:latest", 1.1, "embedding", params="566.70M")+ polish = _model("fixture-polish:latest", 1.1, "completion", params="1.0B")running = {"qwen3.8-16gb:latest": _running("qwen3.8-16gb:latest", 8.8, ctx=32768)}states = [_state("chat", "qwen3.8-16gb:latest"),_state("voice", "ornith:9b", context_tokens=32768, context_source="manual"),_state("tools_screen", "qwen3.8-16gb:latest"),_state("deep", "qwen3.8-16gb:latest"),- _state("embedding", "bge-m3:latest"),+ _state("polish", "fixture-polish:latest"),_state("ack", "qwen3.8-16gb:latest"),]resident = ollama_overview.resident_payload(states,- [chat, voice, embed],+ [chat, voice, polish],running,ollama_roles.Machine(memory_gb=32.0, accelerator_gb=15.9),voice_reserve_gb=4.0,diff --git a/tests/unit/brain/test_paired_plugin_capture_veto.py b/tests/unit/brain/test_paired_plugin_capture_veto.pyindex 956ee2f0dc..17769b1d59 100644--- a/tests/unit/brain/test_paired_plugin_capture_veto.py+++ b/tests/unit/brain/test_paired_plugin_capture_veto.py@@ -168,7 +168,7 @@ def _write_music_skill(root: Path, name: str, plugin_id: str, pattern: str) -> N)-def test_match_skill_for_turn_swaps_disconnected_spotify(tmp_path: Path) -> None:+def test_match_skill_for_turn_swaps_disconnected_spotify(tmp_path: Path, monkeypatch) -> None:"""The live 17:13 veto-before-rematch: Spotify wins the trigger, is notconnected, capture must still return YouTube Music."""_write_music_skill(tmp_path, "plugin-spotify", "spotify", "(musik|music)")@@ -180,8 +180,9 @@ def test_match_skill_for_turn_swaps_disconnected_spotify(tmp_path: Path) -> Noneset_skill_context(SkillContext(registry=registry, runner=_StubRunner())) # type: ignore[arg-type]try:mgr = BrainManager(config=JarvisConfig(), bus=EventBus(), tools={})- mgr._plugin_disconnected = ( # type: ignore[method-assign]- lambda pid, store=None: pid != "youtube_music"+ monkeypatch.setattr(+ BrainManager, "_plugin_disconnected",+ staticmethod(lambda pid, store=None: pid != "youtube_music"),)matched = mgr._match_skill_for_turn("spiel mal musik") # i18n-allowassert matched is not Nonediff --git a/tests/unit/brain/test_run_task_agent.py b/tests/unit/brain/test_run_task_agent.pyindex 83ec3f973d..359cfbef1b 100644--- a/tests/unit/brain/test_run_task_agent.py+++ b/tests/unit/brain/test_run_task_agent.py@@ -115,16 +115,24 @@ async def test_run_task_deep_tier_requests_deep_model(monkeypatch) -> None:asked: dict[str, Any] = {}def _spy_get_brain(name: str, model: str | None = None) -> Any:+ asked["provider"] = nameasked["model"] = modelreturn object()+ def task_chain(intent):+ asked["intent"] = intent+ return [("fixture-provider", "fixture-deep-model")]+class _FakeDispatcher:async def dispatch(self, text: str, **kw: Any) -> Any:return SimpleNamespace(text="x")monkeypatch.setattr(mgr, "_get_brain", _spy_get_brain)+ monkeypatch.setattr(mgr, "_task_provider_chain", task_chain)monkeypatch.setattr(mgr, "_build_dispatcher", lambda *a, **k: _FakeDispatcher())await mgr.run_task(prompt="p", allowed_tools=(), model_tier="deep")# deep tier must resolve to the deep model of the active provider- assert asked["model"] == mgr._deep_model(mgr._active_name)+ assert asked == {+ "intent": "deep", "provider": "fixture-provider", "model": "fixture-deep-model",+ }diff --git a/tests/unit/codex_app_server/test_transport.py b/tests/unit/codex_app_server/test_transport.pyindex f032d8c861..957d866b1e 100644--- a/tests/unit/codex_app_server/test_transport.py+++ b/tests/unit/codex_app_server/test_transport.py@@ -383,7 +383,12 @@ async def test_lazy_start_handshake_scrubs_api_billing_environment_and_reaps_treassert len(harness.calls) == 1assert client.ready is Trueargv, kwargs = harness.calls[0]- assert argv[:5] == (+ codex_offset = argv.index("codex-test")+ if os.name == "posix":+ assert any(str(value).endswith("child_lifeline.py") for value in argv[:codex_offset])+ else:+ assert codex_offset == 0+ assert argv[codex_offset:codex_offset + 5] == ("codex-test","app-server","--strict-config",@@ -3378,6 +3383,11 @@ def test_exact_windows_codex_runtime_state_is_allowed_and_tampering_is_refused((runtime / "apply_patch.bat").write_text(wrapper, encoding="utf-8")(runtime / "applypatch.bat").write_text(wrapper, encoding="utf-8")+ if os.name == "posix":+ runtime.chmod(0o700)+ for fixture_file in (home / "installation_id", *runtime.iterdir()):+ fixture_file.chmod(0o600)+assert (transport._validated_subscription_home(create=False,diff --git a/tests/unit/cu/test_engine_loop.py b/tests/unit/cu/test_engine_loop.pyindex 19722024af..8defd13ca5 100644--- a/tests/unit/cu/test_engine_loop.py+++ b/tests/unit/cu/test_engine_loop.py@@ -378,6 +378,7 @@ def _darwin_world(monkeypatch, **tcc_kwargs):tcc_kwargs.setdefault("default_policy", DialogPolicy.NEVER_ANSWERED)tcc = FakeTCC(**tcc_kwargs)install_port(monkeypatch, tcc.port("darwin"))+ monkeypatch.setattr(engine_mod, "_frontmost_system_consent_owner", lambda: "")return tcc@@ -513,6 +514,7 @@ async def test_dispatch_off_macos_asks_nothing_and_changes_nothing(monkeypatch,tcc = FakeTCC()install_port(monkeypatch, tcc.port(platform))+ monkeypatch.setattr(engine_mod, "sys", SimpleNamespace(platform=platform))executor = FakeExecutor()ok, _detail = await engine_mod._dispatch_tool(diff --git a/tests/unit/local_models/test_assistant_tools.py b/tests/unit/local_models/test_assistant_tools.pyindex 305283511c..43d6407fd6 100644--- a/tests/unit/local_models/test_assistant_tools.py+++ b/tests/unit/local_models/test_assistant_tools.py@@ -11,6 +11,7 @@ from __future__ import annotationsimport asyncioimport inspectfrom pathlib import Path+from types import SimpleNamespacefrom uuid import uuid4import pytest@@ -148,7 +149,14 @@ async def test_safe_reads_run_through_the_executor_on_the_fake_server() -> None:assert status.output["voice"]["status"] is None-async def test_test_plan_tool_reports_per_role() -> None:+async def test_test_plan_tool_reports_per_role(monkeypatch) -> None:+ probes = []++ async def probe(_self, provider, model, *, timeout_s):+ probes.append((provider, model))+ return SimpleNamespace(ok=True, error=None, latency_ms=1.0)++ monkeypatch.setattr("jarvis.brain.healthcheck.BrainHealthChecker.probe", probe)fake = _server()tools = build_tools(_cfg(chat="qwen3.5:4b"), root=ROOT, transport=fake.transport())executor, _bus = _executor()@@ -156,6 +164,7 @@ async def test_test_plan_tool_reports_per_role() -> None:assert result.success, result.errorassert result.output["roles"]["chat"]["status"] == "ok"assert result.output["overall"] == "ok"+ assert probes == [("ollama", "qwen3.5:4b")]async def test_a_failing_handler_is_an_honest_tool_error_not_an_exception() -> None:diff --git a/tests/unit/plugins/tool/test_click_element.py b/tests/unit/plugins/tool/test_click_element.pyindex 33130807fd..a639f8b494 100644--- a/tests/unit/plugins/tool/test_click_element.py+++ b/tests/unit/plugins/tool/test_click_element.py@@ -7,6 +7,7 @@ it would have clicked."""from __future__ import annotations+from types import SimpleNamespacefrom uuid import uuid4import pytest@@ -68,7 +69,7 @@ def recorder(monkeypatch: pytest.MonkeyPatch) -> list[tuple[int, int, str, bool]"jarvis.plugins.tool.click_element._click_windows", _record)# Force the Windows native path so the recorder is hit on every platform.- monkeypatch.setattr("jarvis.plugins.tool.click_element.os.name", "nt")+ monkeypatch.setattr("jarvis.plugins.tool.click_element.os", SimpleNamespace(name="nt"))return callsdiff --git a/tests/unit/plugins/tts/test_realtime_surface_tts.py b/tests/unit/plugins/tts/test_realtime_surface_tts.pyindex 09e8e73de7..b542758a40 100644--- a/tests/unit/plugins/tts/test_realtime_surface_tts.py+++ b/tests/unit/plugins/tts/test_realtime_surface_tts.py@@ -1,16 +1,8 @@-"""STRICT mode separation for the realtime surface fallback voice (2026-07-17).--Realtime and Pipeline are independent modes (maintainer mandate 2026-07-17):-each must work with only its own API keys, and neither may fall back onto the-other's providers or credentials — not even as a last resort. Live incident-2026-07-17 10:04: a gemini-live session (voice Fenrir) aborted a readback and-the re-render spoke as "Charon @ openrouter" because the pipeline `[tts]`-primary was openrouter-tts.--Forward guard: the emergency re-render resolves ONLY a same-family TTS keyed-through the realtime credential slots; no candidate → ``None`` (text-only).-Reverse guard: pipeline TTS credential resolution must never see a-realtime-scoped key slot.+"""Realtime emergency voice keeps its family and session voice.++A realtime recovery uses the same family and the session's resolved credential.+The independently selected pipeline voice may use a shared credential, with a+legacy realtime slot only as the final fallback within that provider family."""from __future__ import annotations@@ -38,7 +30,7 @@ from jarvis.ui.web.provider_spec import PROVIDERS# below instead of a member of the exempt set._REALTIME_PROVIDER_IDS = tuple(spec.id for spec in PROVIDERS if spec.tier == "realtime"-)+) + ("openai-realtime",) # Read-time credential compatibility; no picker card.def _cfg(voice: str = "Fenrir") -> SimpleNamespace:@@ -251,20 +243,13 @@ def test_injected_api_key_wins_over_environment_lookup() -> None:# ----------------------------------------------------------------------------def test_pipeline_tts_credential_map_lists_no_realtime_slots() -> None:- """Static guard: the pipeline TTS key-aware factory consults- ``_TTS_SECRET_CANDIDATES`` — a realtime-scoped slot appearing there would- silently let pipeline mode spend realtime credentials."""+def test_pipeline_tts_uses_realtime_slots_only_as_trailing_family_fallbacks() -> None:for family, candidates in _TTS_SECRET_CANDIDATES.items():- for keyring_key, env_var in candidates:- assert not keyring_key.startswith("realtime_"), (- f"pipeline TTS family {family!r} lists realtime slot "- f"{keyring_key!r}"- )- assert "REALTIME" not in (env_var or ""), (- f"pipeline TTS family {family!r} lists realtime env var "- f"{env_var!r}"- )+ for position, (keyring_key, _env) in enumerate(candidates):+ if keyring_key.startswith("realtime_"):+ assert family == "gemini-flash-tts"+ assert keyring_key == "realtime_gemini_api_key"+ assert position == len(candidates) - 1def test_realtime_slots_are_only_trailing_fallbacks_outside_realtime_ids() -> None:@@ -288,16 +273,15 @@ def test_realtime_slots_are_only_trailing_fallbacks_outside_realtime_ids() -> No)-def test_pipeline_tts_cannot_see_a_realtime_only_key(+def test_pipeline_tts_can_use_its_own_familys_realtime_key_as_a_last_resort(monkeypatch: pytest.MonkeyPatch,) -> None:- """Behavioral guard: with ONLY the dedicated realtime Gemini key present,- the pipeline gemini-flash-tts family reads as keyless — pipeline mode- must not light up on a realtime-only install."""+ """A single Gemini key supports the explicit pipeline choice, without a cross-family key."""def _secret(name: str, env_fallback: str | None = None, **_kw: object):return "rt-only-key" if name == "realtime_gemini_api_key" else Nonemonkeypatch.setattr("jarvis.core.config.get_secret", _secret)tts_cfg = SimpleNamespace(use_vertex=False)- assert _tts_has_credential("gemini-flash-tts", tts_cfg) is False+ assert _tts_has_credential("gemini-flash-tts", tts_cfg) is True+ assert _tts_has_credential("grok-voice", tts_cfg) is Falsediff --git a/tests/unit/realtime/local_server/test_supervisor.py b/tests/unit/realtime/local_server/test_supervisor.pyindex a3a91d78d7..cad97ce1fc 100644--- a/tests/unit/realtime/local_server/test_supervisor.py+++ b/tests/unit/realtime/local_server/test_supervisor.py@@ -49,6 +49,7 @@ def _local_models_switch_on(monkeypatch: pytest.MonkeyPatch) -> None:lambda: (16.0, "nvidia-smi"),)monkeypatch.setattr(supervisor, "_probe_client", lambda: None)+ monkeypatch.setattr("jarvis.core.config.get_secret", lambda *args, **kwargs: None)def _spawn_ready(monkeypatch, tmp_path: Path) -> list[dict[str, Any]]:diff --git a/tests/unit/skills/test_builtin_skills.py b/tests/unit/skills/test_builtin_skills.pyindex 19218a0068..3d6796e753 100644--- a/tests/unit/skills/test_builtin_skills.py+++ b/tests/unit/skills/test_builtin_skills.py@@ -52,8 +52,13 @@ def test_skill_has_valid_triggers(name: str) -> None:return# Meta skills (category="meta") may live without an auto trigger — they# are pulled by the supervisor via intent dispatch, not by the- # TriggerMatcher. All other categories need at least one.- if skill.frontmatter.category != "meta":+ # TriggerMatcher. Paired plugins may instead use the relevance channel's+ # explicit verb/object vocabulary, without broad brand regexes.+ if skill.frontmatter.plugin_id and not skill.frontmatter.triggers:+ assert skill.frontmatter.plugin_id in skill.frontmatter.requires_tools+ assert skill.frontmatter.intent_verbs and skill.frontmatter.intent_objects+ assert skill.frontmatter.when_to_use+ elif skill.frontmatter.category != "meta":assert len(skill.frontmatter.triggers) >= 1, (f"{name} needs at least one trigger (category={skill.frontmatter.category})")diff --git a/tests/unit/society/test_cli_routines.py b/tests/unit/society/test_cli_routines.pyindex 17c2ca3d24..a875190eb9 100644--- a/tests/unit/society/test_cli_routines.py+++ b/tests/unit/society/test_cli_routines.py@@ -279,5 +279,6 @@ def test_routine_approval_delegation_is_only_for_society(monkeypatch):)for session_id in (None, "ordinary-chat"):assert not any(- "approval_mode" in arg for arg in jarvis_harness.codex_config_args(session_id)+ "default_tools_approval_mode" in arg+ for arg in jarvis_harness.codex_config_args(session_id))diff --git a/tests/unit/speech/test_nonstreaming_residue_honesty.py b/tests/unit/speech/test_nonstreaming_residue_honesty.pyindex d202b49536..ee5ce3aced 100644--- a/tests/unit/speech/test_nonstreaming_residue_honesty.py+++ b/tests/unit/speech/test_nonstreaming_residue_honesty.py@@ -70,7 +70,8 @@ async def _run_nonstreaming_turn(response: str, language: str) -> list[str]:async def _transcribe(_pcm: bytes) -> Transcript:# i18n-allow: spoken German user prompt in the test- prompt = "Wie ist das Wetter?"+ # Keep lookup acknowledgements outside this output-filter test.+ prompt = "Antworte bitte." if language == "de" else "Please respond." # i18n-allowreturn Transcript(text=prompt, language=language, confidence=0.99)async def _brain(*_a: object, **_kw: object) -> str:diff --git a/tests/unit/speech/test_pipeline_push_to_talk.py b/tests/unit/speech/test_pipeline_push_to_talk.pyindex 0df846699a..a668852d42 100644--- a/tests/unit/speech/test_pipeline_push_to_talk.py+++ b/tests/unit/speech/test_pipeline_push_to_talk.py@@ -24,6 +24,8 @@ from collections.abc import AsyncIteratorfrom contextlib import asynccontextmanagerfrom types import SimpleNamespace+import pytest+import jarvis.speech.pipeline as pipeline_modfrom jarvis.core.events import TranscriptionUpdatefrom jarvis.core.protocols import AudioChunk@@ -33,6 +35,8 @@ from jarvis.sessions.constants import HANGUP_HOTKEY, HANGUP_TURN_COMPLETEfrom jarvis.speech.pipeline import PipelineState, SpeechPipeline, TurnTakingStatefrom tests.fakes.fake_permission_service import FakePermissionService+pytestmark = pytest.mark.usefixtures("granted_microphone")+class FakeTTS:name = "fake-tts"diff --git a/tests/unit/speech/test_stt_provider_live_switch.py b/tests/unit/speech/test_stt_provider_live_switch.pyindex fd8b76ae44..7d2d262048 100644--- a/tests/unit/speech/test_stt_provider_live_switch.py+++ b/tests/unit/speech/test_stt_provider_live_switch.py@@ -26,7 +26,7 @@ def _bare_pipeline() -> tuple[SpeechPipeline, Any, Any]:old_provider = _Provider("groq-api")old_dictation = _Provider("faster-whisper")pipeline._config = SimpleNamespace(stt=STTConfig(provider="groq-api", fallback=""))- pipeline._dictation_cfg = SimpleNamespace(bias_prompt="")+ pipeline._dictation_cfg = SimpleNamespace(bias_prompt="", local_engine=False)pipeline._stt = Nonepipeline._utterance_stt = old_providerpipeline._probe_stt = old_provider@@ -42,12 +42,14 @@ def test_pipeline_switch_replaces_voice_and_next_dictation_provider(pipeline, old_provider, _old_dictation = _bare_pipeline()built: list[str] = []- def _build(cfg: Any) -> _Provider:+ def _build(cfg: Any, *, dictionary_bias: bool = True) -> _Provider:built.append(str(cfg.provider))+ assert dictionary_bias is (len(built) == 1)return _Provider(str(cfg.provider))monkeypatch.setattr("jarvis.plugins.stt.build_stt_from_config", _build)monkeypatch.setattr("jarvis.plugins.stt.provider_runs_on_device", lambda _provider: False)+ monkeypatch.setattr("jarvis.speech.pipeline._resolve_stt_fallback_chain", lambda *_: ())monkeypatch.setattr("jarvis.speech.stt_fallback.wrap_stt_with_fallback",lambda provider, _cfg: provider,@@ -73,7 +75,9 @@ def test_pipeline_switch_replaces_voice_and_next_dictation_provider(# The dictation lane builds its own prompt-free instance lazily. Its first# use after the cut-over must read the new provider, not the stale cache.- assert pipeline._dictation_stt().name == "openrouter-stt"+ dictation = pipeline._dictation_stt()+ assert dictation.name == "openrouter-stt"+ assert dictation is not pipeline._probe_sttassert built == ["openrouter-stt", "openrouter-stt"]diff --git a/tests/unit/speech/test_wake_language_aware.py b/tests/unit/speech/test_wake_language_aware.pyindex 5751f49f7b..829d3424f1 100644--- a/tests/unit/speech/test_wake_language_aware.py+++ b/tests/unit/speech/test_wake_language_aware.py@@ -211,7 +211,7 @@ async def test_the_stt_language_list_has_exactly_one_source():from jarvis.ui.web.settings_routes import _STT_LANGUAGES, get_stt_languagerequest = SimpleNamespace(app=SimpleNamespace(state=SimpleNamespace(config=None)))- body = await get_stt_language(request) # type: ignore[arg-type]+ body = get_stt_language(request) # type: ignore[arg-type]assert body["options"] == list(_STT_LANGUAGES), ("GET /api/settings/stt-language must ship the full accepted set — it is ""the only place the UI can learn which languages are selectable."diff --git a/tests/unit/telemetry/test_latency_span_event.py b/tests/unit/telemetry/test_latency_span_event.pyindex b699c3d12a..071db5f35c 100644--- a/tests/unit/telemetry/test_latency_span_event.py+++ b/tests/unit/telemetry/test_latency_span_event.py@@ -76,6 +76,7 @@ def test_latency_phase_is_a_string_enum_source_of_truth() -> None:"realtime_scrub_cancel","realtime_cancel","realtime_turn_complete",+ "realtime_empty_turn_reask",}assert {p.value for p in LatencyPhase} == expecteddiff --git a/tests/unit/test_codex_auth.py b/tests/unit/test_codex_auth.pyindex 8c3a33d4e7..1ad3294674 100644--- a/tests/unit/test_codex_auth.py+++ b/tests/unit/test_codex_auth.py@@ -415,6 +415,16 @@ def test_guarded_windows_login_closes_job_when_guardian_exits(def handoff(*_args: object, **_kwargs: object) -> None:events.append("handoff")+ def hold_liveness(path):+ import os++ descriptor = os.open(path, os.O_CREAT | os.O_EXCL | os.O_RDWR, 0o600)+ captured["liveness_fd"] = descriptor+ return descriptor++ # This fixture exercises the Windows job wrapper, not an OS lock. The+ # inherited-file and real guardian tests cover native liveness separately.+ monkeypatch.setattr(codex_mod, "_hold_parent_liveness_lock", hold_liveness)monkeypatch.setattr(codex_mod.sys, "platform", "win32")monkeypatch.setattr(codex_mod.subprocess, "Popen", spawn)monkeypatch.setattr(diff --git a/tests/unit/test_router_delegator_policy.py b/tests/unit/test_router_delegator_policy.pyindex 1d2605ecc2..ddaf4e360d 100644--- a/tests/unit/test_router_delegator_policy.py+++ b/tests/unit/test_router_delegator_policy.py@@ -55,8 +55,8 @@ class TestDelegatorPolicyInPrompt:"the router spawn worker missions for simple questions")assert "BEI UNSICHERHEIT: MACH ES SELBST" in SYSTEM_PROMPT- # The reversed doctrine keeps 'delegier' for the genuinely heavy case.- assert "delegier" in SYSTEM_PROMPT.lower()+ # Delegation to an existing agent remains an explicit tool choice.+ assert "delegate_to_agent" in SYSTEM_PROMPTdef test_news_question_routed_to_search_web_not_spawn(self) -> None:"""The concrete 2026-06-10 complaint, pinned as a prompt example:diff --git a/tests/unit/ui/test_icon_identity.py b/tests/unit/ui/test_icon_identity.pyindex 2cac2e9aee..f5e0453012 100644--- a/tests/unit/ui/test_icon_identity.py+++ b/tests/unit/ui/test_icon_identity.py@@ -132,8 +132,8 @@ def test_bundled_ico_carries_taskbar_sizes() -> None:assert (256, 256) in sizes-def test_bundled_app_icon_png_is_white_rounded_tile() -> None:- """Desktop PNG is original Gigi on a white squircle, corners transparent."""+def test_bundled_app_icon_png_is_dark_rounded_tile() -> None:+ """Desktop PNG keeps the dark rounded tile and transparent corners."""from PIL import Imagefrom jarvis.assets import bundled_app_icon_png@@ -145,7 +145,7 @@ def test_bundled_app_icon_png_is_white_rounded_tile() -> None:assert width == heightassert image.getpixel((0, 0))[3] < 10tile = image.getpixel((width // 2, 2))- assert tile[0] > 240 and tile[1] > 240 and tile[2] > 240 and tile[3] > 240+ assert max(tile[:3]) < 80 and tile[3] > 240def test_bundled_app_icon_png_exists_for_linux() -> None:diff --git a/tests/unit/ui/web/test_society_figure_routes.py b/tests/unit/ui/web/test_society_figure_routes.pyindex 63531a8b89..51ddbbeb1e 100644--- a/tests/unit/ui/web/test_society_figure_routes.py+++ b/tests/unit/ui/web/test_society_figure_routes.py@@ -10,6 +10,7 @@ from __future__ import annotationsimport importlib.utilimport sys+from copy import deepcopyfrom pathlib import Pathimport pytest@@ -53,8 +54,30 @@ def test_garbage_is_refused_as_not_a_glb(client: TestClient):@pytest.mark.skipif(_shipped() is None, reason="no figure asset built yet")-def test_a_contract_figure_is_accepted_stored_and_served(client: TestClient):- body = _shipped().read_bytes() # type: ignore[union-attr]+def test_a_contract_figure_is_accepted_stored_and_served(client: TestClient, tmp_path: Path):+ # Uploads are standalone. Shipped figures share a separate clip library,+ # so embed those existing clips in this test-only file before importing it.+ gt = _tools()+ shipped = _shipped()+ figure_glb = gt.read_glb(shipped)+ extras = gt.figure_extras(figure_glb.doc)+ library = gt.read_glb(shipped.with_name(extras.pop("clips_from")))+ nodes = gt.node_index_by_name(figure_glb.doc)+ figure_glb.doc["animations"] = deepcopy(library.doc["animations"])+ for animation in figure_glb.doc["animations"]:+ for sampler in animation["samplers"]:+ for field in ("input", "output"):+ index = sampler[field]+ sampler[field] = gt.append_accessor(+ figure_glb, gt.accessor_values(library, index),+ library.doc["accessors"][index]["type"],+ )+ for channel in animation["channels"]:+ node = library.doc["nodes"][channel["target"]["node"]]["name"]+ channel["target"]["node"] = nodes[node]+ standalone = tmp_path / "standalone.glb"+ gt.write_glb(standalone, figure_glb.doc, figure_glb.blob)+ body = standalone.read_bytes()res = client.post("/api/society/figures?name=My Hero", content=body)assert res.status_code == 200, res.textpayload = res.json()