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
docs(diagnostics): AP-23 audit wave 2 — 15 proactive fresh-machine findings across four pattern scans
Ruben Lütke1116daee4f6c
diff --git a/docs/diagnostics/ap23-audit-wave2-2026-07-07.md b/docs/diagnostics/ap23-audit-wave2-2026-07-07.mdnew file mode 100644index 0000000000..51ad9a6203--- /dev/null+++ b/docs/diagnostics/ap23-audit-wave2-2026-07-07.md@@ -0,0 +1,148 @@+# AP-23 Audit Wave 2 — proactive fresh-machine defect scan (2026-07-07)++Follow-up to `fresh-machine-forensics-2026-07.md` (whose findings are all+excluded here as known). Four parallel read-only scans over the whole codebase,+one per defect pattern: config gates/placeholders, external binaries/optional+imports, platform/hardware calibration, expected-but-unshipped files. Goal:+find every REMAINING "works only on the maintainer's machine" defect before+the Level-3 release gate is built. No fixes in this document.++Overall: the platform/paths surface is unusually clean (pathlib everywhere,+UTF-8 file I/O, lazy optional imports, honest platform no-ops). The real+findings cluster in four roots below.++## P1 — bricks a core path on a fresh machine++1. **Missions hard-depend on the `git` binary, unguarded.**+ `jarvis/missions/isolation/worktree.py:677` (`_run_git`) and `:638`+ (`_run_git_in`) catch only `CalledProcessError`; a missing git binary+ raises `FileNotFoundError`, which escapes `WorktreeManager.create()` and+ the orchestrator handler (`kontrollierer/orchestrator.py:1037` catches only+ `CalledProcessError, ValueError`). Every mission crashes raw — even for+ pure in-process API workers that need no external binary, because+ `orchestrator.py:1032` wraps every task in a worktree. No git preflight+ exists (doctor.py doesn't report git). Fix shape: preflight git at mission+ dispatch + catch `FileNotFoundError/OSError` → honest "Jarvis-Agents need+ git installed" failure.+ - Facet: ZIP/"Download ZIP" installs (no `.git`) → `git worktree add`+ exits 128 → generic `SETUP_FAILED` with no user-visible reason+ (worktree.py:232-242 → orchestrator.py:1037-1039). Distinguish+ "not a git repository" → actionable message.++2. **`python-ulid` is an undeclared runtime dependency** — present on the+ maintainer's box only via a manual editable `OS-Level` install.+ Chain: `control/keyboard.py:16/28/40` + `control/mouse.py:56/105/124`+ (@overlay_action_sync) → `overlay/triggers.py:146` `_get_bridge()`+ (UNGUARDED) → `overlay/integration.py:32` → `overlay/bridge.py:25` →+ `overlay/schema.py:29` → `OS-Level/src/overlay/schema.py:28`+ `from ulid import ULID`. Declared only in+ `OS-Level/src/overlay.egg-info/requires.txt`, not in `pyproject.toml` /+ `requirements.txt`; the installer never installs `OS-Level`.+ Consequences on every fresh clone: keyboard/mouse tool actions raise+ `ModuleNotFoundError: ulid`; the Orb/mascot + virtual cursor silently+ never start (`ui/web/launcher.py:635` misreads it as "headless";+ `ui/desktop_app.py:1537-1546` only handles `exc.name=="overlay"`).+ Fix shape: add `python-ulid>=2.2` to base deps (regenerate the lockfile+ with `uv pip compile --universal`) AND guard `_get_bridge()` to a NoOp+ bridge on `ModuleNotFoundError` (honest degrade if anything else is off).++## Security-critical (shipped predictable credentials)++3. **`docker-compose.yml:21` ships a functional, world-known Control-API+ key** (`jctl_local_sandbox_change_me_before_any_real_use`) as the real+ runtime value on the documented VPS path; the container binds 0.0.0.0 and+ only the host port mapping keeps it loopback. Any published/proxied port 8000+ leaves config writes, mission dispatch and shell behind a public constant.+ Fix shape: the app refuses (or regenerates) when the control key equals the+ shipped literal; compose uses `${JARVIS_CONTROL_API_KEY:?}` with no default.++4. **Predictable webhook token on a shell-exec path, self-healing against+ deletion.** `conductor/seed/webhook_demo.yaml:18`+ (`demo_token_change_me_in_production_1234`, `enabled: true` line 10)+ passes the min-length guard (`conductor/api/routes.py:99-103`), is+ re-seeded every boot (`conductor/core/seed.py:59-62`), and+ `POST /api/conductor/hooks/{token}` is public-by-design+ (`routes.py:185-201`, mounted at `server.py:336`). Blast radius today is a+ harmless echo step, but it is a shipped known credential on a shell-exec+ route. Fix shape: seed `enabled: false` + force-regenerate any token equal+ to the shipped literal.++## P2 — dishonest or wrong behavior++5. **`dispatch-with-review` router tool dies with a raw KeyError naming the+ removed `openclaw` harness** (install-wide, latent):+ `brain/factory.py:69` keeps it in ROUTER_TOOLS; bare `cls()` instantiation+ (`factory.py:455`) → spawners default `harness_name="openclaw"`+ (`core/review/spawns.py:116/:194`) → `KeyError` at `harness/manager.py:68`.+ Fix shape: resolve a registered harness or return an honest+ "review gate unavailable" ToolResult (ADR-0011: keep the tool in the set).++6. **Wheel installs brick at first SQLite open — package-data gaps.**+ `pyproject.toml [tool.setuptools.package-data]` covers only ui/web/dist,+ assets, plugins/tool/*.mjs. Missing: `*/schema.sql` (board/memory/missions/+ sessions/tasks/workflows — `sessions/store.py:64` read_text has no guard),+ `brain/JARVIS_PERSONA.md`, seed catalogs, `memory/migrations/*.sql`,+ wiki templates, `skills/builtin/**/SKILL.md`,+ `core/review/verdict_schema.json`, `skills/safe_imports.txt`. Masked today+ only because installs are editable. Fix shape: extend package-data globs.++7. **`_run_git` lacks `encoding="utf-8"`** (its sibling `_run_git_at:638-646`+ has it): non-cp1252 branch/file names → UnicodeDecodeError on Windows+ (worktree.py:677-684). Same fix-package as finding 1.++8. **`platform/window_state.py:290-296, 326-332`** (osascript & friends)+ parse window titles with `text=True` and no encoding → UnicodeDecodeError+ on non-UTF-8 locales instead of "no match". Fix shape: pin+ `encoding="utf-8", errors="replace"` on human-text subprocess parses.++9. **Custom-wake match gate uses absolute RMS floors** calibrated on the+ maintainer's mic (`speech/rolling_whisper_wake.py:112-132,271` —+ `_MATCH_MIN_SPEECH_RMS=0.006`, `min_rms=0.003`, `min_peak=0.008`): quiet+ laptop mics (real speech 0.003-0.006) get custom-wake matches silently+ dropped. CAUTION AP-27: these floors are the ghost discriminator — never+ simply lower them; the fix is per-session noise-floor-relative calibration,+ same approach as the known mic-meter follow-up. Handle deliberately, not in+ the quick wave.++10. **MCP stdio spawn error lacks an actionable hint**: `mcp/client.py:96-103`+ doesn't which()-check `npx`/node; a missing Node surfaces as a raw+ `FileNotFoundError` string on the plugin badge (caught at+ `mcp/registry.py:187`). Fix shape: map to "install Node.js 18+".++## P3 — wrong-for-everyone or latent (honest degrade)++11. **"Call X" voice tool can never dial** (dead for ALL installs, honest+ no-op): `plugins/tool/call_contact.py:81` reads `loaded.telephony` (field+ doesn't exist; Twilio lives at `integrations.twilio`, config.py:1398) and+ `:85` reads `from_number` (field is `phone_number`, config.py:1350).+ Fix shape: read the real attributes.+12. **`recommend_whisper` gates GPU advice on `torch.cuda.is_available()`**+ (`hardware/detection.py:162,244`) though the engine is CTranslate2 and+ torch is absent from base → NVIDIA boxes without torch always get "no+ GPU"; with torch it recommends on presence (AP-25). Degrades safe.+13. **In-app feedback dead-ends every downloader**: `feedback_routes.py:131-141`+ requires a maintainer-only Discord webhook secret; users are told to set a+ credential that is meaningless for them. Fix shape: fall back to the+ public GitHub issues URL / reword.+14. **PyInstaller spec doesn't bundle in-package data** (`jarvis.spec:46` only+ top-level assets; no `collect_data_files("jarvis")`; `:60` still collects+ removed chromadb/sentence_transformers).+15. **`PROJECT_ROOT = parents[2]` anchors data/.env to the source checkout**+ (`core/config.py:51` + ~10 sites): wheel installs would write into+ site-packages. Larger refactor (platformdirs) — defer to a dedicated task.++## Verified-clean surfaces (for confidence, no findings)++Optional-extra imports uniformly lazy/guarded; node-CLI/ffmpeg/MCP-install/+OAuth-bot paths which()-check and degrade honestly; no hardcoded absolute+paths in runtime code; file I/O is UTF-8 throughout; STT main path has+cuda→cpu construction fallback; data/ dirs are mkdir-on-demand; persona/terms+readers degrade cleanly; awareness/self-mod/board/vision tools degrade+honestly; get_secret sites in web routes are guarded.++## Disposition++Quick wave (low-risk honest fixes): findings 1+7 (one package), 2, 3, 4, 5,+11, and the mechanical bundle 6+8+10+13. Deliberate follow-ups: 9 (AP-27+calibration design), 12, 14, 15. All feed the Level-3 release gate, whose+Linux job must install BASE (see the evdev note in the forensics doc).