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 pipeline capability fallbacks
Ruben Lütkefd9f403fb175
diff --git a/jarvis/brain/tool_use_loop.py b/jarvis/brain/tool_use_loop.pyindex 7e12a89eeb..dd20fad07c 100644--- a/jarvis/brain/tool_use_loop.py+++ b/jarvis/brain/tool_use_loop.py@@ -584,6 +584,7 @@ class ToolUseLoop:# Execute toolssuppress_output: str | None = None+ unknown_tool_requested = Falsefor tc in agg.tool_calls:tool_name = tc.get("name", "")tool_args = tc.get("input", {})@@ -673,9 +674,7 @@ class ToolUseLoop:tid,)tool_result_payload = {"error": f"Tool '{tool_name}' not available"}- suppress_output = _anti_silence_phrase(- user_utterance, reply_language- )+ unknown_tool_requested = Trueelif tool_name == "spawn_worker" and _is_meta_debug_intent(user_utterance):log.info("tool_use_loop: spawn_worker blocked for a meta/debug utterance"@@ -909,6 +908,20 @@ class ToolUseLoop:images=tuple(_img_blocks),))+ # A missing tool is a full-turn refusal only when nothing else ran.+ # In a multi-call round, one stale/model-invented name must never+ # overwrite successful evidence from another call with the generic+ # "missing tool" phrase. Feed both results back to the model so it+ # can report the partial outcome honestly.+ if (+ unknown_tool_requested+ and suppress_output is None+ and not final_agg.executed_tool_names+ ):+ suppress_output = _anti_silence_phrase(+ user_utterance, reply_language+ )+# Budget check after executionif self._budget.exceeded():final_agg.finish_reason = "budget_exceeded"diff --git a/jarvis/diagnostics/doctor.py b/jarvis/diagnostics/doctor.pyindex 77fc4882fc..690d083bef 100644--- a/jarvis/diagnostics/doctor.py+++ b/jarvis/diagnostics/doctor.py@@ -139,14 +139,22 @@ def check_harness_config(config: Any) -> list[DoctorFinding]:return [DoctorFinding("harness-config", "fail",f"harness registry unreadable: {exc}")]- oc = getattr(getattr(config, "harness", None), "openclaw", None)- if oc is not None and getattr(oc, "enabled", False) and "openclaw" not in registered:+ harness_config = getattr(config, "harness", None)+ worker_harness = getattr(harness_config, "jarvis_agent", None)+ if worker_harness is None:+ worker_harness = getattr(harness_config, "openclaw", None)+ worker_registered = bool({"jarvis_agent", "openclaw"} & registered)+ if (+ worker_harness is not None+ and getattr(worker_harness, "enabled", False)+ and not worker_registered+ ):findings.append(DoctorFinding("harness-config", "warn",- "[harness.openclaw].enabled = true, but 'openclaw' is not a "- "registered harness — the block is inert",- hint=("Set [harness.openclaw].enabled = false. Heavy sub-agent work "- "runs through spawn_worker regardless."),+ "[harness.jarvis_agent].enabled = true, but no Jarvis-Agent "+ "worker harness is registered - the block is inert",+ hint=("Set [harness.jarvis_agent].enabled = false. Heavy Jarvis-Agent "+ "work runs through spawn_worker regardless."),))findings.append(DoctorFinding(diff --git a/jarvis/workflows/seed.py b/jarvis/workflows/seed.pyindex 18c4460da6..ae4b787232 100644--- a/jarvis/workflows/seed.py+++ b/jarvis/workflows/seed.py@@ -6,7 +6,7 @@ meaningful examples, be able to click "Run", and get a result right away.- *Morning Briefing* (cron 30 7 * * *) — brain_prompt → speak chain. Producesa mini standup announcement. No external service needed.-- *Code Review* (manual) — harness_dispatch to OpenClaw.+- *Code Review* (manual) — git diff capture followed by a brain review.- *URL Summary* (manual, input field ``url``) — brain_prompt with thetemplate variable {{input.url}}. Demos input binding."""@@ -82,32 +82,41 @@ def _code_review() -> WorkflowDef:id=_WF_CODE_REVIEW,name="Code Review",description=(- "Analyzes the open changes on the current git branch via the "- "OpenClaw harness."+ "Captures the open changes on the current git branch and asks "+ "the active brain for a concise review."),trigger=ManualTrigger(),steps=(- HarnessDispatchStep(- label="OpenClaw dispatch",- harness="openclaw",+ ShellCmdStep(+ label="Capture pending diff",+ command="git diff --no-ext-diff --",+ timeout_s=30.0,+ max_output_chars=30_000,+ ),+ BrainPromptStep(+ label="Review pending diff",prompt=(- "Review all pending changes on the current git branch. "- "Identify potential bugs, security issues, or style "- "inconsistencies. Return a bullet-point summary in German."+ "Review the following pending git diff. Identify concrete "+ "bugs, security issues, regressions, and missing tests. "+ "Prioritize findings by severity, cite the affected file "+ "and line when possible, and return concise bullet points "+ "in the configured output language. If the diff is empty, "+ "say that no tracked changes are pending.\n\n"+ "{{prev.output}}"),- allow_computer_use=False,+ max_output_chars=4_000,),SpeakStep(label="Announce review result",- text="Code-Review fertig. {{prev.output}}", # i18n-allow+ text="Code review complete. {{prev.output}}",priority="normal",- language="de",+ language="auto",),),enabled=True,created_at_ns=now_ns,created_by="seed",- tags=("demo", "harness", "git"),+ tags=("demo", "brain", "git"),)@@ -264,12 +273,32 @@ async def ensure_seed_workflows(store: WorkflowStore) -> int:updates to the seed code from overwriting user edits."""added = 0+ migrated = 0for wf in SEED_WORKFLOWS:existing = await store.get_workflow(str(wf.id))if existing is not None:+ if wf.id == _WF_CODE_REVIEW and _is_legacy_code_review(existing):+ await store.upsert_workflow(wf)+ migrated += 1continueawait store.upsert_workflow(wf)added += 1if added:log.info("Seed workflows written: %d new", added)+ if migrated:+ log.info("Legacy unavailable seed workflows migrated: %d", migrated)return added+++def _is_legacy_code_review(row: dict[str, object]) -> bool:+ """Identify only the shipped dead seed, never an arbitrary user workflow."""+ if row.get("created_by") != "seed":+ return False+ try:+ definition = WorkflowDef.model_validate_json(str(row.get("def_json") or ""))+ except Exception: # noqa: BLE001 - malformed legacy data stays user-owned+ return False+ return any(+ isinstance(step, HarnessDispatchStep) and step.harness == "openclaw"+ for step in definition.steps+ )diff --git a/tests/unit/brain/test_tool_use_loop.py b/tests/unit/brain/test_tool_use_loop.pyindex 3c2dfba0d9..d2a1605e92 100644--- a/tests/unit/brain/test_tool_use_loop.py+++ b/tests/unit/brain/test_tool_use_loop.py@@ -261,6 +261,42 @@ async def test_unknown_tool_publishes_guard_denied_event() -> None:assert "unknown tool name" in executor.denied[0][1]+class _SuccessfulAndUnknownBrain:+ """One valid call plus one stale name must produce a partial result."""++ def __init__(self) -> None:+ self.requests: list[BrainRequest] = []++ async def complete(self, req: BrainRequest) -> AsyncIterator[BrainDelta]:+ self.requests.append(req)+ if len(self.requests) == 1:+ yield BrainDelta(tool_call={"id": "ok", "name": "run_shell", "input": {}})+ yield BrainDelta(tool_call={"id": "stale", "name": "retired_tool", "input": {}})+ yield BrainDelta(finish_reason="tool_use")+ return+ yield BrainDelta(content="The shell action succeeded; the retired action was skipped.")+ yield BrainDelta(finish_reason="stop")+++async def test_unknown_tool_cannot_overwrite_successful_call() -> None:+ brain = _SuccessfulAndUnknownBrain()+ executor = _ExecWithDeniedLog()+ loop = ToolUseLoop(+ brain,+ {"run_shell": _RunShellTool()},+ executor, # type: ignore[arg-type]+ )++ result = await loop.run([], user_utterance="Run the check and the optional follow-up.")++ assert executor.calls and executor.calls[0][0].name == "run_shell"+ assert executor.denied and executor.denied[0][0] == "retired_tool"+ assert "succeeded" in result.text+ assert "missing" not in result.text.lower()+ assert len(brain.requests) == 2++@pytest.mark.asyncioasync def test_howto_guard_publishes_guard_denied_event() -> None:brain = _Brain()diff --git a/tests/unit/diagnostics/test_doctor_diagnostics.py b/tests/unit/diagnostics/test_doctor_diagnostics.pyindex 243b34d63b..99cf284d1a 100644--- a/tests/unit/diagnostics/test_doctor_diagnostics.py+++ b/tests/unit/diagnostics/test_doctor_diagnostics.py@@ -53,6 +53,21 @@ def test_harness_config_flags_inert_openclaw() -> None:assert "inert" in warns[0].message+def test_harness_config_flags_real_aliased_config() -> None:+ """The real Pydantic alias must not make inert config invisible."""+ from jarvis.core.config import HarnessConfig++ config = SimpleNamespace(+ harness=HarnessConfig.model_validate({+ "openclaw": {"enabled": True, "version": "test-only"},+ }),+ )++ findings = check_harness_config(config)++ assert any(f.status == "warn" and "inert" in f.message for f in findings)++def test_harness_config_silent_when_disabled() -> None:config = SimpleNamespace(harness=SimpleNamespace(openclaw=SimpleNamespace(enabled=False)),diff --git a/tests/unit/workflows/test_store_and_runner.py b/tests/unit/workflows/test_store_and_runner.pyindex 9a4172de4e..9ad6ffdead 100644--- a/tests/unit/workflows/test_store_and_runner.py+++ b/tests/unit/workflows/test_store_and_runner.py@@ -25,7 +25,9 @@ from jarvis.workflows import (from jarvis.workflows.schema import (BrainPromptStep,CronTrigger,+ HarnessDispatchStep,ManualTrigger,+ ShellCmdStep,SpeakStep,WorkflowDef,)@@ -107,6 +109,39 @@ async def test_seed_is_idempotent(store: WorkflowStore) -> None:assert second == 0+async def test_code_review_seed_has_no_phantom_harness(store: WorkflowStore) -> None:+ from jarvis.workflows.seed import SEED_WORKFLOWS++ code_review = next(wf for wf in SEED_WORKFLOWS if wf.name == "Code Review")++ assert isinstance(code_review.steps[0], ShellCmdStep)+ assert not any(isinstance(step, HarnessDispatchStep) for step in code_review.steps)+++async def test_legacy_openclaw_seed_is_migrated(store: WorkflowStore) -> None:+ from jarvis.workflows.seed import SEED_WORKFLOWS++ replacement = next(wf for wf in SEED_WORKFLOWS if wf.name == "Code Review")+ legacy = replacement.model_copy(update={+ "steps": (+ HarnessDispatchStep(+ label="Legacy dispatch",+ harness="openclaw",+ prompt="Review the pending changes in this repository.",+ ),+ ),+ "tags": ("demo", "harness", "git"),+ })+ await store.upsert_workflow(legacy)++ added = await ensure_seed_workflows(store)+ migrated = await store.get_def(str(replacement.id))++ assert added == len(SEED_WORKFLOWS) - 1+ assert migrated is not None+ assert isinstance(migrated.steps[0], ShellCmdStep)++async def test_runs_crud(store: WorkflowStore) -> None:wf = WorkflowDef(name="X",