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_vision_live/test_websocket_echo/test_worker_lazy_bootstrap

Ruben Lütked406b1d657ec
diff --git a/tests/integration/test_vision_live.py b/tests/integration/test_vision_live.py
index 3a7dffefe2..ea9b907d9a 100644
--- a/tests/integration/test_vision_live.py
+++ b/tests/integration/test_vision_live.py
@@ -1,13 +1,13 @@
-"""Live-Tests fuer die Vision-Engine (Phase 5 Capability 1).
+"""Live tests for the vision engine (Phase 5 Capability 1).
-Diese Tests brauchen einen echten Windows-Desktop (mss, pywinauto,
-Foreground-Window). Sie sind standardmaessig **skipped**, weil sie in
-CI-/Sandbox-Umgebungen ohne GUI fehlschlagen. Lokal manuell via:
+These tests need a real Windows desktop (mss, pywinauto,
+foreground window). They are **skipped** by default, because they
+fail in CI/sandbox environments without a GUI. Run locally manually via:
pytest tests/integration/test_vision_live.py -m phase5 --runlive
-(Die `--runlive`-Konvention ist eine Placeholder-Marker-Kombination, die
-der Haupt-Dev spaeter verdrahtet. Solange gilt: die Tests skippen.)
+(The `--runlive` convention is a placeholder-marker combination that
+the lead dev will wire up later. Until then: the tests skip.)
"""
from __future__ import annotations
@@ -41,10 +41,10 @@ async def test_screenshot_roundtrip_live():
@pytest.mark.asyncio
async def test_uia_tree_budget_on_notepad_under_2000ms():
- """Notepad -> UIA-Tree muss unter 2000ms bleiben (Performance-Budget).
+ """Notepad -> UIA tree must stay under 2000ms (performance budget).
- Voraussetzung: Notepad ist geoeffnet und im Vordergrund. Wird vom
- Haupt-Dev vor dem Smoke-Run manuell arrangiert.
+ Prerequisite: Notepad is open and in the foreground. Arranged
+ manually by the lead dev before the smoke run.
"""
from jarvis.vision.uia_tree import UIATreeSource
@@ -53,7 +53,7 @@ async def test_uia_tree_budget_on_notepad_under_2000ms():
obs = await src.observe()
elapsed_ms = (time.perf_counter() - start) * 1000
assert elapsed_ms < 2000, f"UIA-Tree took {elapsed_ms:.1f}ms, budget 2000ms"
- # Sanity-Check: mindestens Root ist drin oder overflow.
+ # Sanity check: at least root is present, or overflow.
assert obs.source in ("ui_tree_only", "screenshot_only")
await src.close()
diff --git a/tests/integration/test_websocket_echo.py b/tests/integration/test_websocket_echo.py
index b6bdcf5aa9..0258bdcee8 100644
--- a/tests/integration/test_websocket_echo.py
+++ b/tests/integration/test_websocket_echo.py
@@ -1,10 +1,10 @@
-"""Integration-Tests für den WebSocket-Endpoint des WebServers.
+"""Integration tests for the WebServer's WebSocket endpoint.
-Verifiziert:
-- Welcome-Frame kommt unmittelbar nach Connect.
-- Ein per bus.publish() gefeuerter Event landet als Envelope beim Client.
-- Ping-Command bekommt Pong-Antwort.
-- Invalide Frames werden nicht weitergeleitet, aber publishen ErrorOccurred.
+Verifies:
+- The welcome frame arrives immediately after connect.
+- An event fired via bus.publish() lands as an envelope at the client.
+- A ping command gets a pong response.
+- Invalid frames are not forwarded, but publish ErrorOccurred.
"""
from __future__ import annotations
@@ -46,9 +46,9 @@ def test_bus_event_forwarded_as_envelope(web_server: WebServer) -> None:
with client.websocket_connect("/ws") as ws:
_receive_welcome(ws)
- # Publishe direkt auf dem Bus — muss <500ms als Envelope ankommen.
- # TestClient läuft die Server-Coroutinen synchron; wir senden einen
- # Command der intern bus.publish aufruft.
+ # Publish directly on the bus — must arrive as an envelope in <500ms.
+ # TestClient runs the server coroutines synchronously; we send a
+ # command that internally calls bus.publish.
start = time.monotonic()
ws.send_json({"type": "command", "action": "test_event", "payload": {}})
@@ -65,24 +65,24 @@ def test_bus_event_forwarded_as_envelope(web_server: WebServer) -> None:
def test_direct_bus_publish_reaches_client(web_server: WebServer) -> None:
- """Ein außerhalb des WS gefeuertes Event muss beim Client als Envelope landen."""
+ """An event fired outside the WS must land at the client as an envelope."""
import asyncio
with TestClient(web_server.app) as client:
with client.websocket_connect("/ws") as ws:
_receive_welcome(ws)
- # Publishe über einen eigenen Loop — der TestClient hat seinen
- # eigenen asyncio-Loop, daher direkt die Handler des Bus aufrufen.
+ # Publish via our own loop — the TestClient has its own
+ # asyncio loop, so call the bus handlers directly.
async def _pub() -> None:
await web_server.bus.publish(
SystemStarted(version="test-direct", source_layer="test")
)
- # Zwischen den send/receive-Ops des TestClients gibt es einen
- # internen Loop — wir rufen publish in der gleichen Instanz.
- # Einfacher: ein Ping-Command macht einen Server-Roundtrip, dann
- # sehen wir publish als nächstes Frame.
+ # Between the TestClient's send/receive ops there is an
+ # internal loop — we call publish on the same instance.
+ # Simpler: a ping command does a server roundtrip, then we
+ # see publish as the next frame.
loop = asyncio.new_event_loop()
try:
loop.run_until_complete(_pub())
@@ -119,7 +119,7 @@ def test_invalid_frame_publishes_error_event(web_server: WebServer) -> None:
_receive_welcome(ws)
ws.send_json({"type": "bogus-frame-type"})
- # Der ErrorOccurred kommt zurück als Envelope (Wildcard-Subscription).
+ # The ErrorOccurred comes back as an envelope (wildcard subscription).
frame = ws.receive_json()
assert frame["type"] == "event"
assert frame["event_name"] == "ErrorOccurred"
@@ -135,8 +135,8 @@ def test_client_disconnect_cleans_up_subscription(web_server: WebServer) -> None
_receive_welcome(ws)
during = len(web_server.bus._wildcard_subscribers) # type: ignore[attr-defined]
assert during == before + 1
- # Nach dem with-Block: Disconnect → Unsubscribe
- # TestClient gibt der Server-Coroutine Zeit zum Cleanup.
+ # After the with block: disconnect → unsubscribe
+ # TestClient gives the server coroutine time to clean up.
time.sleep(0.1)
after = len(web_server.bus._wildcard_subscribers) # type: ignore[attr-defined]
assert after == before, f"Leak: {before} → {after}"
diff --git a/tests/integration/test_worker_lazy_bootstrap.py b/tests/integration/test_worker_lazy_bootstrap.py
index 9ba23cad63..0f67245c69 100644
--- a/tests/integration/test_worker_lazy_bootstrap.py
+++ b/tests/integration/test_worker_lazy_bootstrap.py
@@ -83,7 +83,7 @@ async def test_execute_returns_honest_failure_when_manager_none() -> None:
)
assert result.success is False
assert result.error is not None
- assert "Der Hintergrund-Worker ist noch nicht bereit" in result.error
+ assert "Der Hintergrund-Worker ist noch nicht bereit" in result.error # i18n-allow (matches production error text)
@pytest.mark.asyncio
@@ -294,8 +294,8 @@ def test_set_worker_bootstrap_failed_round_trips() -> None:
@pytest.mark.asyncio
async def test_execute_short_circuits_on_bootstrap_failed() -> None:
"""When the bootstrap-failed sentinel is set, spawn_worker must
- return the permanent-failure ack ("konnte nicht initialisiert werden")
- INSTEAD of the transient "noch nicht bereit" message. The user is
+ return the permanent-failure ack ("konnte nicht initialisiert werden") # i18n-allow (matches production error text)
+ INSTEAD of the transient "noch nicht bereit" message. The user is # i18n-allow (matches production error text)
otherwise told to wait for something that will never happen."""
brain = build_default_brain(tier="router")
tool = brain._tools["spawn_worker"]
@@ -307,6 +307,6 @@ async def test_execute_short_circuits_on_bootstrap_failed() -> None:
)
assert result.success is False
assert result.error is not None
- assert "konnte nicht initialisiert werden" in result.error
+ assert "konnte nicht initialisiert werden" in result.error # i18n-allow (matches production error text)
# Make sure we didn't fall through to the transient-failure branch.
- assert "noch nicht bereit" not in result.error
+ assert "noch nicht bereit" not in result.error # i18n-allow (matches production error text)