Problem. The two largest, most critical modules have almost no direct tests: services/agent/runner.py (1132 lines — subagent spawn, task lifecycle, orchestration) and services/sandbox.py (498 lines — Modal run_code, image build, artifact/metric logging). Only runner._drive_provider is unit-tested; there is no test_sandbox.py or test_runner.py, and services/agent/tasks.py is uncovered.
Why it matters. A regression in spawn/cancellation or sandbox teardown would surface only in production.
Suggested fix. Add unit tests for the orchestration state machine (spawn → run → complete/error/cancel) with the Modal boundary faked, and for sandbox.run_code success/timeout/exception paths asserting span attributes.
Problem. The two largest, most critical modules have almost no direct tests:
services/agent/runner.py(1132 lines — subagent spawn, task lifecycle, orchestration) andservices/sandbox.py(498 lines — Modalrun_code, image build, artifact/metric logging). Onlyrunner._drive_provideris unit-tested; there is notest_sandbox.pyortest_runner.py, andservices/agent/tasks.pyis uncovered.Why it matters. A regression in spawn/cancellation or sandbox teardown would surface only in production.
Suggested fix. Add unit tests for the orchestration state machine (spawn → run → complete/error/cancel) with the Modal boundary faked, and for
sandbox.run_codesuccess/timeout/exception paths asserting span attributes.