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.

style(brain): keep turn-planner comments within the line limit

Ruben Lütke6e66d946d12d
diff --git a/jarvis/brain/turn_planner.py b/jarvis/brain/turn_planner.py
index f26f8048a8..b392a6a496 100644
--- a/jarvis/brain/turn_planner.py
+++ b/jarvis/brain/turn_planner.py
@@ -142,12 +142,16 @@ _FOLLOW_UP_REFERENCE_RE = re.compile(
_CONTEXT_MAX_CHARS = 2_000
-# German umlauts must become their transliterated digraphs (ä→ae, ö→oe, # i18n-allow: names the mapped umlaut characters
-# ü→ue; casefold already yields ß→ss) because every German vocabulary entry # i18n-allow: names the mapped umlaut characters
-# above is written in that form. A plain NFKD combining-strip would produce
-# the OTHER ascii form ("lösche"→"losche"), which silently disables the # i18n-allow: quotes the German token under test
-# entire German action/lookup vocabulary against real STT output.
-_UMLAUT_TRANSLITERATION = str.maketrans({"ä": "ae", "ö": "oe", "ü": "ue"}) # i18n-allow: speech-input matching data
+# German umlaut characters must become their transliterated digraphs
+# (a-umlaut -> ae, o-umlaut -> oe, u-umlaut -> ue; casefold already yields
+# "ss" for the sharp s) because every German vocabulary entry above is
+# written in that form ("loesch", "aender", "fuehr"). A plain NFKD
+# combining-strip would produce the OTHER ascii form ("losche", "andere"),
+# which silently disables the entire German action/lookup vocabulary
+# against real STT output.
+_UMLAUT_TRANSLITERATION = str.maketrans(
+ {"ä": "ae", "ö": "oe", "ü": "ue"} # i18n-allow: umlaut mapping data
+)
def _normalize(text: str) -> str:
diff --git a/tests/unit/brain/test_turn_planner.py b/tests/unit/brain/test_turn_planner.py
index 470a121e4a..d640cd936e 100644
--- a/tests/unit/brain/test_turn_planner.py
+++ b/tests/unit/brain/test_turn_planner.py
@@ -134,7 +134,8 @@ def test_unrelated_lookup_does_not_inherit_old_evidence_domain() -> None:
@pytest.mark.parametrize(
"utterance",
[
- # Umlaut verbs: real STT emits "ö", the vocabulary is written "oe" — # i18n-allow: names the umlaut under test
+ # Umlaut verbs: real STT emits umlaut characters while the planner
+ # vocabulary is written in transliterated digraphs (oe/ae/ue) —
# these matched NOTHING before the transliterating _normalize fix.
"Lösche die Datei vom Desktop.", # i18n-allow: German speech-input fixture
"Ändere die Lautstärke.", # i18n-allow: German speech-input fixture