Problem
harvest() (Issue #465, merged via PR #491) has zero test coverage — there is no test_harvest.rs and no other test file references harvest.
Scope
neurowealth-vault/contracts/vault/src/lib.rs (harvest)
- New
neurowealth-vault/contracts/vault/src/tests/test_harvest.rs
Acceptance criteria
- Success path: harvest withdraws and re-supplies to
CurrentProtocol, emits HarvestEvent with correct protocol/amount_harvested.
- Rejects when vault is paused.
- Rejects when caller is not the agent.
- Rejects negative
min_out.
- Rejects when
CurrentProtocol is none (UnsupportedProtocol).
- Rejects when called before the rebalance cooldown elapses.
Problem
harvest()(Issue #465, merged via PR #491) has zero test coverage — there is notest_harvest.rsand no other test file referencesharvest.Scope
neurowealth-vault/contracts/vault/src/lib.rs(harvest)neurowealth-vault/contracts/vault/src/tests/test_harvest.rsAcceptance criteria
CurrentProtocol, emitsHarvestEventwith correctprotocol/amount_harvested.min_out.CurrentProtocolisnone(UnsupportedProtocol).