compliance-aggregator edge-case tests, batch_check(), and multi-contract integration test - #345
Merged
Idaonoli merged 4 commits intoSep 3, 2026
Conversation
|
@luhrhenz is attempting to deploy a commit to the idaonoli-2655's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@lonerthefirst3-sudo 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
compliance-aggregator's AND-composition edge cases: zero registered checks (documented error, not a panic), single-check parity with a direct call, and an exhaustive truth table over both checks.batch_check(env, addresses, allowed_jurisdictions) -> Vec<bool>tocompliance-aggregatorfor evaluating multiple addresses in one call, guarded by aMAX_BATCH_SIZE(100) with aBatchTooLargeerror, plus unit tests confirming parity with individualcheck_addresscalls.examples/compliance-integration-flow, composingjurisdiction-flag,policy-engine,compliance-aggregator,multisig-admin,circuit-breaker, andaudit-login a single transfer flow, covering an allowed transfer, a policy-blocked transfer, and a circuit-breaker halt (with an audit-log entry for each outcome).Note on scope for the integration test
Issue #218 asks for all nine contracts, including
allowlist-tokenanddenylist-gate. Both currently have pre-existing, unrelated corruption (duplicate function definitions —denylist-gate::add_to_denylistis defined twice, andallowlist-tokenhas a duplicated pause/unpause/is_paused block) that predates this change and is out of scope here. The new example is scoped to the seven contracts that build cleanly; it can be extended to the full nine once those two are repaired.Also added
policy-engine,compliance-aggregator, andmultisig-adminto the workspacememberslist in the rootCargo.toml— they useversion.workspace = truebut were missing frommembers, which the new example's dev-dependencies need resolved.Test plan
cargo test -p compliance-aggregatorcargo test -p compliance-integration-flowCloses #215
Closes #216
Closes #218