Skip to content

Umbrella: strengthen unit test coverage across AgentCube components #88

@hzxuzhonghu

Description

@hzxuzhonghu

Summary

  • Expand unit test coverage across AgentCube control plane, data plane, and tooling.
  • Establish baseline coverage targets (>=70% for Go packages, smoke coverage for Python CLI/SDK) with CI reporting.

Motivation

  • Protect the rapidly evolving proposal codebase from regressions as we bring components online.
  • Build confidence for future contributors and reviewers by providing fast feedback loops.

Goals

  • Capture current coverage numbers and document the biggest gaps.
  • Add focused unit tests for critical behaviors across the components listed below.
  • Wire coverage reporting into CI (Go and Python) so we can track improvements over time.

Workstreams

Go control plane & services

  • pkg/agentd: cover runtime registration, lifecycle orchestration, and error paths.
  • pkg/picod: exercise execution pipeline, auth helpers, and filesystem utilities.
  • pkg/router: validate session manager, HTTP/WebSocket handlers, and config parsing.
  • pkg/workloadmanager: focus on sandbox/code interpreter controllers, auth/JWT helpers, and workload builder.
  • pkg/store: ensure interface contract tests plus Redis/Valkey adapters (consider fake clients or testcontainers).
  • pkg/common/types & shared utilities: add serialization/validation tests where missing.

Binaries & entrypoints

  • cmd/agentd, cmd/router, cmd/workload-manager, cmd/picod: ensure flag parsing and wiring logic have basic coverage (e.g., using in-memory config).

CLI & Python SDK

  • cli/agentcube: add pytest coverage for command behaviors and error handling.
  • sdk-python: cover agentcube clients/utilities with mocked HTTP interactions.

Tooling & CI

  • Update Makefile/CI to run go test ./... -coverprofile and surface coverage summary.
  • Add Python test job (pytest) with coverage report for CLI/SDK.
  • Document how to run the test suites locally (README or docs/devguide) and set initial coverage targets.

Exit Criteria

  • Checklist above is tackled via focused follow-up issues/PRs linked back here.
  • Coverage targets and CI jobs are in place, with documentation updated accordingly.

Please link follow-up issues/PRs to this umbrella to track progress.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions