Skip to content

chore(contracts): add cargo test --workspace and include evenue_pool + settlement ( #259) - #285

Merged
greatest0fallt1me merged 2 commits into
CalloraOrg:mainfrom
felixkamau:ci/test-workspace-all-members
Apr 23, 2026
Merged

chore(contracts): add cargo test --workspace and include evenue_pool + settlement ( #259)#285
greatest0fallt1me merged 2 commits into
CalloraOrg:mainfrom
felixkamau:ci/test-workspace-all-members

Conversation

@felixkamau

@felixkamau felixkamau commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Closes #259


chore(contracts): add cargo test --workspace and include revenue_pool + settlement (#259)

What

Makes CI explicitly test all three workspace crates (vault, settlement, revenue_pool) with cargo test --workspace, and fixes several bugs uncovered in the process.

Changes

CI

  • cargo testcargo test --workspace in .github/workflows/ci.yml to explicitly exercise every crate on every push/PR.

Bug Fixes

Crate Fix Severity
vault Remove duplicate get_max_deduct function (caused compilation error) 🔴 Build-breaking
vault Add missing require_not_paused guard to batch_deduct 🟠 Security — batch deductions could bypass the pause circuit breaker
settlement Remove shadowed unused variable in test helper (-D warnings failure) 🟡 CI-breaking
vault Fix set_allowed_depositor call with wrong type (&Address&Option<Address>) 🟡 CI-breaking
vault Fix fuzz tests not accounting for paused state during deduct/batch_deduct ops 🟡 Test correctness
vault Fix fuzz deposit op panicking when random amount exceeds minted USDC reserve 🟡 Test correctness

Docs

  • README.md — test commands updated to cargo test --workspace
  • SECURITY.md — checked off testing coverage items now verified across all crates
  • tarpaulin.toml — updated stale comment ("currently just callora-vault" → all 3 crates)

Security Notes

batch_deduct was missing require_not_paused.
Both deposit and deduct enforce the pause guard, but batch_deduct did not — allowing an authorized caller to move funds during an emergency pause. This PR adds the guard, making all fund-movement functions consistent.

Test Output

callora-revenue-pool  — all tests passed
callora-settlement    — all tests passed
callora-vault         — all tests passed (incl. fuzz suite)

Total: 148 passed, 0 failed
Check Result
cargo fmt --all -- --check ✅ Clean
cargo clippy --all-targets --all-features -- -D warnings ✅ 0 warnings
cargo test --workspace ✅ 148/148

…+ settlement

- ci: use cargo test --workspace in CI to explicitly test all crates
- fix(vault): remove duplicate get_max_deduct function (compilation error)
- fix(vault): add 
equire_not_paused guard to �atch_deduct (security)
- fix(tests): resolve unused variable, type mismatch, and fuzz pause gaps
- docs: update README, SECURITY.md, tarpaulin.toml for workspace coverage

All 148 tests pass across vault, settlement, and revenue_pool.
cargo fmt, clippy (-D warnings), and cargo test --workspace clean.
@drips-wave

drips-wave Bot commented Apr 23, 2026

Copy link
Copy Markdown

@felixkamau Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@greatest0fallt1me
greatest0fallt1me merged commit a8e11da into CalloraOrg:main Apr 23, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: add cargo test --workspace and include revenue_pool + settlement

2 participants