Overview
calculate_total_maintenance_cost, calculate_asset_downtime, and get_asset_health_score (contracts/asset-maintenance/src/lib.rs) are exactly the kind of aggregate/derived-value functions where the empty-input case (an asset with zero maintenance records) is easy to get wrong (divide-by-zero in a health-score average, an unhandled empty-vec fold) — worth dedicated tests for a brand-new asset with no history at all, distinct from the general edge cases in [SC-66]/[SC-67]/[SC-68].
Tasks
Acceptance Criteria
Notes for Contributors
Requires Rust + Soroban. Workspace: contracts/ (soroban-sdk 23, members: assetsup, contrib, multisig-wallet, multisig-transfer, asset-maintenance). Run cargo test --all, cargo fmt --all -- --check, and cargo clippy --all-targets --all-features -- -D warnings before opening a PR — CI enforces all three. Comment below to be assigned.
Overview
calculate_total_maintenance_cost,calculate_asset_downtime, andget_asset_health_score(contracts/asset-maintenance/src/lib.rs) are exactly the kind of aggregate/derived-value functions where the empty-input case (an asset with zero maintenance records) is easy to get wrong (divide-by-zero in a health-score average, an unhandled empty-vec fold) — worth dedicated tests for a brand-new asset with no history at all, distinct from the general edge cases in [SC-66]/[SC-67]/[SC-68].Tasks
Acceptance Criteria
Notes for Contributors
Requires Rust + Soroban. Workspace:
contracts/(soroban-sdk 23, members: assetsup, contrib, multisig-wallet, multisig-transfer, asset-maintenance). Runcargo test --all,cargo fmt --all -- --check, andcargo clippy --all-targets --all-features -- -D warningsbefore opening a PR — CI enforces all three. Comment below to be assigned.