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(wiki): bind the telemetry singleton in provider_chain, not the module

Ruben Lütkefa2bb75940cd
diff --git a/jarvis/memory/wiki/provider_chain.py b/jarvis/memory/wiki/provider_chain.py
index a0437278b2..515a13fe08 100644
--- a/jarvis/memory/wiki/provider_chain.py
+++ b/jarvis/memory/wiki/provider_chain.py
@@ -29,7 +29,7 @@ from collections.abc import Callable
from typing import Any
from jarvis.core.redact import safe_preview
-from jarvis.memory.wiki import telemetry
+from jarvis.memory.wiki.telemetry import telemetry
log = logging.getLogger(__name__)
diff --git a/tests/unit/memory/wiki/test_provider_chain.py b/tests/unit/memory/wiki/test_provider_chain.py
index 0b40bf62c8..5669d39157 100644
--- a/tests/unit/memory/wiki/test_provider_chain.py
+++ b/tests/unit/memory/wiki/test_provider_chain.py
@@ -151,6 +151,9 @@ async def test_falls_over_to_first_working_provider():
async def test_returns_none_only_when_every_provider_fails():
+ from jarvis.memory.wiki.telemetry import telemetry
+
+ before = telemetry.get("wiki_all_providers_failed")
reg = _FakeRegistry(fail_providers=set(_ALL))
chain = build_wiki_provider_chain(
primary="openrouter", model_override="", available=reg.available()
@@ -165,6 +168,10 @@ async def test_returns_none_only_when_every_provider_fails():
)
assert result is None # honest give-up, not a crash
assert set(reg.tried) == _ALL # it really tried all families
+ # The AP-22 honest signal must actually fire — a mis-bound telemetry
+ # import once made this inc raise AttributeError into a swallowed
+ # except, so the counter never moved and no test noticed.
+ assert telemetry.get("wiki_all_providers_failed") == before + 1
async def test_first_provider_success_does_not_try_others():