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_missions_routes/test_missions_worker_aggregator

Ruben Lütkebe12567d6983
diff --git a/tests/missions/api/test_missions_routes.py b/tests/missions/api/test_missions_routes.py
index e0d9418448..8bce31f362 100644
--- a/tests/missions/api/test_missions_routes.py
+++ b/tests/missions/api/test_missions_routes.py
@@ -1,14 +1,14 @@
-"""REST-Route-Tests fuer das Phase-6 Mission-API.
-
-Pattern: FastAPI ``TestClient`` + frischer ``MissionManager`` pro Test
-(via ``tmp_path``-Fixture). Deckt:
-- 503 wenn ``app.state.mission_manager`` nicht gesetzt ist.
-- Listing leer / mit Eintraegen / mit State-Filter.
-- Detail mit Events + Verdicts.
-- Dispatch ohne Kontrollierer (Mission landet in PENDING, ``started=false``).
-- Dispatch mit Stub-Kontrollierer (BackgroundTask wird scheduled).
-- Cancel happy + 404 + 409 (terminal-state).
-- Kill 503 ohne Kontrollierer.
+"""REST route tests for the Phase-6 Mission API.
+
+Pattern: FastAPI ``TestClient`` + a fresh ``MissionManager`` per test
+(via the ``tmp_path`` fixture). Covers:
+- 503 when ``app.state.mission_manager`` is not set.
+- Listing empty / with entries / with a state filter.
+- Detail with events + verdicts.
+- Dispatch without a Kontrollierer (mission lands in PENDING, ``started=false``).
+- Dispatch with a stub Kontrollierer (BackgroundTask gets scheduled).
+- Cancel happy + 404 + 409 (terminal state).
+- Kill 503 without a Kontrollierer.
"""
from __future__ import annotations
@@ -51,7 +51,7 @@ async def manager(tmp_path: Path):
@pytest.fixture
def app_no_manager() -> FastAPI:
- """FastAPI ohne mission_manager — fuer 503-Pfad."""
+ """FastAPI without mission_manager — for the 503 path."""
app = FastAPI()
app.include_router(missions_router)
return app
@@ -112,7 +112,7 @@ def test_dispatch_then_list_contains_mission(
)
assert d.status_code == 201
mission_id = d.json()["mission_id"]
- # Ohne Kontrollierer wird nicht gestartet
+ # Without a Kontrollierer, it doesn't start
assert d.json()["started"] == "false"
r = client.get("/api/missions")
@@ -139,7 +139,7 @@ def test_list_state_filter_excludes_unmatched(
ids = [m["id"] for m in r1.json()["missions"]]
assert mid in ids
- # Filter APPROVED enthaelt sie nicht
+ # Filter APPROVED does not contain it
r2 = client.get("/api/missions?state=APPROVED")
assert r2.status_code == 200
assert r2.json()["total"] == 0
@@ -166,8 +166,8 @@ def test_get_returns_404_for_unknown(app_with_manager: FastAPI) -> None:
async def test_get_returns_events_and_verdicts(
manager: MissionManager,
) -> None:
- """Erzeugt eine Mission, hangt manuell einen CriticVerdictReady-Event an
- und prueft dass /api/missions/{id} ihn unter ``verdicts`` listet."""
+ """Creates a mission, manually appends a CriticVerdictReady event,
+ and checks that /api/missions/{id} lists it under ``verdicts``."""
mid = await manager.dispatch(prompt="critic test")
env = EventEnvelope(
@@ -222,7 +222,7 @@ def test_dispatch_with_kontrollierer_schedules_background_task(
assert r.status_code == 201
body = r.json()
assert body["started"] == "true"
- # BackgroundTask laeuft NACH dem Response — TestClient awaitet das.
+ # BackgroundTask runs AFTER the response — TestClient awaits that.
assert calls == [body["mission_id"]]
@@ -368,8 +368,8 @@ def test_kill_invokes_kontrollierer_method_when_present(
async def test_get_returns_empty_openclaw_workers_when_no_openclaw_marker(
manager: MissionManager,
) -> None:
- """Ohne step.harness=='openclaw' Marker: ``worker_snapshots`` ist [] aber
- immer im Response (Frontend kann sich darauf verlassen)."""
+ """Without a step.harness=='openclaw' marker: ``worker_snapshots`` is []
+ but always present in the response (the frontend can rely on that)."""
mid = await manager.dispatch(prompt="non-openclaw mission")
spawn_env = EventEnvelope(
diff --git a/tests/missions/api/test_missions_worker_aggregator.py b/tests/missions/api/test_missions_worker_aggregator.py
index ee75dacabf..9934fc43fe 100644
--- a/tests/missions/api/test_missions_worker_aggregator.py
+++ b/tests/missions/api/test_missions_worker_aggregator.py
@@ -1,11 +1,11 @@
-"""Unit-Tests fuer den OpenClaw-Worker-Aggregator (Phase 9 Welle 4 UI).
-
-Pure-helper-Tests ohne FastAPI / DB-IO. Deckt:
-- Detection-Heuristik (step.harness == 'openclaw' UND fallback ueber model+sid)
-- State-Dir-Konvention (matcht ``OpenClawHarness._build_spec``)
-- Reattach-Status: live -> killed -> ended (mission terminal)
-- Cost/Tokens-Aggregation aus Progress + DraftReady
-- Empty-Stream / Non-OpenClaw-Workers
+"""Unit tests for the OpenClaw worker aggregator (Phase 9 Wave 4 UI).
+
+Pure helper tests without FastAPI / DB I/O. Covers:
+- Detection heuristic (step.harness == 'openclaw' AND fallback via model+sid)
+- State-dir convention (matches ``OpenClawHarness._build_spec``)
+- Reattach status: live -> killed -> ended (mission terminal)
+- Cost/tokens aggregation from Progress + DraftReady
+- Empty stream / non-OpenClaw workers
"""
from __future__ import annotations
@@ -42,8 +42,8 @@ def test_no_workers_returns_empty():
def test_non_openclaw_worker_is_ignored():
- """Reine Claude/Codex-Worker (kein step.harness, kein /-Modell) tauchen
- nicht in der OpenClaw-Liste auf."""
+ """Pure Claude/Codex workers (no step.harness, no /-model) do not
+ show up in the OpenClaw list."""
spawn = WorkerSpawned(
worker_id="w1",
step={"task": "build foo"},
@@ -58,13 +58,13 @@ def test_non_openclaw_worker_is_ignored():
def test_step_harness_marker_is_canonical():
- """``step["harness"] == "openclaw"`` triggert die Detection auch ohne
- session_id oder /-Modell."""
+ """``step["harness"] == "openclaw"`` triggers detection even without
+ a session_id or /-model."""
spawn = WorkerSpawned(
worker_id="w1",
step={"harness": "openclaw"},
pid=42,
- cli="python", # OpenClaw kann sich noch nicht als 'openclaw' eintragen
+ cli="python", # OpenClaw cannot yet register itself as 'openclaw'
model="any",
worktree="C:/wt/agent-1",
session_id=None,
@@ -97,8 +97,8 @@ def test_session_id_plus_provider_slash_fallback_detection():
def test_state_dir_matches_openclaw_harness_convention():
- """Der state_dir-Pfad MUSS exakt der ``OpenClawHarness._build_spec``-
- Konvention folgen — sonst zeigt die UI den falschen Ort an."""
+ """The state_dir path MUST exactly follow the ``OpenClawHarness._build_spec``
+ convention — otherwise the UI shows the wrong location."""
spawn = WorkerSpawned(
worker_id="w1",
step={"harness": "openclaw"},
@@ -185,7 +185,7 @@ def test_ended_status_when_mission_terminal_without_kill():
tokens_used=100,
cost_usd=0.5,
wall_ms=1000,
- summary_de="fertig",
+ summary_de="fertig", # i18n-allow (German value under summary_de field)
summary_en="done",
)
workers = extract_worker_missions([
@@ -198,8 +198,8 @@ def test_ended_status_when_mission_terminal_without_kill():
def test_killed_wins_over_terminal():
- """Wenn Worker bereits explizit gekillt wurde, soll Mission-Terminal das
- nicht ueberschreiben (killed != ended)."""
+ """If the worker was already explicitly killed, mission-terminal must
+ not overwrite that (killed != ended)."""
spawn = WorkerSpawned(
worker_id="w1",
step={"harness": "openclaw"},
@@ -215,7 +215,7 @@ def test_killed_wins_over_terminal():
tokens_used=100,
cost_usd=0.5,
wall_ms=1000,
- summary_de="fertig",
+ summary_de="fertig", # i18n-allow (German value under summary_de field)
summary_en="done",
)
workers = extract_worker_missions([
@@ -283,7 +283,7 @@ def test_multiple_openclaw_workers_preserved_in_spawn_order():
def test_unknown_event_types_are_ignored_safely():
- """Critic-Verdicts oder andere Non-Worker-Events crashen den Aggregator nicht."""
+ """Critic verdicts or other non-worker events do not crash the aggregator."""
spawn = WorkerSpawned(
worker_id="w1",
step={"harness": "openclaw"},