Description
The audit identified 12 src/ modules with NO integration test coverage in tests/:
src/acceptable_use/ — workload classification and filtering
src/agent/ — donor agent lifecycle, identity, mesh LLM
src/cli/ — CLI subcommands
src/credits/ — NCU caliber classes, credit computation
src/data_plane/ — CID store, erasure coding, staging
src/ledger/ — CRDT ledger, transparency anchoring
src/network/ — P2P discovery, gossip, NAT, TLS, rate limiting
src/preemption/ — sovereignty events, idle detection, supervisor
src/registry/ — approved artifact registry, release channels
src/scheduler/ — job/task state machines, broker, coordinator
src/telemetry/ — OpenTelemetry, PII redaction
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
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
Description
The audit identified 12
src/modules with NO integration test coverage intests/:src/acceptable_use/— workload classification and filteringsrc/agent/— donor agent lifecycle, identity, mesh LLMsrc/cli/— CLI subcommandssrc/credits/— NCU caliber classes, credit computationsrc/data_plane/— CID store, erasure coding, stagingsrc/ledger/— CRDT ledger, transparency anchoringsrc/network/— P2P discovery, gossip, NAT, TLS, rate limitingsrc/preemption/— sovereignty events, idle detection, supervisorsrc/registry/— approved artifact registry, release channelssrc/scheduler/— job/task state machines, broker, coordinatorsrc/telemetry/— OpenTelemetry, PII redactionsrc/verification/— attestation, trust score, quorumSome 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
Success Criteria
src/module has at least one corresponding integration testTesting (Principle V)