Summary
Test coverage varies across contracts. agent_registry has extensive snapshot-backed tests, but other contracts have minimal or no test coverage. All contracts need comprehensive unit tests and integration tests before mainnet deployment.
Priority
P1 — Required for mainnet deployment confidence.
Files to work on
smart-contracts/contracts/*/src/tests.rs
smart-contracts/tests/integration/
Requirements
- Audit test coverage for each contract using
cargo tarpaulin or similar
- Add unit tests for all public functions in:
agent_bidding: bid submission, reveal phase, winner selection, reputation weighting
agent_marketplace: listing, search, purchase, delivery confirmation
dispute_resolution: filing, evidence, voting, resolution
task_store: create, status transitions, history queries
upgrade-manager: proposal, approval, execution, rollback
- Add integration tests that exercise cross-contract interactions
- Add edge case tests: zero amounts, maximum batch sizes, unauthorized access, duplicate operations
- Add snapshot tests for event emissions
- Ensure all tests pass with
cargo test --workspace
Acceptance Criteria
Summary
Test coverage varies across contracts.
agent_registryhas extensive snapshot-backed tests, but other contracts have minimal or no test coverage. All contracts need comprehensive unit tests and integration tests before mainnet deployment.Priority
P1 — Required for mainnet deployment confidence.
Files to work on
Requirements
cargo tarpaulinor similaragent_bidding: bid submission, reveal phase, winner selection, reputation weightingagent_marketplace: listing, search, purchase, delivery confirmationdispute_resolution: filing, evidence, voting, resolutiontask_store: create, status transitions, history queriesupgrade-manager: proposal, approval, execution, rollbackcargo test --workspaceAcceptance Criteria
cargo test --workspace#[ ignore ]tests without a documented reason and tracking issue