Skip to content

Raise test coverage on low-coverage packages (aggregate 24.7%) #3

Open

Description

@scttfrdmn

Problem

spawn's aggregate coverage is 24.7%, below the 60% minimum / 80% target (CLAUDE.md). Many pkg/ packages are well-tested (observability 100%, tagprefix 100%, storage 97.1%, security 93.1%, instance 92.6%, infrastructure 91.7%, availability 89.9%, cost 88%, compliance 86.8%), so the aggregate is dragged down by a set of low-coverage packages.

Lowest-coverage packages (priority order)

Package Coverage
cmd/ (+ cmd/orchestrator, cmd/spored) ~0–9.7%
pkg/agent 9.2%
pkg/provider 11.9%
pkg/aws 13.6%
pkg/dns 15.3%
pkg/streaming 19.5%
pkg/pluginruntime 23.5%
pkg/plugin 34.4%
pkg/config 36.9%
pkg/platform 41.1%
pkg/slurm 41.5%
pkg/sweep 43.2%
zero-test pkgs pkg/sms, pkg/wizard, pkg/progress, observability/tracing/exporters

Approach

  • pkg/aws (13.6%) — highest-leverage: it's the core EC2 client. Add interface seams + table-driven tests; substrate-backed tests like truffle's pkg/aws already uses.
  • pkg/provider, pkg/agent, pkg/dns — inject fakes, test error paths.
  • cmd/ — at minimum cover flag parsing/validation and the command→pkg wiring.
  • Add tests for the zero-test packages (sms, wizard).

Acceptance

  • Aggregate spawn coverage rises meaningfully toward 60%.
  • The CI coverage ratchet floor (added separately) is raised as packages improve.

From a coverage audit across all spore.host projects.

Activity

  1. added
    enhancement
    testing
    on May 30, 2026
  2. scttfrdmn commented on May 30, 2026

    @scttfrdmn
    ContributorAuthor

    Progress: 24.7% → 26.5%

    Three PRs landed this round, each with per-package gains:

    CI ratchet floor walked 22 → 24 → 25 → 26.

    Per-package now (low-coverage targets remaining):

    Package Coverage
    pkg/agent 9.2%
    pkg/pluginruntime 23.5%
    pkg/provider 24.0%
    pkg/aws 31.4%
    pkg/dns 39.5%
    pkg/platform 41.1%
    pkg/slurm 41.5%
    pkg/sweep 43.2%
    pkg/streaming 60.4%
    cmd ~9.7% (RunE bodies need execution tests)

    The aggregate moves slowly because spawn is a 40+ package module, but the targeted packages are climbing well. Next highest-leverage: pkg/agent (large, mostly metric/proc helpers) and cmd (cobra execution tests).

  3. added this to the Later milestone on Oct 19, 2026
  4. modified the milestones: Later, Hardening on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementtesting

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions