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.

chore: auto-save WIP via Claude stop-hook safety net (2026-07-07 15:44)

Ruben Lütkefc5b631bd632
diff --git a/jarvis/speech/wake_constants.py b/jarvis/speech/wake_constants.py
index c87bb04064..afd69362ac 100644
--- a/jarvis/speech/wake_constants.py
+++ b/jarvis/speech/wake_constants.py
@@ -12,16 +12,13 @@ Why this module exists:
- ``JARVIS_WAKE_PATTERN`` is the strict legacy "hey/hi/hallo + jarv" regex,
moved here so ``rolling_whisper_wake.DEFAULT_PATTERN`` and the prefix verifier
re-export ONE definition instead of duplicating the literal (BUG-008 drift).
-- ``KNOWN_OWW_MODELS`` maps a normalised phrase onto an openWakeWord pretrained
- model name, and ``resolve_oww_model_path`` finds that model's ONNX on disk
- (bundled in-repo for hey_rhasspy/hey_jarvis, otherwise from the installed package).
- The shipped out-of-box bundled fallback is ``hey_rhasspy`` (neutral, CPU-only
- offline model). ``hey_jarvis`` is kept so a user who types "Jarvis" still gets
- the offline model — just not as a silent default.
+- The product ships NO named wake model and never resolves a phrase against a
+ pretrained one (design 2026-07-07): every phrase goes through the generic
+ engine chain in ``wake_phrase.resolve_wake_plan`` (user-trained custom .onnx
+ -> any-word Vosk KWS -> local-Whisper transcript match -> honest degrade).
"""
from __future__ import annotations
-import importlib.util
import os
import re
import unicodedata
@@ -90,24 +87,10 @@ WAKE_PREFIXES: frozenset[str] = frozenset(
{"hey", "hi", "ok", "okay", "hello", "hallo", "yo", "hej"}
)
-# Normalised core phrase -> openWakeWord pretrained model name. We enumerate
-# only our own brand ("jarvis") and the bundled open-source default
-# ("rhasspy"); ANY other phrase is resolved dynamically against whatever
-# pretrained models the installed ``openwakeword`` package actually exposes
-# (see ``match_known_oww_model``), so the shipped product does not bake a list
-# of third-party wake-word brands into its source.
-KNOWN_OWW_MODELS: dict[str, str] = {
- "jarvis": "hey_jarvis",
- "rhasspy": "hey_rhasspy",
-}
-
-# openWakeWord also ships non-wake models we must never route a phrase to.
-_NON_WAKE_OWW_MODELS: frozenset[str] = frozenset({"timer", "weather"})
-
# Quick-pick phrases the Settings UI could offer as one-click suggestions.
-# Currently empty: the shipped product does not pre-advertise any specific wake
-# name. Users type a phrase of their choice; the bundled offline model is
-# "Hey Rhasspy", and any phrase with a matching pretrained model works offline.
+# Permanently empty (design 2026-07-07): the shipped product advertises no
+# wake name and bundles no named model. Users type a phrase of their choice;
+# every phrase resolves through the generic engine chain.
INSTANT_WAKE_PHRASES: tuple[str, ...] = ()
_NORMALISE_RE = re.compile(r"[^0-9a-zäöüß]+") # i18n-allow
@@ -186,65 +169,10 @@ def sound_fold(token: str) -> str:
return "".join(out)
-def match_known_oww_model(phrase: str) -> str | None:
- """Map a phrase onto a pretrained openWakeWord model name, or ``None``.
-
- Checks our own enumerated names first ("jarvis"/"rhasspy"), then probes the
- installed openWakeWord package at runtime for a matching pretrained model —
- so a user who types any word that happens to ship a model still gets it,
- without the source enumerating third-party wake-word trademarks. Non-wake
- models (timer/weather) are never routed to.
- """
- core = phrase_core(phrase)
- if not core:
- return None
- key = " ".join(core)
- if key in KNOWN_OWW_MODELS:
- return KNOWN_OWW_MODELS[key]
- slug = key.replace(" ", "_")
- if slug in _NON_WAKE_OWW_MODELS:
- return None
- for candidate in (slug, f"hey_{slug}"):
- if resolve_oww_model_path(candidate) is not None:
- return candidate
- return None
-
-
-# ---------------------------------------------------------------------------
-# OWW model file resolution
-# ---------------------------------------------------------------------------
-
-def _bundled_dir() -> Path:
- return Path(__file__).resolve().parent.parent / "assets" / "wakeword"
-
-
-def _package_models_dir() -> Path | None:
- """Locate the installed openWakeWord ``resources/models`` dir WITHOUT
- importing the (numpy-heavy) package — uses the module spec only."""
- spec = importlib.util.find_spec("openwakeword")
- if spec is None or not spec.submodule_search_locations:
- return None
- base = Path(next(iter(spec.submodule_search_locations)))
- models = base / "resources" / "models"
- return models if models.is_dir() else None
-
-
-def resolve_oww_model_path(model_name: str) -> str | None:
- """Absolute path to the ``<model_name>_v0.1.onnx`` wake model, or ``None``.
-
- Prefers the in-repo bundle (offline first-boot for hey_jarvis); otherwise
- falls back to the file shipped inside the installed openWakeWord package.
- """
- filename = f"{model_name}_v0.1.onnx"
- bundled = _bundled_dir() / filename
- if bundled.is_file():
- return str(bundled)
- pkg = _package_models_dir()
- if pkg is not None:
- candidate = pkg / filename
- if candidate.is_file():
- return str(candidate)
- return None
+# (match_known_oww_model / resolve_oww_model_path were removed 2026-07-07:
+# the product neither bundles a named wake model nor probes the openwakeword
+# package's pretrained third-party models. Custom .onnx paths come straight
+# from the user's config; everything else is generic.)
# ---------------------------------------------------------------------------
@@ -305,14 +233,11 @@ __all__ = [
"DEFAULT_WAKE_PHRASE",
"JARVIS_WAKE_PATTERN",
"WAKE_PREFIXES",
- "KNOWN_OWW_MODELS",
"INSTANT_WAKE_PHRASES",
"normalize_phrase",
"normalize_phrase_for_match",
"phrase_core",
"phrase_core_for_match",
"sound_fold",
- "match_known_oww_model",
- "resolve_oww_model_path",
"resolve_vosk_model_path",
]
diff --git a/jarvis/speech/wake_phrase.py b/jarvis/speech/wake_phrase.py
index a0c8a88177..6330f900e7 100644
--- a/jarvis/speech/wake_phrase.py
+++ b/jarvis/speech/wake_phrase.py
@@ -12,12 +12,12 @@ docs/local-wakeword/CUSTOM-WAKE-WORD-DESIGN.md). Two public pieces:
``resolve_wake_plan(cfg, *, local_whisper_available)`` -> :class:`WakeWordPlan`
Turns the user's ``[trigger.wake_word]`` config into a concrete engine
- choice, honouring the cloud-first doctrine: a phrase with no pretrained
- model needs local Whisper, and on a box without it we degrade gracefully to
- the bundled "Hey Rhasspy" model with a clear English message — never a
- silent dead listener. Users who type "Hey Jarvis" still get the hey_jarvis
- offline model (it is in ``KNOWN_OWW_MODELS``); "Hey Rhasspy" is just the
- neutral out-of-box shipped fallback.
+ choice through a fully GENERIC chain (design 2026-07-07 — the product
+ ships no named wake model and never resolves a phrase against one):
+ user-trained custom .onnx -> any-word Vosk keyword spotting ->
+ local-Whisper transcript match -> honest hotkey-only degrade
+ (``wake_available=False`` with a clear English message — never a silent
+ dead listener, never a substituted fallback word).
"""
from __future__ import annotations
@@ -33,11 +33,9 @@ from jarvis.speech.wake_constants import (
JARVIS_WAKE_PATTERN,
WAKE_ENGINES,
WAKE_PREFIXES,
- match_known_oww_model,
normalize_phrase_for_match,
phrase_core,
phrase_core_for_match,
- resolve_oww_model_path,
resolve_vosk_model_path,
sound_fold,
)
@@ -255,9 +253,6 @@ def compile_wake_matcher(phrase: str, *, fuzzy_ratio: float = 0.8) -> WakeMatche
def _canonical_keyword(phrase: str) -> str:
"""A stable lower_snake keyword for a phrase (logging / yield value)."""
- known = match_known_oww_model(phrase)
- if known:
- return known
core = phrase_core(phrase)
return "_".join(core) if core else "wake"
@@ -308,16 +303,11 @@ class WakeWordPlan:
degraded: bool # True if we could not honour the request
message: str # English status string for logs + UI
# Whether an OpenWakeWord hit needs the second-stage STT prefix check.
- # True for the jarvis family (the hey_jarvis model also fires on bare
- # "Jarvis" — BUG-009) AND for user-trained custom_onnx models (live
- # forensic 2026-07-01: a few-shot/synthetic-data model scored breath,
- # ambient noise and arbitrary speech up to 1.000 — several false
- # activations per minute; the verify transcript, matched against the
- # phrase's own sound-folded fuzzy matcher, is the real discriminator).
- # False only for a specific PRETRAINED model (alexa/mycroft/rhasspy):
- # those are trained on large curated datasets, ARE their own
- # discriminator, and the STT would mis-transcribe the foreign brand word
- # and wrongly reject valid hits. Also False for vosk_kws — its permissive
+ # True for user-trained custom_onnx models (live forensic 2026-07-01: a
+ # few-shot/synthetic-data model scored breath, ambient noise and arbitrary
+ # speech up to 1.000 — several false activations per minute; the verify
+ # transcript, matched against the phrase's own sound-folded fuzzy matcher,
+ # is the real discriminator). False for vosk_kws — its permissive
# free-decode sound confirm is built into the provider itself.
verify_prefix: bool
# Product rule (2026-07-04): a wake word REQUIRES a local model that matches
@@ -325,7 +315,7 @@ class WakeWordPlan:
# ONNX, no local Whisper) we do NOT silently substitute a branded fallback
# model — we return wake_available=False so the app arms NO detector and the
# honest alternative is hotkey / push-to-talk activation. True for every
- # real engine (custom_onnx / openwakeword / vosk_kws / stt_match).
+ # real engine (custom_onnx / vosk_kws / stt_match).
wake_available: bool = True
# Extracted Vosk model directory for the vosk_kws engine (None otherwise).
vosk_model_path: str | None = None
@@ -419,35 +409,19 @@ def resolve_wake_plan(
phrase,
)
- # 2. Known pretrained openWakeWord model (CPU, instant, offline).
- known = match_known_oww_model(phrase)
- if engine_pref in ("auto", "openwakeword") and known and (
- not custom_path or custom_stale
- ):
- model_path = resolve_oww_model_path(known)
- if model_path is not None:
- return WakeWordPlan(
- phrase=phrase,
- engine="openwakeword",
- oww_model_path=model_path,
- oww_keyword=known,
- threshold=threshold,
- matcher=matcher,
- needs_local_whisper=False,
- degraded=False,
- message=f"Pretrained openWakeWord model '{known}'.",
- verify_prefix=matcher.is_jarvis_default,
- )
- log.warning("Pretrained model '%s' not found on disk.", known)
+ # (The former step 2 — "known pretrained openWakeWord model" — was removed
+ # 2026-07-07: the product ships no named wake model and never resolves a
+ # phrase against the openwakeword package's pretrained third-party models.
+ # engine="openwakeword" in an old config simply falls through this chain.)
- # 3. Any-word Vosk grammar keyword spotting — the one-identical-system-
+ # 2. Any-word Vosk grammar keyword spotting — the one-identical-system-
# everywhere engine (design spec 2026-07-05): per-language model, CPU-only,
# no training, no cloud, no GPU; spike-measured 79-100 % recall at
# 1/0/0 % false accepts where the transcription path is machine- and
- # word-dependent. Chosen on "auto" for any phrase without a pretrained
- # OWW model, or forced via engine="vosk_kws". Requires the vosk package
- # (base dep) AND a per-language model directory; missing either falls
- # through to the stt_match chain below (graceful, message says why).
+ # word-dependent. Chosen on "auto" for any phrase, or forced via
+ # engine="vosk_kws". Requires the vosk package (base dep) AND a
+ # per-language model directory; missing either falls through to the
+ # stt_match chain below (graceful, message says why).
if phrase and engine_pref in ("auto", "vosk_kws"):
if vosk_available is None:
import importlib.util as _ilu
@@ -456,7 +430,9 @@ def resolve_wake_plan(
vosk_model = resolve_vosk_model_path(language) if vosk_available else None
if vosk_model is not None and (
engine_pref == "vosk_kws"
- or (not known and (not custom_path or custom_stale or custom_missing))
+ or not custom_path
+ or custom_stale
+ or custom_missing
):
return WakeWordPlan(
phrase=phrase,
@@ -475,17 +451,17 @@ def resolve_wake_plan(
vosk_model_path=vosk_model,
)
- # 4. Arbitrary phrase via local-Whisper transcript match.
+ # 3. Arbitrary phrase via local-Whisper transcript match.
want_stt = (
engine_pref in ("auto", "stt_match", "vosk_kws")
or bool(custom_path) # custom file missing -> best effort
- or (engine_pref == "openwakeword" and not known)
+ or engine_pref == "openwakeword" # legacy engine value, no model ships
)
if want_stt and local_whisper_available:
# A STALE custom model (belongs to another phrase) is NOT a degrade:
# the transcript match IS the regular path for the new phrase, and the
# model stays configured for when the user switches back.
- degraded = custom_missing or (engine_pref == "openwakeword" and not known)
+ degraded = custom_missing or engine_pref == "openwakeword"
if custom_missing:
message = (
f"Custom ONNX not found ({custom_path}); "
diff --git a/tests/unit/speech/test_pipeline_wake_plan.py b/tests/unit/speech/test_pipeline_wake_plan.py
index c7d477ffaf..ca8813e1be 100644
--- a/tests/unit/speech/test_pipeline_wake_plan.py
+++ b/tests/unit/speech/test_pipeline_wake_plan.py
@@ -3,18 +3,15 @@
When a wake_plan is threaded in, the OpenWakeWord detector is built from the
plan (model path, canonical keyword, sensitivity-derived threshold) and the
prefix verifier + rolling-whisper use the plan's phrase matcher. When no plan
-is given, everything is byte-identical to the legacy "Hey Jarvis" path.
+is given, the legacy default path builds a provider with no model.
"""
from __future__ import annotations
from collections.abc import AsyncIterator
from dataclasses import dataclass
+from pathlib import Path
from types import SimpleNamespace
-import pytest
-
-from jarvis.speech import wake_constants as wc
-from jarvis.speech import wake_phrase as wp
from jarvis.speech.pipeline import SpeechPipeline
from jarvis.speech.wake_phrase import resolve_wake_plan
@@ -43,19 +40,14 @@ def _wake_cfg(**kw: object) -> SimpleNamespace:
return SimpleNamespace(**base)
-def _pretend_oww_models_exist(
- monkeypatch: pytest.MonkeyPatch, *model_names: str
-) -> None:
- models = set(model_names)
- original_resolve = wc.resolve_oww_model_path
-
- def fake_resolve(model_name: str) -> str | None:
- if model_name in models:
- return f"C:/fake-openwakeword/{model_name}_v0.1.onnx"
- return original_resolve(model_name)
-
- monkeypatch.setattr(wc, "resolve_oww_model_path", fake_resolve)
- monkeypatch.setattr(wp, "resolve_oww_model_path", fake_resolve)
+def _custom_plan(tmp_path: Path, phrase: str = "Hey Fable"):
+ """A user-trained custom_onnx plan — the one OWW path that still exists."""
+ onnx = tmp_path / "hey_fable.onnx"
+ onnx.write_bytes(b"stub")
+ return resolve_wake_plan(
+ _wake_cfg(phrase=phrase, engine="custom_onnx", custom_model_path=str(onnx)),
+ local_whisper_available=False,
+ )
def _pipe(wake_plan: object | None) -> SpeechPipeline:
@@ -77,26 +69,19 @@ def test_no_plan_keeps_matcher_none_legacy_behaviour() -> None:
assert pipe._wake._keywords == ("hey_jarvis",)
-def test_plan_builds_oww_from_pretrained_model(
- monkeypatch: pytest.MonkeyPatch,
-) -> None:
- _pretend_oww_models_exist(monkeypatch, "alexa")
-
- plan = resolve_wake_plan(_wake_cfg(phrase="Alexa"), local_whisper_available=False)
+def test_plan_builds_oww_from_custom_model(tmp_path: Path) -> None:
+ plan = _custom_plan(tmp_path)
+ assert plan.engine == "custom_onnx"
pipe = _pipe(plan)
assert pipe._wake_matcher is plan.matcher
- assert pipe._wake._keywords == ("alexa",)
+ assert pipe._wake._keywords == (plan.oww_keyword,)
assert pipe._wake._model_path == plan.oww_model_path
assert pipe._wake._threshold == plan.threshold
-def test_plan_matcher_drives_prefix_verifier_phrase(
- monkeypatch: pytest.MonkeyPatch,
-) -> None:
- _pretend_oww_models_exist(monkeypatch, "alexa")
-
- plan = resolve_wake_plan(_wake_cfg(phrase="Alexa"), local_whisper_available=False)
+def test_plan_matcher_drives_prefix_verifier_phrase(tmp_path: Path) -> None:
+ plan = _custom_plan(tmp_path)
pipe = _pipe(plan)
- # The verifier matcher now confirms "alexa", not "jarvis".
- assert pipe._wake_matcher.search("alexa") is not None
+ # The verifier matcher confirms the configured phrase, nothing else.
+ assert pipe._wake_matcher.search("hey fable") is not None
assert pipe._wake_matcher.search("hey jarvis") is None
diff --git a/tests/unit/speech/test_wake_live_apply.py b/tests/unit/speech/test_wake_live_apply.py
index 188eeb0cf8..9a428a0774 100644
--- a/tests/unit/speech/test_wake_live_apply.py
+++ b/tests/unit/speech/test_wake_live_apply.py
@@ -62,21 +62,6 @@ def _cfg(**kw: object) -> SimpleNamespace:
return SimpleNamespace(**base)
-def _pretend_oww_models_exist(
- monkeypatch: pytest.MonkeyPatch, *model_names: str
-) -> None:
- models = set(model_names)
- original_resolve = wc.resolve_oww_model_path
-
- def fake_resolve(model_name: str) -> str | None:
- if model_name in models:
- return f"C:/fake-openwakeword/{model_name}_v0.1.onnx"
- return original_resolve(model_name)
-
- monkeypatch.setattr(wc, "resolve_oww_model_path", fake_resolve)
- monkeypatch.setattr(wp, "resolve_oww_model_path", fake_resolve)
-
-
def _pipe() -> SpeechPipeline:
return SpeechPipeline(
tts=_FakeTTS(), bus=None,
@@ -86,17 +71,26 @@ def _pipe() -> SpeechPipeline:
# --------------------------------------------------------------------------
-# WakeWordPlan.verify_prefix — only the jarvis family needs STT re-verification
+# WakeWordPlan.verify_prefix — only custom_onnx plans need STT re-verification
# --------------------------------------------------------------------------
-def test_verify_prefix_true_for_jarvis_default() -> None:
- plan = resolve_wake_plan(_cfg(phrase="Hey Jarvis"), local_whisper_available=False)
+def test_verify_prefix_true_for_custom_onnx(tmp_path) -> None:
+ onnx = tmp_path / "hey_fable.onnx"
+ onnx.write_bytes(b"stub")
+ plan = resolve_wake_plan(
+ _cfg(phrase="Hey Fable", engine="custom_onnx", custom_model_path=str(onnx)),
+ local_whisper_available=False,
+ )
+ assert plan.engine == "custom_onnx"
assert plan.verify_prefix is True
-def test_verify_prefix_false_for_alexa_and_mycroft() -> None:
+def test_brand_phrases_resolve_generically_without_a_model() -> None:
+ # No bundled/pretrained models (design 2026-07-07): brand words are
+ # ordinary phrases; with no local engine they degrade honestly.
for phrase in ("Alexa", "Hey Mycroft", "Rhasspy"):
plan = resolve_wake_plan(_cfg(phrase=phrase), local_whisper_available=False)
+ assert plan.engine == "none", phrase
assert plan.verify_prefix is False, phrase
diff --git a/tests/unit/speech/test_wake_phrase.py b/tests/unit/speech/test_wake_phrase.py
index 6ece57e235..69ee9d7830 100644
--- a/tests/unit/speech/test_wake_phrase.py
+++ b/tests/unit/speech/test_wake_phrase.py
@@ -231,22 +231,6 @@ def _cfg(**kw: object) -> SimpleNamespace:
return SimpleNamespace(**base)
-def _pretend_oww_models_exist(
- monkeypatch: pytest.MonkeyPatch, *model_names: str
-) -> None:
- """Make package-model tests independent of the local openwakeword install."""
- models = set(model_names)
- original_resolve = wc.resolve_oww_model_path
-
- def fake_resolve(model_name: str) -> str | None:
- if model_name in models:
- return f"C:/fake-openwakeword/{model_name}_v0.1.onnx"
- return original_resolve(model_name)
-
- monkeypatch.setattr(wc, "resolve_oww_model_path", fake_resolve)
- monkeypatch.setattr(wp, "resolve_oww_model_path", fake_resolve)
-
-
def _cfg_blank(**kw: object) -> SimpleNamespace:
"""Config with empty phrase — the new shipped default pre-onboarding state."""
base = dict(
@@ -260,39 +244,29 @@ def _cfg_blank(**kw: object) -> SimpleNamespace:
return SimpleNamespace(**base)
-def test_default_phrase_resolves_to_bundled_hey_jarvis_oww() -> None:
- plan = resolve_wake_plan(_cfg(), local_whisper_available=False)
- assert plan.engine == "openwakeword"
- assert plan.oww_keyword == "hey_jarvis"
- assert plan.oww_model_path is not None
- assert plan.oww_model_path.endswith("hey_jarvis_v0.1.onnx")
- assert plan.needs_local_whisper is False
+def test_jarvis_phrase_resolves_generically_not_to_a_bundled_model() -> None:
+ """Design 2026-07-07: no pretrained brand models — 'Hey Jarvis' is just a phrase."""
+ plan = resolve_wake_plan(_cfg(), local_whisper_available=True)
+ assert plan.engine == "stt_match" # vosk is fenced off by the autouse fixture
+ assert plan.oww_model_path is None
+ assert plan.oww_keyword == "jarvis"
assert plan.degraded is False
-def test_known_pretrained_phrase_resolves_to_that_model(
- monkeypatch: pytest.MonkeyPatch,
-) -> None:
- _pretend_oww_models_exist(monkeypatch, "alexa")
-
- plan = resolve_wake_plan(_cfg(phrase="Alexa"), local_whisper_available=False)
- assert plan.engine == "openwakeword"
- assert plan.oww_keyword == "alexa"
- assert plan.oww_model_path is not None
- assert plan.oww_model_path.endswith("alexa_v0.1.onnx")
- assert plan.needs_local_whisper is False
- assert plan.degraded is False
+def test_brand_phrase_never_loads_an_upstream_package_model() -> None:
+ """Typing a third-party brand word must NOT pull that brand's model."""
+ for phrase in ("Alexa", "Hey Mycroft", "Rhasspy"):
+ plan = resolve_wake_plan(_cfg(phrase=phrase), local_whisper_available=True)
+ assert plan.engine == "stt_match", phrase
+ assert plan.oww_model_path is None, phrase
-def test_mycroft_and_rhasspy_resolve_to_pretrained_models(
- monkeypatch: pytest.MonkeyPatch,
-) -> None:
- _pretend_oww_models_exist(monkeypatch, "hey_mycroft")
-
- p1 = resolve_wake_plan(_cfg(phrase="Hey Mycroft"), local_whisper_available=False)
- assert p1.oww_keyword == "hey_mycroft"
- p2 = resolve_wake_plan(_cfg(phrase="Rhasspy"), local_whisper_available=False)
- assert p2.oww_keyword == "hey_rhasspy"
+def test_jarvis_phrase_without_any_local_engine_is_hotkey_only() -> None:
+ """No bundled model means the jarvis phrase degrades like any other word."""
+ plan = resolve_wake_plan(_cfg(), local_whisper_available=False)
+ assert plan.wake_available is False
+ assert plan.engine == "none"
+ assert plan.oww_model_path is None
def test_arbitrary_phrase_with_local_whisper_resolves_to_stt_match() -> None:
@@ -374,23 +348,21 @@ def test_blank_cfg_without_whisper_is_hotkey_only() -> None:
assert plan.degraded is True
-def test_jarvis_stays_typeable_resolves_to_hey_jarvis_model() -> None:
- # A user who explicitly types "Hey Jarvis" must still get the hey_jarvis
- # OWW model (verify_prefix=True, not degraded).
- plan = resolve_wake_plan(_cfg(phrase="Hey Jarvis"), local_whisper_available=False)
- assert plan.engine == "openwakeword"
- assert plan.oww_keyword == "hey_jarvis"
+def test_jarvis_stays_typeable_through_the_generic_chain() -> None:
+ # A user who explicitly types "Hey Jarvis" gets a working wake word via
+ # the generic chain — no bundled model, no special case (design 2026-07-07).
+ plan = resolve_wake_plan(_cfg(phrase="Hey Jarvis"), local_whisper_available=True)
+ assert plan.engine == "stt_match"
+ assert plan.oww_model_path is None
assert plan.degraded is False
- assert plan.verify_prefix is True
-def test_just_jarvis_stays_typeable_resolves_to_hey_jarvis_model() -> None:
- # Bare "Jarvis" (no "Hey" prefix) also maps to the hey_jarvis model.
- plan = resolve_wake_plan(_cfg(phrase="Jarvis"), local_whisper_available=False)
- assert plan.engine == "openwakeword"
- assert plan.oww_keyword == "hey_jarvis"
+def test_just_jarvis_stays_typeable_through_the_generic_chain() -> None:
+ # Bare "Jarvis" (no "Hey" prefix) is an ordinary single-word phrase now.
+ plan = resolve_wake_plan(_cfg(phrase="Jarvis"), local_whisper_available=True)
+ assert plan.engine == "stt_match"
+ assert plan.oww_model_path is None
assert plan.degraded is False
- assert plan.verify_prefix is True
def test_sensitivity_to_poll_interval_makes_the_slider_control_speed() -> None: