test(grok): mypy-clean the reaper watchdog + interactive spawn tests

The CI mypy scope (roboco/ tests/) flagged test-only typing issues my per-file
runs missed: direct method assignment (orch._remove_container = AsyncMock())
trips [method-assign], and a module-level dict[str,str] is invariant against
the dict[str, str|None] the run-spec expects.

- Use monkeypatch.setattr for _remove_container in the watchdog tests.
- Annotate the shared _HOSTS as dict[str, str | None].

Production code unchanged; mypy roboco/ tests/ is green.
This commit is contained in:
Renn F
2026-06-18 12:38:23 +02:00
parent f1981ca163
commit 7681c47370
2 changed files with 19 additions and 10 deletions
@@ -15,7 +15,7 @@ from roboco.runtime.orchestrator import (
_SecretaryRunSpec,
)
_HOSTS = {
_HOSTS: dict[str, str | None] = {
"claude": "/h/.claude",
"prompt": "/h/p.md",
"workspaces": "/h/ws",