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(i18n): translate committed German to English in test_phase1c_e2e/test_phase2_e2e

Ruben Lütke62ce984b13e0
diff --git a/tests/fixtures/brain/fake_brain.py b/tests/fixtures/brain/fake_brain.py
index cb6ac1b7aa..b1d893e802 100644
--- a/tests/fixtures/brain/fake_brain.py
+++ b/tests/fixtures/brain/fake_brain.py
@@ -1,10 +1,10 @@
-"""Fake-Brain für Tests: yielded scripted BrainDeltas.
+"""Fake brain for tests: yields scripted BrainDeltas.
-Zwei Modi:
-- `text_response`: nur Text, kein Tool-Call
-- `tool_then_text`: erst Tool-Call, dann nach Tool-Result Text
+Two modes:
+- `text_response`: text only, no tool call
+- `tool_then_text`: tool call first, then text after the tool result
-Implementiert das Brain-Protocol strukturell (runtime_checkable isinstance prüft
+Implements the Brain protocol structurally (runtime_checkable isinstance checks
name/context_window/supports_tools/supports_vision/complete/estimate_cost).
"""
from __future__ import annotations
@@ -16,7 +16,7 @@ from jarvis.core.protocols import BrainDelta, BrainRequest
class FakeBrain:
- """Fake-Brain-Provider für Tests."""
+ """Fake brain provider for tests."""
name: str = "fake-brain"
context_window: int = 8192
@@ -31,10 +31,10 @@ class FakeBrain:
) -> None:
"""
Args:
- script: Liste von Turn-Responses. Jeder Turn ist eine Liste von BrainDeltas.
- Bei N Tool-Use-Rounds müssen N+1 Turns im Script liegen.
- text_response: Default-Text wenn kein Script.
- fail_on_call: Wenn >=0, wirft RuntimeError beim N-ten complete()-Call.
+ script: List of turn responses. Each turn is a list of BrainDeltas.
+ For N tool-use rounds, the script needs N+1 turns.
+ text_response: Default text when no script is given.
+ fail_on_call: If >=0, raises RuntimeError on the Nth complete() call.
"""
self._script = script or [[BrainDelta(content=text_response, finish_reason="stop")]]
self._call_index = 0
@@ -59,5 +59,5 @@ class FakeBrain:
def tool_call_delta(
name: str, input_dict: dict[str, Any], call_id: str = "call_test"
) -> BrainDelta:
- """Hilfs-Konstruktor für einen Tool-Call-Delta."""
+ """Helper constructor for a tool-call delta."""
return BrainDelta(tool_call={"id": call_id, "name": name, "input": input_dict})
diff --git a/tests/fixtures/control/fake_cancel_token.py b/tests/fixtures/control/fake_cancel_token.py
index 334357dfce..3bc3c8d65f 100644
--- a/tests/fixtures/control/fake_cancel_token.py
+++ b/tests/fixtures/control/fake_cancel_token.py
@@ -1,6 +1,6 @@
-"""Fake-CancelToken fuer Tests — strukturell kompatibel zum Protocol.
+"""Fake CancelToken for tests — structurally compatible with the protocol.
-Die echte Implementierung in `jarvis.control.cancel` kommt mit Task 4.
+The real implementation in `jarvis.control.cancel` lands with Task 4.
"""
from __future__ import annotations
@@ -8,7 +8,7 @@ import asyncio
class FakeCancelToken:
- """Minimale Protocol-kompatible Implementierung mit zusaetzlichen Test-Hooks."""
+ """Minimal protocol-compatible implementation with extra test hooks."""
def __init__(self) -> None:
self._event = asyncio.Event()
diff --git a/tests/fixtures/control/fake_cost_meter.py b/tests/fixtures/control/fake_cost_meter.py
index e1ce900cbf..961b2d61e9 100644
--- a/tests/fixtures/control/fake_cost_meter.py
+++ b/tests/fixtures/control/fake_cost_meter.py
@@ -1,8 +1,8 @@
-"""Fake-CostMeter fuer Tests.
+"""Fake CostMeter for tests.
-Laesst sich mit `over_task_after_usd=0.5` so verdrahten, dass der Meter
-nach 0.50 USD Ueberschreitung `over_task_budget()` true liefert —
-perfekt fuer den Budget-Exceed-Integration-Test.
+Can be wired up with `over_task_after_usd=0.5` so the meter returns
+true from `over_task_budget()` once it exceeds 0.50 USD —
+perfect for the budget-exceed integration test.
"""
from __future__ import annotations
diff --git a/tests/fixtures/harness/__init__.py b/tests/fixtures/harness/__init__.py
index 4364440855..c832d1bdf7 100644
--- a/tests/fixtures/harness/__init__.py
+++ b/tests/fixtures/harness/__init__.py
@@ -1 +1 @@
-"""Fake-Harness-Fixtures für Tests."""
+"""Fake-Harness fixtures for tests."""
diff --git a/tests/fixtures/harness/fake_harness.py b/tests/fixtures/harness/fake_harness.py
index 23f199346c..baa853c6d1 100644
--- a/tests/fixtures/harness/fake_harness.py
+++ b/tests/fixtures/harness/fake_harness.py
@@ -1,4 +1,4 @@
-"""Fake-Harness: scripted Ergebnisse ohne echten Subprocess."""
+"""Fake-Harness: scripted results without a real subprocess."""
from __future__ import annotations
from collections.abc import AsyncIterator
@@ -7,7 +7,7 @@ from jarvis.core.protocols import HarnessResult, HarnessTask
class FakeHarness:
- """Fake-Harness für Tests. Liefert scripted Results."""
+ """Fake-Harness for tests. Returns scripted results."""
name: str = "fake-harness"
version: str = "0.0.1"
diff --git a/tests/integration/awareness/test_a1_e2e.py b/tests/integration/awareness/test_a1_e2e.py
index 33b1cca792..3ff6c7ea05 100644
--- a/tests/integration/awareness/test_a1_e2e.py
+++ b/tests/integration/awareness/test_a1_e2e.py
@@ -1,13 +1,13 @@
-"""Integration-Tests fuer Phase A1 — E2E mit echtem Win32.
+"""Integration tests for Phase A1 — E2E with real Win32.
-Skippt auf Linux/Mac (Plan §5 AC). Spawnt notepad.exe als bekannten
-Foreground-Trigger und misst SetWinEventHook-Latenz + UnhookWinEvent-
-Cleanup + 2s-Shutdown-Budget.
+Skips on Linux/Mac (Plan §5 AC). Spawns notepad.exe as a known
+foreground trigger and measures SetWinEventHook latency + UnhookWinEvent
+cleanup + the 2s shutdown budget.
-Wird NICHT von der Standard-Test-Suite eingesammelt wenn auf non-Windows
-laeuft — pytestmark skipt das ganze Modul. Im Worktree-Pfad
-``C:\\Users\\Administrator\\Desktop\\jarvis-a0`` (Win32) laufen die Tests
-real; in Linux-CI: skipped.
+NOT collected by the standard test suite when running on non-Windows —
+pytestmark skips the whole module. On the worktree path
+``C:\\Users\\Administrator\\Desktop\\jarvis-a0`` (Win32) the tests run
+for real; on Linux CI: skipped.
"""
from __future__ import annotations
@@ -20,12 +20,12 @@ import pytest
pytestmark = pytest.mark.skipif(
os.name != "nt",
- reason="Win32-only — Hook-Lifecycle-Test braucht echten Pump-Thread",
+ reason="Win32-only — hook lifecycle test needs a real pump thread",
)
-# Imports duerfen auf Linux NICHT crashen — Lazy-Imports in den Watchers
-# stellen das sicher (siehe HN3). Wenn doch: Module-Top-Import von win32event
-# o.ae. wurde versehentlich eingefuehrt → Sofort fixen.
+# Imports must NOT crash on Linux — lazy imports in the watchers make sure of
+# that (see HN3). If they do: a module-top import of win32event or similar
+# was accidentally introduced → fix immediately.
from jarvis.awareness.config import AwarenessConfig # noqa: E402
from jarvis.awareness.manager import AwarenessManager # noqa: E402
from jarvis.awareness.privacy import PrivacyFilter # noqa: E402
@@ -36,7 +36,7 @@ from jarvis.core.events import FrameUpdated, IdleEntered # noqa: E402
def _async_collect(target: list):
- """Test-Helper: gibt einen async Handler zurueck der Events an die Liste anhaengt."""
+ """Test helper: returns an async handler that appends events to the list."""
async def _handler(ev):
target.append(ev)
return _handler
@@ -59,14 +59,14 @@ async def test_window_focus_watcher_real_win32_hook() -> None:
proc = None
try:
proc = subprocess.Popen(["notepad.exe"])
- # Polling auf event (max 3s — Hook-Latenz sollte <100ms sein)
+ # Poll for the event (max 3s — hook latency should be <100ms)
for _ in range(60):
if any(ev.process_name.lower() == "notepad.exe" for ev in received):
break
await asyncio.sleep(0.05)
assert any(ev.process_name.lower() == "notepad.exe" for ev in received), (
- f"Kein FrameUpdated fuer notepad.exe. "
+ f"No FrameUpdated for notepad.exe. "
f"Received: {[(ev.process_name, ev.window_title) for ev in received]}"
)
finally:
@@ -115,11 +115,11 @@ async def test_window_focus_watcher_stop_under_2s() -> None:
@pytest.mark.skip_ci
@pytest.mark.asyncio
async def test_idle_detector_real_threshold_2s() -> None:
- """IdleDetector mit threshold_s=2 — wartet 3.5s ohne Mouse/KB-Sim.
+ """IdleDetector with threshold_s=2 — waits 3.5s with no mouse/KB sim.
- Annahme: Test laeuft in nicht-interaktiver Session (CI/headless).
- Bei interaktiver Session mit Maus-Bewegung kann der Test fehlschlagen
- — dann gilt's als environmental noise, nicht als A1-Regression.
+ Assumption: test runs in a non-interactive session (CI/headless).
+ In an interactive session with mouse movement the test can fail
+ — that counts as environmental noise, not an A1 regression.
"""
cfg = AwarenessConfig.default()
bus = EventBus()
@@ -133,8 +133,8 @@ async def test_idle_detector_real_threshold_2s() -> None:
try:
await asyncio.sleep(3.5)
assert manager.state.is_idle is True or len(received) > 0, (
- "Erwartet: IdleEntered nach 3.5s Inaktivitaet. "
- "Falls fehlgeschlagen: vermutlich interaktive Session mit Mouse-Movement."
+ "Expected: IdleEntered after 3.5s of inactivity. "
+ "If this fails: likely an interactive session with mouse movement."
)
finally:
await detector.stop()
diff --git a/tests/integration/awareness/test_a2_e2e.py b/tests/integration/awareness/test_a2_e2e.py
index 7f7e3ab02e..df57452713 100644
--- a/tests/integration/awareness/test_a2_e2e.py
+++ b/tests/integration/awareness/test_a2_e2e.py
@@ -1,26 +1,26 @@
-"""Phase A2 — End-to-End Integration Test.
+"""Phase A2 — End-to-end integration test.
-Echte Komponenten verdrahtet (EventBus + RecallStore mit tmpdir DB +
-StoryTracker + FakeVerdichter). Simuliert eine reale Bus-Sequenz:
+Real components wired up (EventBus + RecallStore with a tmpdir DB +
+StoryTracker + FakeVerdichter). Simulates a real bus sequence:
FrameUpdated x N -> IdleEntered
-und prueft den Vollpfad:
+and checks the full path:
- - Verdichter wird genau einmal gerufen mit den high-salience Frames
- - Episode landet in awareness_episodes (SQLite)
- - FTS-Index awareness_episodes_fts ist befuellt (suchbar)
- - state.last_episode_summary + last_episode_id wurden gesetzt
- - EpisodeRecorded-Event wurde publiziert
- - PrivacyFilter-blockierte Frames sind NICHT im Verdichter-Input
+ - the condenser is called exactly once with the high-salience frames
+ - the episode lands in awareness_episodes (SQLite)
+ - the FTS index awareness_episodes_fts is populated (searchable)
+ - state.last_episode_summary + last_episode_id were set
+ - the EpisodeRecorded event was published
+ - frames blocked by PrivacyFilter are NOT in the condenser input
Plan §6 AC §6:
- - "Episode wird nach Window-Switch zu anderer App erstellt (Test mit Bus-Replay)" ✅
- - "Episode landet in SQLite, FTS-Index ist befüllt" ✅
- - "state.last_episode_summary wird nach jedem Flush updated" ✅
- - "PrivacyFilter-blockierte Frames sind NICHT im Verdichter-Input" ✅
+ - "Episode is created after a window switch to a different app (test with bus replay)" ✅
+ - "Episode lands in SQLite, FTS index is populated" ✅
+ - "state.last_episode_summary is updated after every flush" ✅
+ - "Frames blocked by PrivacyFilter are NOT in the condenser input" ✅
-Konvention: Fakes statt Mocks (CLAUDE.md). FakeVerdichter ist deterministisch.
+Convention: fakes instead of mocks (CLAUDE.md). FakeVerdichter is deterministic.
"""
from __future__ import annotations
@@ -48,7 +48,7 @@ from jarvis.memory.recall import RecallStore
@dataclass
class FakeVerdichter:
- """Deterministischer Verdichter — kein echter Brain-Call im e2e-Test."""
+ """Deterministic condenser — no real brain call in the e2e test."""
summary: str = "E2E Test: User war in Code.exe mit pipeline.py aktiv."
tokens_in: int = 250
tokens_out: int = 80
@@ -121,7 +121,7 @@ def _frame_event(frame: FrameSnapshot) -> FrameUpdated:
async def test_e2e_idle_flush_persists_episode_with_fts(
recall_store: RecallStore,
) -> None:
- """Bus-Replay: 3 high-salience Frames -> IdleEntered -> Episode in SQLite + FTS."""
+ """Bus replay: 3 high-salience frames -> IdleEntered -> episode in SQLite + FTS."""
bus = EventBus()
manager = AwarenessManager(AwarenessConfig.default())
verdichter = FakeVerdichter(
@@ -138,8 +138,8 @@ async def test_e2e_idle_flush_persists_episode_with_fts(
received.append(ev)
bus.subscribe(EpisodeRecorded, collect)
- # 3 saliente Frames (verschiedene Titles, gleicher Process → +30 each)
- base_ts = time.time_ns() - 2_000_000_000 # 2s in der Vergangenheit
+ # 3 salient frames (different titles, same process → +30 each)
+ base_ts = time.time_ns() - 2_000_000_000 # 2s in the past
for i, title in enumerate(["pipeline.py", "manager.py", "factory.py"]):
f = _make_frame(title=title, ts_ns=base_ts + i * 500_000_000)
manager.state.current_frame = f
@@ -148,7 +148,7 @@ async def test_e2e_idle_flush_persists_episode_with_fts(
# IdleEntered → flush
await tracker._on_idle_entered(IdleEntered(idle_since_ns=time.time_ns()))
- # Verdichter wurde 1x gerufen
+ # Condenser was called 1x
assert len(verdichter.calls) == 1
call = verdichter.calls[0]
assert len(call["frames"]) == 3
@@ -165,7 +165,7 @@ async def test_e2e_idle_flush_persists_episode_with_fts(
assert ep["tokens_in"] == 250
assert ep["tokens_out"] == 80
- # FTS-Index ist befuellt: search liefert die Episode
+ # FTS index is populated: search returns the episode
fts_results = await recall_store.search_episodes(query="pipeline", limit=10)
assert len(fts_results) == 1
assert fts_results[0]["summary"] == ep["summary"]
@@ -185,7 +185,7 @@ async def test_e2e_idle_flush_persists_episode_with_fts(
async def test_e2e_privacy_blocked_frames_not_in_verdichter_input(
recall_store: RecallStore,
) -> None:
- """Hard Negative §6: capture_allowed=False Frames NIE im Verdichter-Input."""
+ """Hard negative §6: capture_allowed=False frames NEVER in the condenser input."""
bus = EventBus()
manager = AwarenessManager(AwarenessConfig.default())
verdichter = FakeVerdichter()
@@ -214,13 +214,13 @@ async def test_e2e_privacy_blocked_frames_not_in_verdichter_input(
await tracker._on_idle_entered(IdleEntered(idle_since_ns=time.time_ns()))
- # Verdichter call enthaelt KEINE blocked-Titles
+ # Condenser call contains NO blocked titles
assert len(verdichter.calls) == 1
call = verdichter.calls[0]
titles_seen = [f["window_title"] for f in call["frames"]]
assert "Banking - Sparkasse" not in titles_seen
assert "Password Vault" not in titles_seen
- # Allowed Titles sind drin (3 Stueck)
+ # Allowed titles are present (3 of them)
assert len(titles_seen) == 3
for t in ("file_a.py", "file_b.py", "file_c.py"):
assert t in titles_seen
@@ -229,7 +229,7 @@ async def test_e2e_privacy_blocked_frames_not_in_verdichter_input(
async def test_e2e_app_switch_creates_episode_after_min_duration(
recall_store: RecallStore,
) -> None:
- """Plan §6 AC: Episode wird nach Window-Switch zu anderer App erstellt."""
+ """Plan §6 AC: episode is created after a window switch to a different app."""
import asyncio as _aio
bus = EventBus()
@@ -266,7 +266,7 @@ async def test_e2e_app_switch_creates_episode_after_min_duration(
async def test_e2e_short_episode_not_persisted(
recall_store: RecallStore,
) -> None:
- """Plan §6 AC: Episode NICHT erstellt bei Same-App-Switch ohne 60s-Mindestdauer."""
+ """Plan §6 AC: episode NOT created on a same-app switch without the 60s minimum duration."""
bus = EventBus()
manager = AwarenessManager(AwarenessConfig.default())
verdichter = FakeVerdichter()
@@ -289,7 +289,7 @@ async def test_e2e_short_episode_not_persisted(
manager.state.current_frame = f2
await tracker._on_frame_updated(_frame_event(f2))
- # Verdichter NICHT gerufen, recall leer
+ # Condenser NOT called, recall empty
assert verdichter.calls == []
episodes = await recall_store.recent_episodes(limit=10)
assert len(episodes) == 0
@@ -298,7 +298,7 @@ async def test_e2e_short_episode_not_persisted(
async def test_e2e_state_snapshot_includes_episode_summary(
recall_store: RecallStore,
) -> None:
- """Plan §6 AC: state.snapshot_for_prompt() enthaelt nach flush das Summary."""
+ """Plan §6 AC: state.snapshot_for_prompt() contains the summary after a flush."""
bus = EventBus()
manager = AwarenessManager(AwarenessConfig.default())
summary = "Du arbeitest seit 23min an pipeline.py in Code.exe."
@@ -317,12 +317,12 @@ async def test_e2e_state_snapshot_includes_episode_summary(
await tracker._on_idle_entered(IdleEntered(idle_since_ns=time.time_ns()))
snap = manager.state.snapshot_for_prompt(max_chars=600)
- # current_frame ist None (Watcher wurde nicht gestartet); aber
- # last_episode_summary ist gesetzt → sollte gerendert werden.
- # Wenn current_frame is None: snapshot_for_prompt returnt "" — das ist
- # die A1-Implementation. Lass uns sicherstellen dass es entweder
- # rendert ODER current_frame gesetzt setzen.
- # Setzen wir current_frame nochmal damit snapshot rendert:
+ # current_frame is None (the watcher wasn't started); but
+ # last_episode_summary is set → should be rendered.
+ # If current_frame is None: snapshot_for_prompt returns "" — that's
+ # the A1 implementation. Let's make sure it either
+ # renders OR set current_frame.
+ # Set current_frame again so the snapshot renders:
manager.state.current_frame = f
snap = manager.state.snapshot_for_prompt(max_chars=600)
assert summary in snap
diff --git a/tests/integration/awareness/test_a5_e2e.py b/tests/integration/awareness/test_a5_e2e.py
index 7eab7ef810..74eb6e0047 100644
--- a/tests/integration/awareness/test_a5_e2e.py
+++ b/tests/integration/awareness/test_a5_e2e.py
@@ -1,14 +1,14 @@
-"""Phase A5-Lite — End-to-End Integration Test.
+"""Phase A5-Lite — End-to-end integration test.
-Verifiziert dass ``AwarenessManager.probe_all`` korrekt parallelisiert,
-total budget einhaelt, Probe-Exceptions abfaengt und merged dict
-zurueckgibt.
+Verifies that ``AwarenessManager.probe_all`` parallelizes correctly,
+honors the total budget, catches probe exceptions, and returns a
+merged dict.
Plan §9 AC:
-- GitProbe liefert Branch wenn cwd = git-repo, sonst None ✓
-- FileSystemWatcher emittiert FileSaved-Event ✓ (test_filesystem_probe)
-- Alle Probes haben individuellen Timeout (200ms total budget) ✓
-- Probe-Errors crashen NICHT, ungesetzte Felder werden None ✓
+- GitProbe returns the branch when cwd = git repo, else None ✓
+- FileSystemWatcher emits a FileSaved event ✓ (test_filesystem_probe)
+- All probes have an individual timeout (200ms total budget) ✓
+- Probe errors do NOT crash; unset fields become None ✓
"""
from __future__ import annotations
@@ -26,7 +26,7 @@ from jarvis.core.bus import EventBus
class _SlowProbe:
- """Probe der >budget braucht — testet Timeout-Handling."""
+ """Probe that needs >budget — tests timeout handling."""
name = "slow"
async def probe(self, *, cwd: str | None, process_name: str = "") -> dict[str, Any]:
await asyncio.sleep(0.5) # > 200ms budget
@@ -34,14 +34,14 @@ class _SlowProbe:
class _RaisingProbe:
- """Probe der wirft — testet return_exceptions=True."""
+ """Probe that raises — tests return_exceptions=True."""
name = "raising"
async def probe(self, *, cwd: str | None, process_name: str = "") -> dict[str, Any]:
raise RuntimeError("simulated probe failure")
class _StaticProbe:
- """Probe mit deterministischem Output."""
+ """Probe with deterministic output."""
name = "static"
def __init__(self, output: dict[str, Any]) -> None:
self._output = output
@@ -53,7 +53,7 @@ class _StaticProbe:
async def test_probe_all_empty_probes_returns_empty_dict() -> None:
- """Default Manager hat keine Probes → probe_all returnt {}."""
+ """Default manager has no probes → probe_all returns {}."""
m = AwarenessManager(AwarenessConfig.default())
result = await m.probe_all(pid=1234, process_name="Code.exe")
assert result == {}
@@ -71,7 +71,7 @@ async def test_probe_all_merges_multiple_probe_outputs() -> None:
async def test_probe_all_timeout_returns_empty_dict() -> None:
- """Probe braucht >budget → wait_for triggert TimeoutError → {}."""
+ """Probe needs >budget → wait_for triggers TimeoutError → {}."""
cfg = AwarenessConfig.default()
cfg.probes.total_budget_ms = 50 # 50ms budget
m = AwarenessManager(cfg)
@@ -81,25 +81,25 @@ async def test_probe_all_timeout_returns_empty_dict() -> None:
async def test_probe_all_swallows_probe_exceptions() -> None:
- """Probe wirft Exception → return_exceptions=True → field fehlt im output, kein Crash."""
+ """Probe raises an exception → return_exceptions=True → field missing from output, no crash."""
m = AwarenessManager(AwarenessConfig.default())
m._probes = [
_RaisingProbe(),
_StaticProbe({"git_branch": "main"}),
]
result = await m.probe_all(pid=0, process_name="x")
- # raising-probe contributed nichts, static-probe schon
+ # raising-probe contributed nothing, static-probe did
assert result == {"git_branch": "main"}
async def test_probe_all_with_real_git_probe_in_repo(tmp_path: Path) -> None:
- """Echter GitProbe gegen tmp git-init → returnt branch.
+ """Real GitProbe against a tmp git-init → returns the branch.
- Bypass von ``probe_all``-Pfad weil psutil-cwd-resolve fuer einen
- fake pid nicht klappt — wir instantiieren GitProbe direkt und rufen
- ``probe()`` mit dem tmp_path als cwd.
+ Bypasses the ``probe_all`` path because psutil's cwd-resolve doesn't
+ work for a fake pid — we instantiate GitProbe directly and call
+ ``probe()`` with tmp_path as cwd.
"""
- subprocess.run( # noqa: ASYNC221 — sync subprocess nur im Test-Setup
+ subprocess.run( # noqa: ASYNC221 — sync subprocess only in test setup
["git", "init", "--initial-branch=main", str(tmp_path)],
check=True, capture_output=True,
)
@@ -109,7 +109,7 @@ async def test_probe_all_with_real_git_probe_in_repo(tmp_path: Path) -> None:
async def test_filesystem_probe_lifecycle_via_manager() -> None:
- """FileSystemProbe kann via manager start/stop ohne Crash."""
+ """FileSystemProbe can start/stop via the manager without crashing."""
bus = EventBus()
m = AwarenessManager(AwarenessConfig.default(), bus=bus)
fs = FileSystemProbe(bus=bus)
@@ -117,9 +117,9 @@ async def test_filesystem_probe_lifecycle_via_manager() -> None:
m._probes = [fs]
await m.start()
try:
- # Manager.start() hat fs.start() schon gerufen (laut manager.py:start())
+ # Manager.start() already called fs.start() (per manager.py:start())
result = await m.probe_all(pid=0, process_name="x")
- # cwd=None → fs returnt {open_file_hint: None}
+ # cwd=None → fs returns {open_file_hint: None}
assert result == {"open_file_hint": None}
finally:
await m.stop()
diff --git a/tests/integration/mcp/fake_mcp_server.py b/tests/integration/mcp/fake_mcp_server.py
index cf51ef5fa0..ff59daa47d 100644
--- a/tests/integration/mcp/fake_mcp_server.py
+++ b/tests/integration/mcp/fake_mcp_server.py
@@ -1,15 +1,16 @@
-"""Minimaler MCP-Server für Tests — spricht MCP via stdio.
+"""Minimal MCP server for tests — speaks MCP via stdio.
-Nutzt die offizielle `mcp`-Python-Lib (FastMCP), damit das Protokoll
-korrekt implementiert ist — wir würden sonst zu viel Handshake-Logik
-(initialize, notifications/initialized, capabilities) selbst bauen.
+Uses the official `mcp` Python lib (FastMCP) so the protocol is
+implemented correctly — otherwise we'd have to build too much
+handshake logic ourselves (initialize, notifications/initialized,
+capabilities).
-Modi (via ENV `FAKE_MCP_MODE`):
-- "ok" → echo-Tool liefert `{"echoed": args["msg"]}`
-- "fail" → echo-Tool wirft Exception
+Modes (via ENV `FAKE_MCP_MODE`):
+- "ok" → the echo tool returns `{"echoed": args["msg"]}`
+- "fail" → the echo tool raises an exception
-Das Script wird als Subprocess (`python fake_mcp_server.py`) durch
-einen `MCPClient` gestartet.
+The script is started as a subprocess (`python fake_mcp_server.py`) by
+an `MCPClient`.
"""
from __future__ import annotations
@@ -31,7 +32,7 @@ def echo(msg: str) -> str:
if __name__ == "__main__":
- # FastMCP.run() mit default "stdio" — blockiert bis Transport schließt
+ # FastMCP.run() with default "stdio" — blocks until the transport closes
try:
mcp.run("stdio")
except Exception as e: # noqa: BLE001
diff --git a/tests/integration/mcp/test_mcp_client.py b/tests/integration/mcp/test_mcp_client.py
index 4c2a7303be..1ca89a571e 100644
--- a/tests/integration/mcp/test_mcp_client.py
+++ b/tests/integration/mcp/test_mcp_client.py
@@ -1,8 +1,8 @@
-"""Integration-Tests für MCPClient + MCPToolAdapter gegen FakeMCPServer.
+"""Integration tests for MCPClient + MCPToolAdapter against FakeMCPServer.
-Der FakeMCPServer (`fake_mcp_server.py`) läuft als echtes Subprocess
-und spricht MCP via stdio — so testen wir den tatsächlichen
-Protokoll-Pfad inklusive Session-Initialisierung und Tool-Call.
+The FakeMCPServer (`fake_mcp_server.py`) runs as a real subprocess
+and speaks MCP via stdio — this way we test the actual protocol
+path including session initialization and the tool call.
"""
from __future__ import annotations
@@ -21,7 +21,7 @@ FAKE_SERVER = Path(__file__).parent / "fake_mcp_server.py"
def _make_spec(mode: str = "ok") -> MCPServerSpec:
- """Baut eine Spec, die den FakeMCPServer als Subprocess startet."""
+ """Builds a spec that starts the FakeMCPServer as a subprocess."""
return MCPServerSpec(
name=f"fake-mcp-{mode}",
display="Fake MCP",
@@ -84,13 +84,13 @@ async def test_circuit_breaker_opens_on_3_failures() -> None:
client = _client("fail")
try:
await client.start()
- # Drei Fehler hintereinander provozieren
+ # Provoke three failures in a row
for _ in range(3):
with pytest.raises(Exception):
await client.call_tool("echo", {"msg": "boom"})
- # Nach 3 Fails muss der Circuit-Breaker offen sein
+ # After 3 fails, the circuit breaker must be open
assert client.is_healthy is False
- # Weitere calls werden ohne SDK-Kontakt abgewiesen
+ # Further calls are rejected without SDK contact
with pytest.raises(RuntimeError, match="circuit-breaker"):
await client.call_tool("echo", {"msg": "still-bad"})
finally:
diff --git a/tests/integration/memory/test_aggressive_ingest.py b/tests/integration/memory/test_aggressive_ingest.py
index f098349ead..cb4ebd4e93 100644
--- a/tests/integration/memory/test_aggressive_ingest.py
+++ b/tests/integration/memory/test_aggressive_ingest.py
@@ -178,7 +178,7 @@ async def test_pad_thai_lands_in_wiki_without_brain_ack(stack) -> None:
):
await _drive_voice_turn(
bus,
- user_text="Ich war heute mit Carlos Pad-Thai essen, er hat mir von seinem Boss erzaehlt.",
+ user_text="Ich war heute mit Carlos Pad-Thai essen, er hat mir von seinem Boss erzaehlt.", # i18n-allow
brain_text="Klingt lecker, war es scharf?",
)
@@ -287,7 +287,7 @@ async def test_ack_path_still_fires_when_brain_says_notiert(stack) -> None:
harald_update = PageUpdate(
target_path=vault_root / "entities" / "harald.md",
operation="create",
- new_body=_entity_body("harald", "Harald wurde 1976 geboren."),
+ new_body=_entity_body("harald", "Harald wurde 1976 geboren."), # i18n-allow
reason="explicit user note",
)
@@ -296,7 +296,7 @@ async def test_ack_path_still_fires_when_brain_says_notiert(stack) -> None:
):
await _drive_voice_turn(
bus,
- user_text="Harald wurde 1976 geboren.", # 26 chars -- below aggressive min
+ user_text="Harald wurde 1976 geboren.", # 26 chars -- below aggressive min # i18n-allow
brain_text="Notiert.", # explicit ack keyword
)
@@ -376,13 +376,13 @@ async def test_rate_limit_drops_second_aggressive_ingest_within_window(stack) ->
) as proposer:
await _drive_voice_turn(
bus,
- user_text="Mein Lieblingsfilm ist Inception und ich liebe Nolan-Filme.",
+ user_text="Mein Lieblingsfilm ist Inception und ich liebe Nolan-Filme.", # i18n-allow
brain_text="Cool, was hat dich daran beruehrt?",
)
# Same window -- second aggressive ingest must NOT fire.
await _drive_voice_turn(
bus,
- user_text="Mein Lieblingsessen ist Pizza und am liebsten mit Salami.",
+ user_text="Mein Lieblingsessen ist Pizza und am liebsten mit Salami.", # i18n-allow
brain_text="Klassiker. Italienisch oder amerikanisch?",
)
@@ -415,8 +415,8 @@ async def test_aggressive_mode_off_disables_path_entirely(stack) -> None:
) as proposer:
await _drive_voice_turn(
bus,
- user_text="Mein Lieblingsfilm ist Inception und das ist die volle Wahrheit.",
- brain_text="Klingt nach einem guten Film!",
+ user_text="Mein Lieblingsfilm ist Inception und das ist die volle Wahrheit.", # i18n-allow
+ brain_text="Klingt nach einem guten Film!", # i18n-allow
)
bridge.stop()
diff --git a/tests/integration/memory/test_three_triggers.py b/tests/integration/memory/test_three_triggers.py
index dda8292d60..24ed1b44a6 100644
--- a/tests/integration/memory/test_three_triggers.py
+++ b/tests/integration/memory/test_three_triggers.py
@@ -319,7 +319,7 @@ async def test_voice_fact_becomes_context_on_next_turn(stack) -> None:
with patch.object(s["curator"]._llm, "propose_updates", return_value=[update]):
await _drive_voice_turn(
s["bus"],
- user_text="Mein Lieblingsfilm ist Inception und Nolan ist der beste Regisseur.",
+ user_text="Mein Lieblingsfilm ist Inception und Nolan ist der beste Regisseur.", # i18n-allow
brain_text="Cool, Nolan ist wirklich stark.", # no ack -> aggressive path
)
@@ -424,7 +424,7 @@ async def test_ack_path_alone_creates_page(stack) -> None:
harald_update = PageUpdate(
target_path=vault_root / "entities" / "harald.md",
operation="create",
- new_body=_entity_body("harald", "Harald wurde 1976 geboren."),
+ new_body=_entity_body("harald", "Harald wurde 1976 geboren."), # i18n-allow
reason="ack-path fact",
)
@@ -433,7 +433,7 @@ async def test_ack_path_alone_creates_page(stack) -> None:
):
await _drive_voice_turn(
s["bus"],
- user_text="Harald wurde 1976 geboren.", # 26 chars -- below aggressive min
+ user_text="Harald wurde 1976 geboren.", # 26 chars -- below aggressive min # i18n-allow
brain_text="Notiert.", # explicit ack keyword
)
@@ -509,7 +509,7 @@ async def test_voice_path_handlers_do_not_block_voice(stack) -> None:
t0 = time.monotonic_ns()
await s["bus"].publish(TranscriptFinal(
transcript=Transcript(
- text="Mein Lieblings-Test ist dieser hier mit ausreichend Zeichen.",
+ text="Mein Lieblings-Test ist dieser hier mit ausreichend Zeichen.", # i18n-allow
language="de",
confidence=0.95,
),
@@ -553,7 +553,7 @@ async def test_curator_failure_does_not_break_voice_path(stack) -> None:
# The voice turn must complete without raising.
await _drive_voice_turn(
s["bus"],
- user_text="Mein Lieblingsfilm ist Inception und das ist ein langer Satz.",
+ user_text="Mein Lieblingsfilm ist Inception und das ist ein langer Satz.", # i18n-allow
brain_text="Klingt cool, mag ich auch.",
)
@@ -572,8 +572,8 @@ async def test_curator_failure_does_not_break_voice_path(stack) -> None:
):
await _drive_voice_turn(
s["bus"],
- user_text="Test ob das System nach dem Crash noch funktioniert.",
- brain_text="Klar, alles laeuft.",
+ user_text="Test ob das System nach dem Crash noch funktioniert.", # i18n-allow
+ brain_text="Klar, alles laeuft.", # i18n-allow
)
assert (vault_root / "entities" / "ruben.md").is_file()
@@ -621,7 +621,7 @@ async def test_rollup_failure_does_not_break_voice_path(stack) -> None:
):
await _drive_voice_turn(
s["bus"],
- user_text="Test ob die Voice-Pipeline trotz Rollup-Crash noch laeuft.",
+ user_text="Test ob die Voice-Pipeline trotz Rollup-Crash noch laeuft.", # i18n-allow
brain_text="Klar, antworte ich.",
)
assert (vault_root / "entities" / "ruben.md").is_file()
@@ -708,7 +708,7 @@ async def test_fresh_triggers_recover_existing_vault_state(stack) -> None:
with patch.object(s["curator"]._llm, "propose_updates", return_value=[update]):
await _drive_voice_turn(
s["bus"],
- user_text="Mein Lieblingsgetraenk ist Cafe Latte mit Hafermilch.",
+ user_text="Mein Lieblingsgetraenk ist Cafe Latte mit Hafermilch.", # i18n-allow
brain_text="Schoen zu wissen.",
)
assert (vault_root / "entities" / "ruben.md").is_file()
diff --git a/tests/integration/test_ack_flow.py b/tests/integration/test_ack_flow.py
index 0a3e77fb75..671eafe46a 100644
--- a/tests/integration/test_ack_flow.py
+++ b/tests/integration/test_ack_flow.py
@@ -201,7 +201,7 @@ async def test_voice_control_bypass_does_not_invoke_flash_brain() -> None:
"""
# Use the existing voice-control regex as the gate (it's the
# canonical detector).
- fake = FakeAckProvider(response="Ich höre auf.")
+ fake = FakeAckProvider(response="Ich höre auf.") # i18n-allow
ack = build_ack_generator_with_fake(fake)
config = SimpleNamespace(ack_brain=ack._config)
stub = _make_pipeline_stub(ack_brain=ack, config=config)
diff --git a/tests/integration/test_admin_ipc_loopback.py b/tests/integration/test_admin_ipc_loopback.py
index b091d2419a..f7e4f4693e 100644
--- a/tests/integration/test_admin_ipc_loopback.py
+++ b/tests/integration/test_admin_ipc_loopback.py
@@ -1,10 +1,10 @@
-"""IPC-Loopback-Test: AdminPipeServer + AdminPipeClient im gleichen Prozess.
+"""IPC loopback test: AdminPipeServer + AdminPipeClient in the same process.
-Kein echter UAC-Prompt — wir starten den Server im pytest-Event-Loop und
-schicken eine harmlose ``read_registry``-Op gegen ``HKCU\\Environment``.
+No real UAC prompt — we start the server in the pytest event loop and
+send a harmless ``read_registry`` op against ``HKCU\\Environment``.
-Der Test ist ``@pytest.mark.phase5 + @pytest.mark.skip_ci``, weil er
-Windows-Named-Pipes braucht (pywin32). Lokal auf dem Dev-Rechner laeuft er.
+The test is ``@pytest.mark.phase5 + @pytest.mark.skip_ci`` because it
+needs Windows named pipes (pywin32). Runs locally on the dev machine.
"""
from __future__ import annotations
@@ -25,7 +25,7 @@ async def test_read_registry_roundtrip():
try:
import win32pipe # type: ignore[import-not-found,unused-import] # noqa: F401
except ImportError:
- pytest.skip("pywin32 nicht verfuegbar")
+ pytest.skip("pywin32 not available")
secret = b"X" * 32
pipe_name = rf"\\.\pipe\jarvis-admin-test-{uuid.uuid4().hex}"
@@ -35,17 +35,17 @@ async def test_read_registry_roundtrip():
serve_task = asyncio.create_task(server.serve_forever(), name="serve")
try:
- # Kleiner sleep, damit der Accept-Loop seine erste CreateNamedPipe
- # absetzen kann.
+ # Small sleep so the accept loop can issue its first
+ # CreateNamedPipe.
await asyncio.sleep(0.3)
op = ReadRegistryOp(
hive="HKCU", key_path="Environment", value_name="PATH"
)
resp = await client.send(op)
- # Bei success=True muss der Result-Dict "value" und "type" enthalten;
- # bei False ist entweder "registry_key_not_found" oder
- # "registry_read_failed". Beides ist valide — wir pruefen nur, dass
- # die Round-Trip-Infrastruktur sauber laeuft.
+ # On success=True the result dict must contain "value" and "type";
+ # on False it's either "registry_key_not_found" or
+ # "registry_read_failed". Both are valid — we only check that
+ # the round-trip infrastructure runs cleanly.
assert resp.op_id == op.op_id
if resp.success:
assert "value" in resp.result
diff --git a/tests/integration/test_capability_coupling_e2e.py b/tests/integration/test_capability_coupling_e2e.py
index 44ca9e6acc..3b13d4942b 100644
--- a/tests/integration/test_capability_coupling_e2e.py
+++ b/tests/integration/test_capability_coupling_e2e.py
@@ -6,15 +6,15 @@ Verifies the goal stated in `docs/plans/capability-coupling/SPEC.md`:
Hard-negatives (must produce UNSUPPORTED + zero phantom TTS):
1. "Schick eine Email an [email protected] ..."
- 2. "Trag einen Termin morgen 10 Uhr ein"
+ 2. "Trag einen Termin morgen 10 Uhr ein" # i18n-allow
3. "Sende eine WhatsApp an Mama"
4. "Bestelle eine Pizza"
- 5. "Poste auf X dass ich heute frei habe"
+ 5. "Poste auf X dass ich heute frei habe" # i18n-allow
Hard-positives (must NOT trigger UNSUPPORTED — false-negative guard):
- 6. "Öffne Chrome" → local_action.open_app
+ 6. "Öffne Chrome" → local_action.open_app # i18n-allow
7. "Lies die Datei foo.txt" → harness.openclaw
- 8. "Wie spät ist es?" → smalltalk, gate inactive
+ 8. "Wie spät ist es?" → smalltalk, gate inactive # i18n-allow
9. "Such im Web nach Python 3.13" → UNSUPPORTED when no web-search tool
is registered (catches the manager.py:774 prompt-claim drift).
@@ -45,15 +45,15 @@ def seeded_registry() -> CapabilityRegistry:
HARD_NEGATIVE_UTTERANCES = [
"Schick eine Email an [email protected] mit dem Betreff Hallo",
- "Trag einen Termin morgen 10 Uhr ein",
+ "Trag einen Termin morgen 10 Uhr ein", # i18n-allow
"Sende eine WhatsApp an Mama",
"Bestelle eine Pizza",
- "Poste auf X dass ich heute frei habe",
+ "Poste auf X dass ich heute frei habe", # i18n-allow
]
HARD_POSITIVE_LOCAL = [
- ("Öffne Chrome", LocalActionMode.DIRECT),
- ("Klick auf den roten Button links", LocalActionMode.COMPUTER_USE),
+ ("Öffne Chrome", LocalActionMode.DIRECT), # i18n-allow
+ ("Klick auf den roten Button links", LocalActionMode.COMPUTER_USE), # i18n-allow
]
@@ -97,7 +97,7 @@ def test_hard_negative_response_contains_no_phantom_confirmation(
assert plan is not None
response = (plan.response_text or "").lower()
forbidden = [
- "gesendet", "eingetragen", "wird erledigt", "bestellt", "gepostet",
+ "gesendet", "eingetragen", "wird erledigt", "bestellt", "gepostet", # i18n-allow
"sent", "scheduled", "ordered", "done.", "consider it done",
]
leaked = [phrase for phrase in forbidden if phrase in response]
@@ -110,11 +110,11 @@ def test_hard_negative_response_contains_no_phantom_confirmation(
def test_hard_negative_response_starts_with_unsupported_marker(
seeded_registry: CapabilityRegistry,
) -> None:
- """The DE response must start with the canonical 'Das kann ich noch nicht'
+ """The DE response must start with the canonical 'Das kann ich noch nicht' # i18n-allow
marker so the user clearly hears the refusal."""
plan = match_local_action(HARD_NEGATIVE_UTTERANCES[0], lang="de")
assert plan is not None and plan.response_text is not None
- assert plan.response_text.lower().startswith("das kann ich noch nicht"), (
+ assert plan.response_text.lower().startswith("das kann ich noch nicht"), ( # i18n-allow
f"Expected canonical refusal opener, got {plan.response_text!r}"
)
@@ -162,10 +162,10 @@ def test_hard_positive_smalltalk_not_action_intent(
seeded_registry: CapabilityRegistry,
) -> None:
"""Smalltalk must not trigger the action-intent gate."""
- assert not seeded_registry.has_action_intent("Wie spät ist es"), (
- "Smalltalk 'Wie spät ist es' must not be classified as action intent"
+ assert not seeded_registry.has_action_intent("Wie spät ist es"), ( # i18n-allow
+ "Smalltalk 'Wie spät ist es' must not be classified as action intent" # i18n-allow
)
- plan = match_local_action("Wie spät ist es", lang="de")
+ plan = match_local_action("Wie spät ist es", lang="de") # i18n-allow
# Plan may be None (no match anywhere) — but if any plan is returned, it
# must not be UNSUPPORTED.
if plan is not None:
diff --git a/tests/integration/test_capability_seed_boot.py b/tests/integration/test_capability_seed_boot.py
index 5dd8f99e32..d42e9774fd 100644
--- a/tests/integration/test_capability_seed_boot.py
+++ b/tests/integration/test_capability_seed_boot.py
@@ -1,7 +1,7 @@
"""Boot-wiring regression: the brain build must seed the CapabilityRegistry.
The 2026-05-25 live bug ("Kannst du mir einen Subagent spawnen …" → Jarvis
-answers "Das kann ich noch nicht. Mir fehlt dafür ein Werkzeug …") was caused by
+answers "Das kann ich noch nicht. Mir fehlt dafür ein Werkzeug …") was caused by # i18n-allow
``seed_registry()`` never being called in the production boot path. The registry
stayed empty, so ``BrainManager._check_unsupported_intent`` rejected every action
utterance before the deterministic force-spawn path could run.
@@ -52,7 +52,7 @@ def test_build_default_brain_seeds_capability_registry(empty_registry) -> None:
)
resolved = empty_registry.resolve_intent(
- "Kannst du mir einen Subagent spawnen, der eine Datei macht"
+ "Kannst du mir einen Subagent spawnen, der eine Datei macht" # i18n-allow
)
assert resolved is not None, (
"a sub-agent spawn request must resolve to a registered capability"
diff --git a/tests/integration/test_conditional_vision.py b/tests/integration/test_conditional_vision.py
index a4a6d5964a..bc3e039638 100644
--- a/tests/integration/test_conditional_vision.py
+++ b/tests/integration/test_conditional_vision.py
@@ -50,7 +50,7 @@ def _manager(obs: SimpleNamespace) -> BrainManager:
async def test_smalltalk_turn_skips_screenshot(tmp_path) -> None:
m = _manager(_make_obs(tmp_path))
imgs = await m._collect_vision_images(
- trace_id=uuid4(), user_text="wie spät ist es", is_smalltalk=True
+ trace_id=uuid4(), user_text="wie spät ist es", is_smalltalk=True # i18n-allow
)
assert imgs == ()
diff --git a/tests/integration/test_dispatch_to_harness.py b/tests/integration/test_dispatch_to_harness.py
index 6eaa0e0dab..0b622e56c7 100644
--- a/tests/integration/test_dispatch_to_harness.py
+++ b/tests/integration/test_dispatch_to_harness.py
@@ -35,17 +35,17 @@ def ctx():
async def test_single_harness_success(ctx):
bus = EventBus()
mgr = _make_manager_with_fakes(bus, {
- "openclaw": FakeHarness(scripted_output="Build läuft durch."),
+ "openclaw": FakeHarness(scripted_output="Build succeeded."),
})
tool = DispatchToHarnessTool(bus=bus, manager=mgr, max_output_chars=4000)
result = await tool.execute(
- {"harness": "openclaw", "prompt": "Prüfe den Build."},
+ {"harness": "openclaw", "prompt": "Check the build."},
ctx,
)
assert result.success is True
assert result.output["harness"] == "openclaw"
- assert "Build läuft durch." in result.output["stdout"]
+ assert "Build succeeded." in result.output["stdout"]
@pytest.mark.asyncio
@@ -131,4 +131,4 @@ async def test_output_trim_for_large_stdout(ctx):
result = await tool.execute({"harness": "fake", "prompt": "p"}, ctx)
assert result.success is True
assert len(result.output["stdout"]) < 2000
- assert "gekürzt" in result.output["stdout"]
+ assert "trimmed" in result.output["stdout"]
diff --git a/tests/integration/test_docs_routes.py b/tests/integration/test_docs_routes.py
index e88b973e6a..f240b76a89 100644
--- a/tests/integration/test_docs_routes.py
+++ b/tests/integration/test_docs_routes.py
@@ -1,4 +1,4 @@
-"""Integration-Tests fuer /api/docs Routes via FastAPI TestClient."""
+"""Integration tests for /api/docs routes via FastAPI TestClient."""
from __future__ import annotations
from pathlib import Path
@@ -30,7 +30,7 @@ Direkt-Aktion via Sub-Jarvis-Spawn.
"""
HOWTO_MD = """---
-title: "How-To: Provider hinzufuegen"
+title: "How-To: Add a provider"
slug: provider-add
diataxis: howto
status: active
@@ -183,7 +183,7 @@ def test_get_asset_returns_file(client: TestClient) -> None:
def test_get_asset_path_traversal_blocked(client: TestClient) -> None:
resp = client.get("/api/docs/asset/router-discipline/..%2F..%2Fetc%2Fpasswd")
- # Entweder 400 (Traversal) oder 404 — Hauptsache nicht 200
+ # Either 400 (traversal) or 404 — as long as it's not 200
assert resp.status_code in (400, 404)
@@ -227,8 +227,8 @@ phase: 6
# ----------------------------------------------------------------------
def test_open_doc_in_editor(client: TestClient, monkeypatch) -> None:
- """``os.startfile`` ist Windows-only und blocking-frei. Wir patchen es
- weg und checken nur, dass der Endpoint die Pfad-Auflösung korrekt macht.
+ """``os.startfile`` is Windows-only and non-blocking. We patch it
+ away and only check that the endpoint resolves the path correctly.
"""
import os as os_module
diff --git a/tests/integration/test_downloads_routes.py b/tests/integration/test_downloads_routes.py
index f58f85be3d..e3d5dcd752 100644
--- a/tests/integration/test_downloads_routes.py
+++ b/tests/integration/test_downloads_routes.py
@@ -53,16 +53,16 @@ def test_save_writes_to_downloads(home: Path) -> None:
client = _client(native=True, home=home)
res = client.post(
"/api/downloads/save",
- json={"filename": "note.txt", "content_b64": _b64("hällo".encode())},
+ json={"filename": "note.txt", "content_b64": _b64("hällo".encode())}, # i18n-allow
)
assert res.status_code == 200, res.text
data = res.json()
target = home / "Downloads" / "note.txt"
assert target.exists()
- assert target.read_text(encoding="utf-8") == "hällo"
+ assert target.read_text(encoding="utf-8") == "hällo" # i18n-allow
assert data["saved_path"] == str(target)
assert data["filename"] == "note.txt"
- assert data["bytes_written"] == len("hällo".encode())
+ assert data["bytes_written"] == len("hällo".encode()) # i18n-allow
def test_save_disabled_returns_404(home: Path) -> None:
diff --git a/tests/integration/test_factory_wiring.py b/tests/integration/test_factory_wiring.py
index 78bea24617..e8c77204ae 100644
--- a/tests/integration/test_factory_wiring.py
+++ b/tests/integration/test_factory_wiring.py
@@ -1,15 +1,15 @@
-"""Regressions-Tests fuer die Factory-Wire-In.
-
-Welle-4-Migration: vorher gab es zwei Tiers ``router`` und ``sub_jarvis``,
-und ``SUB_TOOLS`` war die Tool-Liste fuer den Sub-Tier. Sub-Jarvis-Tier
-wurde durch die OpenClaw-Bridge ersetzt (siehe docs/openclaw-bridge.md §11)
-— nur ``router`` bleibt; ``SUB_TOOLS`` ist geloescht.
-
-Verifiziert:
-- build_default_brain(tier="router") liefert einen BrainManager mit Router-Tier
-- spawn-worker ist als Tool im Router-Tool-Set (ROUTER_TOOLS Konstante)
-- Router-System-Prompt ist injiziert (via _system_prompt_extra)
-- JARVIS_BRAIN=legacy-Escape liefert keinen spawn_worker
+"""Regression tests for the factory wire-in.
+
+Wave-4 migration: there used to be two tiers, ``router`` and ``sub_jarvis``,
+and ``SUB_TOOLS`` was the tool list for the sub tier. The Sub-Jarvis tier
+was replaced by the OpenClaw bridge (see docs/openclaw-bridge.md §11)
+— only ``router`` remains; ``SUB_TOOLS`` has been deleted.
+
+Verifies:
+- build_default_brain(tier="router") returns a BrainManager with the router tier
+- spawn-worker is a tool in the router tool set (ROUTER_TOOLS constant)
+- the router system prompt is injected (via _system_prompt_extra)
+- JARVIS_BRAIN=legacy escape returns no spawn_worker
"""
from __future__ import annotations
@@ -46,7 +46,7 @@ def test_router_system_prompt_is_injected() -> None:
brain = build_default_brain(tier="router")
extra = getattr(brain, "_system_prompt_extra", "")
assert any(kw in extra for kw in ("Router", "Delegator", "spawn_worker", "SPAWN")), (
- f"Router-System-Prompt nicht injiziert. _system_prompt_extra[:200]: {extra[:200]!r}"
+ f"Router system prompt not injected. _system_prompt_extra[:200]: {extra[:200]!r}"
)
@@ -56,7 +56,7 @@ def test_legacy_mode_escape_works() -> None:
brain = build_default_brain(tier="router")
tools = getattr(brain, "_tools", {})
assert "spawn_worker" not in tools, (
- "Legacy-Pfad darf kein spawn_worker laden"
+ "legacy path must not load spawn_worker"
)
finally:
os.environ.pop("JARVIS_BRAIN", None)
diff --git a/tests/integration/test_fallback_chain.py b/tests/integration/test_fallback_chain.py
index bf6fbe5078..01e2981d10 100644
--- a/tests/integration/test_fallback_chain.py
+++ b/tests/integration/test_fallback_chain.py
@@ -77,7 +77,7 @@ async def test_all_providers_fail_publishes_response_generated_for_transcript():
event (``recorder.py::_on_response_generated``). The total-failure branch of
``generate`` returned the apology WITHOUT publishing that event, so the
recorded turn had an empty ``jarvis_text`` — the UI showed the user line but no
- reply, even though the user clearly heard "ich komme gerade nicht an mein
+ reply, even though the user clearly heard "ich komme gerade nicht an mein # i18n-allow
Sprachmodell". The spoken apology must be published like any other reply.
"""
bus = EventBus()
@@ -157,7 +157,7 @@ async def test_router_picks_deep_for_research_intent():
manager = BrainManager(config=config, bus=bus, tools={})
chain = manager._build_fallback_chain("deep")
- # Erstes Element sollte das deep_model nutzen
+ # First element should use the deep_model
first_provider, first_model = chain[0]
assert first_provider == "claude-subscription"
assert first_model == "opus-model"
@@ -178,16 +178,16 @@ async def test_router_picks_fast_for_simple_intent():
first_provider, first_model = chain[0]
assert first_provider == "claude-subscription"
assert first_model == "haiku-model"
- # Und der Haiku-Fallback ist opus-model
+ # And the Haiku fallback is opus-model
assert chain[1][1] == "opus-model"
class _MissingKeyBrain:
- """Brain-Stub der wie ein echter Provider ohne API-Key failt.
+ """Brain stub that fails like a real provider with no API key.
- Der Cache-Lookup in _get_brain liefert diese Instanz; die complete()-
- Methode wirft beim ersten Call die typische "Kein API-Key"-Exception,
- die _is_missing_key_exc erkennen muss.
+ The cache lookup in _get_brain returns this instance; the complete()
+ method raises the typical "missing API key" exception on the first
+ call, which _is_missing_key_exc must recognize.
"""
name = "missing-key-brain"
context_window = 8192
@@ -199,7 +199,7 @@ class _MissingKeyBrain:
async def complete(self, req): # type: ignore[no-untyped-def]
self.call_count += 1
- raise RuntimeError("Kein Gemini-API-Key gefunden")
+ raise RuntimeError("Kein Gemini-API-Key gefunden") # i18n-allow — matched by _is_missing_key_exc
yield # pragma: no cover
def estimate_cost(self, req) -> float: # type: ignore[no-untyped-def]
@@ -207,7 +207,7 @@ class _MissingKeyBrain:
class _EmptyBrain:
- """Brain-Stub fuer legitime leere Provider-Antworten (fire-and-forget spawns).
+ """Brain stub for legitimate empty provider responses (fire-and-forget spawns).
Production now keys the 'legitimate silence' path on finish_reason=="suppress_response"
(2026-04-29 fix): a finish_reason="stop" with empty text triggers the empty-response
@@ -231,7 +231,7 @@ class _EmptyBrain:
@pytest.mark.asyncio
async def test_empty_provider_response_is_silent_not_provider_error():
- """Regression: Prompt-erlaubtes Schweigen darf kein API-Key-Fehler werden."""
+ """Regression: prompt-sanctioned silence must not become an API-key error."""
bus = EventBus()
config = JarvisConfig()
config.brain.primary = "gemini"
@@ -265,10 +265,10 @@ def test_provider_chain_error_keeps_primary_failure_before_missing_fallback_keys
@pytest.mark.asyncio
async def test_dead_provider_skipped_on_subsequent_turns():
- """Bug-Fix-Regression: nach missing_key wird Provider in Session deaktiviert.
+ """Bug-fix regression: after missing_key, the provider is deactivated for the session.
- Vorher: jeder Voice-Turn hat 8x sequentiell auf "Kein API-Key" gewartet.
- Nach dem Fix: Provider landet in `_dead_providers`, wird beim naechsten
+ Before: every voice turn waited 8x sequentially on "no API key".
+ After the fix: the provider lands in `_dead_providers` and gets filtered
Build der Chain rausgefiltert.
"""
bus = EventBus()
@@ -292,8 +292,8 @@ async def test_dead_provider_skipped_on_subsequent_turns():
manager._brain_cache[("gemini", "gemini-pro")] = dead_gemini
manager._brain_cache[("claude-subscription", "haiku")] = working_claude
- # Test-Chain mit eingebautem Dead-Provider-Filter (mimickt das Verhalten
- # des echten _build_fallback_chain ohne Plugin-Discovery zu brauchen).
+ # Test chain with a built-in dead-provider filter (mimics the behavior
+ # of the real _build_fallback_chain without needing plugin discovery).
def _chain(level: str) -> list[tuple[str, str | None]]:
full = [
("gemini", "gemini-flash"),
@@ -309,19 +309,19 @@ async def test_dead_provider_skipped_on_subsequent_turns():
assert "gemini" in manager._dead_providers
calls_after_turn1 = dead_gemini.call_count
- # Turn 2: Gemini wird NICHT mehr versucht (call_count bleibt gleich)
+ # Turn 2: Gemini is NOT tried again (call_count stays the same)
out2 = await manager.generate("hi nochmal", use_history=False)
assert "Claude" in out2
assert dead_gemini.call_count == calls_after_turn1, (
- "Dead-Provider wurde erneut versucht — Filter im _build_fallback_chain "
- "greift nicht."
+ "dead provider was retried — filter in _build_fallback_chain "
+ "is not effective."
)
@pytest.mark.asyncio
async def test_dead_providers_reset_on_switch():
- """Provider-Switch (User setzt Key, sagt 'wechsel auf gemini') resettet
- die Dead-Liste damit der frische Key sofort greift."""
+ """A provider switch (user sets a key, says 'switch to gemini') resets
+ the dead list so the fresh key takes effect immediately."""
bus = EventBus()
config = JarvisConfig()
config.brain.primary = "gemini"
@@ -331,13 +331,13 @@ async def test_dead_providers_reset_on_switch():
manager = BrainManager(config=config, bus=bus, tools={})
manager._registry._loaded = True
- # Initial-State: gemini ist dead, claude-subscription steht als Switch-Ziel bereit
+ # Initial state: gemini is dead, claude-subscription is ready as the switch target
manager._dead_providers.add("gemini")
manager._brain_cache[("gemini", "gemini-flash")] = FakeBrain(text_response="x")
manager._brain_cache[("claude-subscription", "haiku")] = FakeBrain(text_response="ok")
await manager.switch("claude-subscription")
assert "gemini" not in manager._dead_providers, (
- "Dead-Liste muss bei Switch reset werden — sonst landet ein neu "
- "gesetzter Key nicht in der Chain."
+ "dead list must be reset on switch — otherwise a newly set "
+ "key never makes it into the chain."
)
diff --git a/tests/integration/test_phase1c_e2e.py b/tests/integration/test_phase1c_e2e.py
index 8b4e81d4ca..245007898c 100644
--- a/tests/integration/test_phase1c_e2e.py
+++ b/tests/integration/test_phase1c_e2e.py
@@ -74,7 +74,7 @@ def test_memory_save_skill_is_disabled_and_does_not_trigger(
reg.reload_sync()
matcher = TriggerMatcher(reg)
skill = matcher.match_voice(
- "merk dir: python ist meine lieblings-sprache", lang="de"
+ "merk dir: python ist meine lieblings-sprache", lang="de" # i18n-allow
)
# Disabled skill with empty triggers must never fire.
assert skill is None
@@ -84,10 +84,10 @@ def test_memory_save_skill_is_disabled_and_does_not_trigger(
async def test_skill_runner_instantiates_correctly(
builtin_root: Path, bus: EventBus
) -> None:
- """Regression-Test fuer BLOCKER 2 (SkillRunner signature)."""
+ """Regression test for BLOCKER 2 (SkillRunner signature)."""
reg = SkillRegistry(builtin_root, bus)
reg.reload_sync()
- # Muss ohne TypeError funktionieren nach Fix
+ # Must work without TypeError after the fix
runner = SkillRunner(registry=reg, bus=bus)
assert runner is not None
assert runner.registry is reg
diff --git a/tests/integration/test_phase2_e2e.py b/tests/integration/test_phase2_e2e.py
index 24112e1268..4216840e86 100644
--- a/tests/integration/test_phase2_e2e.py
+++ b/tests/integration/test_phase2_e2e.py
@@ -40,7 +40,7 @@ class _DummyTool:
@pytest_asyncio.fixture
async def fake_infra(tmp_path, monkeypatch):
- """Baut Bus+Manager mit FakeBrain + DummyTool auf."""
+ """Builds a Bus+Manager with FakeBrain + DummyTool."""
bus = EventBus()
config = JarvisConfig()
config.safety = SafetyConfig(
@@ -62,12 +62,12 @@ async def fake_infra(tmp_path, monkeypatch):
],
# 2. Turn: Finale Antwort nach Tool-Result
[
- BrainDelta(content="Fertig: echo-hello-world"),
+ BrainDelta(content="Fertig: echo-hello-world"), # i18n-allow (matched by assert below)
BrainDelta(finish_reason="stop"),
],
])
- # BrainManager patchen damit er den FakeBrain nutzt
+ # Patch BrainManager so it uses the FakeBrain
manager = BrainManager(
config=config,
bus=bus,
@@ -80,7 +80,7 @@ async def fake_infra(tmp_path, monkeypatch):
manager._registry._loaded = True
manager._registry._classes[manager._active_name] = type(fake)
manager._brain_cache[(manager._active_name, None)] = fake
- # Fallback-Chain für Tests einfrieren — nur den fake nutzen
+ # Freeze the fallback chain for tests — only use the fake
manager._build_fallback_chain = lambda level: [(manager._active_name, None)] # type: ignore[assignment]
return {"manager": manager, "fake": fake, "tool": tool, "bus": bus}
@@ -101,11 +101,11 @@ async def test_brain_can_use_tool_and_finish(fake_infra):
result = await fake_infra["manager"].generate("Benutze echo_tool mit msg=hello-world", use_history=False)
- # Tool wurde ausgeführt
+ # Tool was executed
assert len(fake_infra["tool"].calls) == 1
assert fake_infra["tool"].calls[0] == {"msg": "hello-world"}
- # Events wurden publiziert
+ # Events were published
proposed = [e for e in captured_events if e[0] == "proposed"]
executed = [e for e in captured_events if e[0] == "executed"]
assert len(proposed) == 1
@@ -114,11 +114,11 @@ async def test_brain_can_use_tool_and_finish(fake_infra):
assert executed[0][1] == "echo_tool"
assert executed[0][2] is True
- # Fake-Brain wurde 2× aufgerufen (Tool-Call + Follow-up)
+ # Fake brain was called 2x (tool call + follow-up)
assert len(fake_infra["fake"].calls) == 2
# Final text
- assert "Fertig" in result
+ assert "Fertig" in result # i18n-allow (matches content set above)
@pytest.mark.asyncio
@@ -127,7 +127,7 @@ async def test_no_tool_call_just_text():
config = JarvisConfig()
fake = FakeBrain(text_response="Hallo!")
manager = BrainManager(config=config, bus=bus, tools={})
- # Keine Tools → Dispatcher nutzt den simple-Path
+ # No tools → dispatcher uses the simple path
manager._active_name = fake.name
manager._registry._loaded = True
manager._registry._classes[fake.name] = type(fake)