Skip to content

Cover agent orchestration and sandbox lifecycle — the untested core #115

Description

@lucastononro

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Critical / core-value / exploitablearea:backendBackend (FastAPI)testingTest coverage / quality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions