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: explain the quiet exception handlers the local commits added
rubenluetke10-beep6848ece749b3
diff --git a/jarvis/appshot/picker/__init__.py b/jarvis/appshot/picker/__init__.pyindex 74813e9697..f9afb235e2 100644--- a/jarvis/appshot/picker/__init__.py+++ b/jarvis/appshot/picker/__init__.py@@ -45,7 +45,7 @@ def decode(line: str) -> dict[str, Any] | None:"""One parsed line, or ``None`` for blank or garbled input."""try:payload = json.loads(line.strip())- except (ValueError, TypeError):+ except (ValueError, TypeError): # a garbled picker line is skipped, not an errorreturn Nonereturn payload if isinstance(payload, dict) else Nonediff --git a/jarvis/appshot/picker/renderer.py b/jarvis/appshot/picker/renderer.pyindex 61366fd1b4..2d6fcd71bd 100644--- a/jarvis/appshot/picker/renderer.py+++ b/jarvis/appshot/picker/renderer.py@@ -421,7 +421,7 @@ class Picker(QObject):self._settings = QSettings("PersonalJarvis", "AppshotPicker")try:saved = int(self._settings.value("zoom", MAG_DEFAULT_ZOOM))- except (TypeError, ValueError):+ except (TypeError, ValueError): # a corrupt saved zoom falls back to the defaultsaved = MAG_DEFAULT_ZOOMself.zoom = saved if saved in MAG_ZOOMS else MAG_DEFAULT_ZOOMself._ants = QTimer(self)diff --git a/jarvis/appshot/region.py b/jarvis/appshot/region.pyindex 380e0c45dc..3ca49f5766 100644--- a/jarvis/appshot/region.py+++ b/jarvis/appshot/region.py@@ -201,7 +201,7 @@ def step_zoom(current: int, steps: int) -> int:"""Move ``steps`` notches along :data:`MAG_ZOOMS` (positive = closer)."""try:index = MAG_ZOOMS.index(current)- except ValueError:+ except ValueError: # an unknown zoom restarts from the defaultindex = MAG_ZOOMS.index(MAG_DEFAULT_ZOOM)return MAG_ZOOMS[max(0, min(len(MAG_ZOOMS) - 1, index + steps))]@@ -233,7 +233,7 @@ def parse_selection(payload: dict[str, Any]) -> Selection | None:try:info = {key: float(screen[key]) for key in ("x", "y", "w", "h", "dpr")}frac = tuple(max(0.0, min(1.0, float(v))) for v in rect)- except (KeyError, TypeError, ValueError):+ except (KeyError, TypeError, ValueError): # a malformed selection is refused via Nonereturn Noneif frac[2] <= 0.0 or frac[3] <= 0.0:return None@@ -470,7 +470,7 @@ async def _run_picker(timeout_s: float) -> tuple[dict[str, Any] | None, int | Notry:try:payload = await asyncio.wait_for(asyncio.shield(reader), timeout=timeout_s)- except TimeoutError:+ except TimeoutError: # the timeout is reported through timed_outtimed_out = Trueawait asyncio.to_thread(_cancel, proc)finally:diff --git a/jarvis/appshot/service.py b/jarvis/appshot/service.pyindex e86dc9dccc..5b200d032b 100644--- a/jarvis/appshot/service.py+++ b/jarvis/appshot/service.py@@ -168,7 +168,7 @@ async def _pick_area(service: Any) -> tuple[int, int, int, int] | AppshotResult:try:selection = await pick_region()- except RegionUnavailable as exc:+ except RegionUnavailable as exc: # reported to the caller as a refused appshotreturn AppshotResult(status="refused", reason_code="region_unavailable", message=str(exc))if selection is None:return AppshotResult(diff --git a/jarvis/brain/identity.py b/jarvis/brain/identity.pyindex 6360868417..0438c4c074 100644--- a/jarvis/brain/identity.py+++ b/jarvis/brain/identity.py@@ -84,7 +84,7 @@ def character_block(*, path: Path | None = None, compact: bool = False) -> str:return cached[2]try:mtime = target.stat().st_mtime- except OSError:+ except OSError: # no SOUL.md yet means no identity blockreturn ""if cached is not None and cached[0] == mtime:with _cache_lock:diff --git a/jarvis/core/shared_tls.py b/jarvis/core/shared_tls.pyindex 48970aa874..a8b72cdbb5 100644--- a/jarvis/core/shared_tls.py+++ b/jarvis/core/shared_tls.py@@ -102,7 +102,7 @@ def _patch_transport(cls: type) -> bool:try:params = inspect.signature(init).parameters- except (TypeError, ValueError):+ except (TypeError, ValueError): # an uninspectable httpx stays unpatchedreturn Falseif not _REQUIRED_PARAMS <= params.keys():return Falsediff --git a/jarvis/memory/soul.py b/jarvis/memory/soul.pyindex 8e5d0e74cc..1fc27f8651 100644--- a/jarvis/memory/soul.py+++ b/jarvis/memory/soul.py@@ -96,7 +96,7 @@ class Soul:except Exception:try:os.unlink(tmp_path)- except OSError:+ except OSError: # best-effort temp cleanup; the original error re-raisespassraise@@ -292,7 +292,7 @@ def sync_name(path: str | Path, name: str) -> bool:return Falsetry:return edit_soul(path, lambda soul: soul.set_name(name))- except FileNotFoundError:+ except FileNotFoundError: # no SOUL.md yet; the prompt directive carries the namereturn Falseexcept Exception: # noqa: BLE001 — cosmetic sync; the prompt directive carries the namelog.warning("SOUL.md: could not record the assistant name", exc_info=True)diff --git a/jarvis/missions/ownership.py b/jarvis/missions/ownership.pyindex b9be13fe33..a35dd68890 100644--- a/jarvis/missions/ownership.py+++ b/jarvis/missions/ownership.py@@ -39,7 +39,7 @@ def _process_start_ms(pid: int) -> int | None:"""Start time of ``pid`` in epoch milliseconds, or None if unknowable."""try:import psutil- except ImportError:+ except ImportError: # psutil is optional; the start time is then unknownreturn Nonetry:return int(psutil.Process(pid).create_time() * 1000)@@ -79,11 +79,11 @@ def owner_is_alive(pid: int, start_ms: int) -> bool | None:return abs(own_start - start_ms) <= _START_TIME_TOLERANCE_MStry:import psutil- except ImportError:+ except ImportError: # psutil is optional; liveness is then unknownreturn Nonetry:actual_start = _process_start_ms(pid)- except psutil.NoSuchProcess:+ except psutil.NoSuchProcess: # the owner process is gone: that is the answerreturn Falseexcept Exception as exc: # noqa: BLE001 - an unreadable owner must count as "unknown", not "dead"log.debug("mission ownership: liveness of pid %s unknown: %s", pid, exc)diff --git a/jarvis/plugins/tool/remember.py b/jarvis/plugins/tool/remember.pyindex 14e67fba64..b9144d0a54 100644--- a/jarvis/plugins/tool/remember.py+++ b/jarvis/plugins/tool/remember.py@@ -54,9 +54,9 @@ class RememberTool:said = str(getattr(ctx, "user_utterance", "") or "")try:change = await asyncio.to_thread(remember_explicitly, fact, evidence=said)- except LookupError:+ except LookupError: # no MEMORY.md notebook: use the legacy storereturn await self._legacy(fact, str(args.get("category") or "general").strip())- except (ValueError, OSError) as exc:+ except (ValueError, OSError) as exc: # reported to the model as a failed savereturn ToolResult(success=False, output=None, error=f"not saved: {exc}")if change is None:return ToolResult(success=True, output=f"Already in MEMORY.md: {fact}")diff --git a/jarvis/realtime/local_voice_setup.py b/jarvis/realtime/local_voice_setup.pyindex 773ee37133..37d3c1529c 100644--- a/jarvis/realtime/local_voice_setup.py+++ b/jarvis/realtime/local_voice_setup.py@@ -611,7 +611,7 @@ async def _without_toolless(names: set[str]) -> set[str]:same_model,)from jarvis.brain.ollama_pull import server_root # noqa: PLC0415- except ImportError:+ except ImportError: # optional local-model helpers: keep the listreturn namestry:snapshot = await cached_snapshot(server_root())diff --git a/jarvis/ui/web/outputs_routes.py b/jarvis/ui/web/outputs_routes.pyindex aa98db382a..a6988b1ee7 100644--- a/jarvis/ui/web/outputs_routes.py+++ b/jarvis/ui/web/outputs_routes.py@@ -179,7 +179,7 @@ def _parse_slug(name: str) -> dict[str, Any]:dt = datetime.strptime(ts, "%Y%m%dT%H%M%S").replace(tzinfo=UTC)started_at: float | None = dt.timestamp()- except ValueError:+ except ValueError: # no parseable timestamp means no start timestarted_at = Nonerough = m.group("utterance").replace("-", " ").strip()utterance = rough[:1].upper() + rough[1:] if rough else None@@ -358,7 +358,7 @@ async def _terminal_outcome_details(for event_type, payload_json in rows:try:payload = json.loads(payload_json or "{}")- except (ValueError, TypeError):+ except (ValueError, TypeError): # a corrupt event row is skipped; the run renderscontinueevent_type = str(event_type)if event_type == "MissionApproved":@@ -469,7 +469,7 @@ async def _live_continuation_map(request: Request) -> dict[str, str]:continue # only a LIVE child resolves the run/not-run ambiguitytry:parent = json.loads(payload_json or "{}").get("parent_mission_id")- except (ValueError, TypeError):+ except (ValueError, TypeError): # a corrupt payload names no parentparent = Noneif not parent:continue@@ -583,7 +583,7 @@ async def list_outputs(request: Request) -> OutputsResponse:if parsed["started_at"] is None:try:parsed["started_at"] = entry.stat().st_mtime- except OSError:+ except OSError: # an unreadable folder keeps no start timepassprefix = dir_to_mission_prefix.get(entry.name)# Look up by the mission-id prefix encoded in the dir-name. For@@ -687,7 +687,7 @@ def _count_deliverables(session_dir: Path) -> int:continuetry:rel_parts = child.relative_to(session_dir).parts- except ValueError:+ except ValueError: # a path outside the session is no deliverablecontinueif _is_deliverable_relpath(rel_parts):count += 1@@ -973,7 +973,7 @@ async def list_output_artifacts(slug: str, request: Request) -> dict[str, Any]:continuetry:stat = child.stat()- except OSError:+ except OSError: # a file that vanished mid-listing is skippedcontinuerel = "/".join(rel_parts)entry: dict[str, Any] = {@@ -989,7 +989,7 @@ async def list_output_artifacts(slug: str, request: Request) -> dict[str, Any]:if len(preview) > _ARTIFACT_PREVIEW_BYTES:preview = preview[:_ARTIFACT_PREVIEW_BYTES] + "\n…"entry["preview"] = preview- except OSError:+ except OSError: # an unreadable file just shows no previewpassfiles.append(entry)if len(files) >= _ARTIFACT_MAX_LISTING:@@ -1485,7 +1485,7 @@ def _prune_empty_parents(start: Path, stop: Path) -> None:while current != stop and current.is_relative_to(stop):try:current.rmdir()- except OSError:+ except OSError: # a non-empty or locked folder ends the sweepreturncurrent = current.parentdiff --git a/jarvis/ui/web/soul_routes.py b/jarvis/ui/web/soul_routes.pyindex 16a87d87f0..e8a3be94c5 100644--- a/jarvis/ui/web/soul_routes.py+++ b/jarvis/ui/web/soul_routes.py@@ -55,7 +55,7 @@ def _config(request: Request) -> Any:def _mtime_ms(path: Path) -> int | None:try:return int(path.stat().st_mtime * 1000)- except OSError:+ except OSError: # a missing file has no mtimereturn None@@ -195,7 +195,7 @@ def _activity(folder: Path | None) -> list[dict[str, Any]]:size = handle.tell()handle.seek(max(0, size - _LEDGER_TAIL_BYTES))tail = handle.read().decode("utf-8", errors="replace")- except OSError:+ except OSError: # no ledger yet means no historyreturn []lines = tail.splitlines()if size > _LEDGER_TAIL_BYTES and lines:@@ -204,7 +204,7 @@ def _activity(folder: Path | None) -> list[dict[str, Any]]:for line in reversed(lines):try:record = json.loads(line)- except ValueError:+ except ValueError: # a torn ledger line is skippedcontinueif not isinstance(record, dict):continuediff --git a/jarvis/ui/webview_hang_probe.py b/jarvis/ui/webview_hang_probe.pyindex 84a65a407d..7dadbc66e8 100644--- a/jarvis/ui/webview_hang_probe.py+++ b/jarvis/ui/webview_hang_probe.py@@ -80,7 +80,7 @@ def _active_port(profile_dir: Path) -> int | None:try:first = candidate.read_text(encoding="utf-8").splitlines()[0].strip()return int(first)- except (OSError, IndexError, ValueError):+ except (OSError, IndexError, ValueError): # try the next pid filecontinuereturn None@@ -233,7 +233,7 @@ class HangStackProbe:)session.call("Debugger.resume", wait=5)time.sleep(0.3)- except Exception as exc: # noqa: BLE001+ except Exception as exc: # noqa: BLE001 - the reason goes into the captured reportlines.append(f"capture stopped: {exc}")return linesdiff --git a/scripts/ci/silent-handlers-baseline.json b/scripts/ci/silent-handlers-baseline.jsonindex 1488afe1e6..204029d073 100644--- a/scripts/ci/silent-handlers-baseline.json+++ b/scripts/ci/silent-handlers-baseline.json@@ -1,6 +1,6 @@{"_comment": "Per-file count of exception handlers that neither log nor re-raise. Generated by scripts/ci/check_silent_exception_handlers.py --update. These numbers may go DOWN freely; an increase is a gate failure.",- "total": 1571,+ "total": 1471,"files": {"jarvis/__main__.py": 9,"jarvis/admin/executor.py": 9,@@ -13,7 +13,6 @@"jarvis/agent_chat/runner_api.py": 2,"jarvis/agent_chat/runner_brain.py": 2,"jarvis/agent_chat/runner_cli.py": 8,- "jarvis/agent_chat/service.py": 1,"jarvis/agent_chat/store.py": 1,"jarvis/agent_chat/tools.py": 8,"jarvis/agent_cli_probe.py": 1,@@ -28,7 +27,6 @@"jarvis/agentic_ide/drops.py": 4,"jarvis/agentic_ide/file_index.py": 4,"jarvis/agentic_ide/folders.py": 16,- "jarvis/agentic_ide/interrupted.py": 1,"jarvis/agentic_ide/native_picker.py": 2,"jarvis/agentic_ide/prompt_composer.py": 2,"jarvis/agentic_ide/recap_engine.py": 1,@@ -51,7 +49,6 @@"jarvis/board/aggregator.py": 7,"jarvis/board/evaluator.py": 3,"jarvis/board/profile.py": 10,- "jarvis/board/scheduler.py": 3,"jarvis/board/store.py": 6,"jarvis/board/sync.py": 4,"jarvis/brain/ack_brain/generator.py": 1,@@ -64,7 +61,7 @@"jarvis/brain/identity_card.py": 6,"jarvis/brain/launcher.py": 1,"jarvis/brain/local_action_gate.py": 1,- "jarvis/brain/manager.py": 32,+ "jarvis/brain/manager.py": 28,"jarvis/brain/model_catalog.py": 2,"jarvis/brain/ollama_inventory.py": 2,"jarvis/brain/ollama_overview.py": 2,@@ -85,7 +82,6 @@"jarvis/claude_credentials.py": 2,"jarvis/cli/review_gc.py": 2,"jarvis/cli_ctl/client.py": 2,- "jarvis/cli_ctl/commands/auth.py": 1,"jarvis/cli_ctl/commands/config.py": 1,"jarvis/cli_ctl/commands/local_models.py": 1,"jarvis/cli_ctl/commands/system.py": 1,@@ -122,7 +118,7 @@"jarvis/costs/sources.py": 1,"jarvis/cu/brain_call.py": 4,"jarvis/cu/conventions.py": 3,- "jarvis/cu/engine.py": 11,+ "jarvis/cu/engine.py": 10,"jarvis/cu/geometry.py": 1,"jarvis/cu/indicator/capture_guard.py": 1,"jarvis/cu/indicator/controller.py": 3,@@ -167,13 +163,11 @@"jarvis/local_models/benchmarks.py": 4,"jarvis/local_models/health_monitor.py": 7,"jarvis/marketplace/auth/oauth_dcr.py": 3,- "jarvis/marketplace/auth/oauth_device.py": 1,- "jarvis/marketplace/auth/oauth_pkce_loopback.py": 3,+ "jarvis/marketplace/auth/oauth_pkce_loopback.py": 2,"jarvis/marketplace/plugin_registry.py": 1,- "jarvis/marketplace/publish.py": 3,+ "jarvis/marketplace/publish.py": 2,"jarvis/marketplace/refresh_scheduler.py": 1,"jarvis/mcp/agents/bridge.py": 2,- "jarvis/mcp/agents/export.py": 1,"jarvis/mcp/agents/portable.py": 1,"jarvis/mcp/agents/server.py": 1,"jarvis/mcp/agents/tokens.py": 1,@@ -182,12 +176,11 @@"jarvis/mcp/claude_export.py": 2,"jarvis/mcp/jarvis_tools_server.py": 1,"jarvis/mcp/server.py": 3,- "jarvis/mcp/state.py": 3,+ "jarvis/mcp/state.py": 2,"jarvis/memory/bootstrap_runner.py": 1,"jarvis/memory/curator/extractor.py": 2,"jarvis/memory/frontmatter.py": 1,"jarvis/memory/people.py": 1,- "jarvis/memory/soul.py": 1,"jarvis/memory/user_profile.py": 1,"jarvis/memory/wiki/atomic_writer.py": 4,"jarvis/memory/wiki/backup.py": 1,@@ -199,7 +192,7 @@"jarvis/memory/wiki/fts_index.py": 3,"jarvis/memory/wiki/health.py": 3,"jarvis/memory/wiki/index_builder.py": 1,- "jarvis/memory/wiki/integration.py": 5,+ "jarvis/memory/wiki/integration.py": 4,"jarvis/memory/wiki/journal.py": 2,"jarvis/memory/wiki/lock.py": 2,"jarvis/memory/wiki/prompt.py": 2,@@ -242,7 +235,6 @@"jarvis/platform/capture_exclusion.py": 2,"jarvis/platform/macos_ax.py": 2,"jarvis/platform/monitors.py": 4,- "jarvis/platform/open_path.py": 2,"jarvis/platform/permissions.py": 2,"jarvis/platform/probes.py": 1,"jarvis/platform/window_state.py": 20,@@ -278,7 +270,6 @@"jarvis/plugins/tool/multi_spawn.py": 1,"jarvis/plugins/tool/open_app.py": 2,"jarvis/plugins/tool/read_visible_ui_state.py": 1,- "jarvis/plugins/tool/remember.py": 1,"jarvis/plugins/tool/reset_orb_position.py": 1,"jarvis/plugins/tool/run_shell.py": 3,"jarvis/plugins/tool/run_skill.py": 3,@@ -288,7 +279,7 @@"jarvis/plugins/tool/spawn_subagents.py": 2,"jarvis/plugins/tool/start_preview_server.py": 1,"jarvis/plugins/tool/switch_window.py": 2,- "jarvis/plugins/tool/type_text.py": 7,+ "jarvis/plugins/tool/type_text.py": 6,"jarvis/plugins/tool/vercel_rest.py": 1,"jarvis/plugins/tool/verify_localhost.py": 2,"jarvis/plugins/tool/verify_via_curl.py": 1,@@ -310,7 +301,6 @@"jarvis/sessions/store.py": 3,"jarvis/setup/dependencies.py": 4,"jarvis/setup/desktop_integration.py": 1,- "jarvis/setup/macos_app_bundle.py": 8,"jarvis/setup/macos_launcher_entry.py": 1,"jarvis/setup/mcp_selection.py": 2,"jarvis/setup/obsidian.py": 2,@@ -332,9 +322,7 @@"jarvis/skills/runner.py": 7,"jarvis/skills/trigger_matcher.py": 5,"jarvis/skills/validator.py": 4,- "jarvis/society/agent_tools.py": 4,"jarvis/society/approvals.py": 1,- "jarvis/society/browser/install.py": 2,"jarvis/society/browser/runner.py": 1,"jarvis/society/browser/session.py": 2,"jarvis/society/browser/tool.py": 2,@@ -342,24 +330,20 @@"jarvis/society/checkpoints.py": 4,"jarvis/society/failure_reasons.py": 1,"jarvis/society/memory.py": 2,- "jarvis/society/proposals.py": 1,"jarvis/society/quests.py": 2,"jarvis/society/roster.py": 1,- "jarvis/society/routines.py": 2,- "jarvis/society/runtime.py": 1,+ "jarvis/society/routines.py": 1,"jarvis/society/shell.py": 2,"jarvis/society/surface.py": 1,"jarvis/speech/diagnose.py": 1,- "jarvis/speech/pipeline.py": 66,+ "jarvis/speech/pipeline.py": 65,"jarvis/speech/rolling_whisper_wake.py": 3,"jarvis/speech/stt_dictionary.py": 3,"jarvis/speech/tts_eval/__main__.py": 1,"jarvis/speech/voice_compare.py": 1,- "jarvis/speech/watchdog.py": 1,"jarvis/state/chat_store.py": 1,"jarvis/state/supervisor.py": 1,"jarvis/tasks/runner.py": 5,- "jarvis/tasks/scheduler.py": 5,"jarvis/tasks/store.py": 3,"jarvis/telemetry/latency_log.py": 1,"jarvis/telephony/security.py": 1,@@ -375,13 +359,12 @@"jarvis/ui/jarvisbar/overlay.py": 5,"jarvis/ui/jarvisbar/qt_overlay.py": 2,"jarvis/ui/jarvisbar/renderer.py": 3,- "jarvis/ui/native_dialog.py": 1,"jarvis/ui/native_drag.py": 3,"jarvis/ui/relauncher.py": 11,"jarvis/ui/shell/runtime_check.py": 3,"jarvis/ui/shell/shell.py": 1,"jarvis/ui/shell/single_instance.py": 9,- "jarvis/ui/tray.py": 4,+ "jarvis/ui/tray.py": 3,"jarvis/ui/web/agent_chat_routes.py": 3,"jarvis/ui/web/agentic_ide_routes.py": 4,"jarvis/ui/web/board_routes.py": 2,@@ -393,10 +376,9 @@"jarvis/ui/web/fast_bootstrap.py": 7,"jarvis/ui/web/launcher.py": 16,"jarvis/ui/web/marketplace_routes.py": 4,- "jarvis/ui/web/mcp_routes.py": 5,+ "jarvis/ui/web/mcp_routes.py": 3,"jarvis/ui/web/missions_pty_routes.py": 4,- "jarvis/ui/web/missions_ws_routes.py": 11,- "jarvis/ui/web/outputs_routes.py": 7,+ "jarvis/ui/web/missions_ws_routes.py": 9,"jarvis/ui/web/profile_routes.py": 7,"jarvis/ui/web/provider_routes.py": 8,"jarvis/ui/web/review_routes.py": 4,@@ -412,7 +394,7 @@"jarvis/ui/web/spa_build.py": 2,"jarvis/ui/web/surface_security.py": 19,"jarvis/ui/web/tasks_routes.py": 1,- "jarvis/ui/web/telephony_routes.py": 10,+ "jarvis/ui/web/telephony_routes.py": 6,"jarvis/ui/web/wiki_routes.py": 6,"jarvis/ui/web/wiki_ws.py": 3,"jarvis/ui/web/workflows_routes.py": 3,