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(brain): 'open\w*' swallowed product names — OpenRouter mention hijacked the CU gate

Ruben Lütkef9eb0eb461c0
diff --git a/jarvis/brain/local_action_gate.py b/jarvis/brain/local_action_gate.py
index 8368e2e8f5..ec08198e3e 100644
--- a/jarvis/brain/local_action_gate.py
+++ b/jarvis/brain/local_action_gate.py
@@ -224,8 +224,16 @@ def _looks_like_desktop_control(text: str) -> bool:
# (``_normalize``: lowercased + umlauts transliterated, so "öffnest" -> "oeffnest"),
# so ``oeffn\w*`` catches öffne/öffnest/öffnet/öffnen alike. ``start\w*`` catches
# starte/startest/start; "mach … auf" is the separable verb handled separately.
+# NB: the English open verb is pinned to its real conjugations — a bare
+# ``open\w*`` also swallowed PRODUCT NAMES starting with "open" (forensic
+# 2026-07-10: "…meinen OpenRouter-Zugang checkst und…" counted as an
+# open-verb, the "und" made it a compound open-and-operate command, and a
+# plain provider-check request was deterministically shipped to the
+# computer-use loop — clicking through the browser instead of calling the
+# provider-test endpoint). openrouter/openai/openwakeword must never count
+# as "open".
_OPEN_VERB_RE = re.compile(
- r"\b(?:oeffn\w*|aufmach\w*|aufzumach\w*|start\w*|open\w*|launch\w*)\b",
+ r"\b(?:oeffn\w*|aufmach\w*|aufzumach\w*|start\w*|open(?:s|ed|ing)?|launch\w*)\b",
re.IGNORECASE,
)
# Separable verb "mach … auf" (particle trails the object): "mach mir Spotify auf".
diff --git a/tests/unit/brain/test_local_action_gate.py b/tests/unit/brain/test_local_action_gate.py
index 505adc06c9..ff6be579fa 100644
--- a/tests/unit/brain/test_local_action_gate.py
+++ b/tests/unit/brain/test_local_action_gate.py
@@ -1082,3 +1082,42 @@ def test_booking_transactions_require_external_integration(text: str) -> None:
)
def test_travel_mentions_without_dispatch_verb_stay_generic(text: str) -> None:
assert requires_external_integration(text) is False
+
+
+# ---------------------------------------------------------------------------
+# Product names starting with "open" are NOT open-verbs (forensic 2026-07-10,
+# data/jarvis_desktop.log 19:41): "…dass du mir meinen OpenRouter-Zugang
+# checkst und mein Google Gemini-Zugang auch noch checkst" — ``open\w*``
+# swallowed "OpenRouter", the "und" made it a compound open-and-operate
+# command, and a plain provider-check request was deterministically shipped
+# to the computer-use loop (browser clicking) instead of reaching the LLM's
+# app-command/provider-test path. The verb match is now pinned to real
+# conjugations (open/opens/opened/opening).
+# ---------------------------------------------------------------------------
+
+
+ "utterance",
+ [
+ "Ich möchte, dass du bitte für mich einmal mir dabei hilfst. Und zwar "
+ "möchte ich, dass du mir meinen OpenRouter-Zugang checkst und mein "
+ "Google Gemini-Zugang auch noch checkst. Mache das bitte.",
+ "Prüf meinen OpenAI-Zugang und den OpenRouter-Key.",
+ "Ist OpenRouter down und liegt es an meinem Konto?",
+ ],
+)
+def test_open_prefixed_product_names_do_not_hijack_the_cu_gate(utterance) -> None:
+ """Mentioning openrouter/openai + an 'und' must NOT read as 'open X and Y'."""
+ assert match_local_action(utterance) is None
+
+
+ ("utterance", "mode"),
+ [
+ ("Open Spotify and play some music", LocalActionMode.COMPUTER_USE),
+ ("Öffne Chrome", LocalActionMode.DIRECT),
+ ],
+)
+def test_real_english_open_verbs_still_route(utterance, mode) -> None:
+ plan = match_local_action(utterance)
+ assert plan is not None and plan.mode is mode