Skip to content

Integration test coverage: 12 untested src/ modules #36

@jeremymanning

Description

@jeremymanning

Description

The audit identified 12 src/ modules with NO integration test coverage in tests/:

  1. src/acceptable_use/ — workload classification and filtering
  2. src/agent/ — donor agent lifecycle, identity, mesh LLM
  3. src/cli/ — CLI subcommands
  4. src/credits/ — NCU caliber classes, credit computation
  5. src/data_plane/ — CID store, erasure coding, staging
  6. src/ledger/ — CRDT ledger, transparency anchoring
  7. src/network/ — P2P discovery, gossip, NAT, TLS, rate limiting
  8. src/preemption/ — sovereignty events, idle detection, supervisor
  9. src/registry/ — approved artifact registry, release channels
  10. src/scheduler/ — job/task state machines, broker, coordinator
  11. src/telemetry/ — OpenTelemetry, PII redaction
  12. src/verification/ — attestation, trust score, quorum

Some modules have inline #[cfg(test)] unit tests, but no integration-level coverage.

Additionally, 7 existing test files have only 1-2 tests each and 3 empty test directories exist (tests/contract/, tests/integration/, tests/unit/).

Requirements

  • Each module gets at least one integration test that exercises the module through its public API
  • Tests use real inputs and real outputs (Principle V — no mocks)
  • Empty directories are either populated or removed
  • Minimal test files are expanded to cover edge cases

Success Criteria

  • Every src/ module has at least one corresponding integration test
  • Empty test directories removed or populated
  • Each test file has at least 3 meaningful tests
  • All tests pass on CI (Linux, macOS, Windows where applicable)
  • Test count increases by at least 50 from current 489+

Testing (Principle V)

  • Agent lifecycle: real enrollment → heartbeat → pause → withdraw
  • Credits: real NCU computation with known hardware profiles
  • Data plane: real CID store operations, real erasure encode/decode
  • Network: real mDNS discovery on LAN, real STUN queries
  • Preemption: real keyboard event simulation → SIGSTOP timing
  • Scheduler: real job submission → matching → dispatch → result

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions