Skip to content

compliance-aggregator edge-case tests, batch_check(), and multi-contract integration test - #345

Merged
Idaonoli merged 4 commits into
stellar-compliance-kit:mainfrom
lonerthefirst3-sudo:drips-loner
Sep 3, 2026
Merged

compliance-aggregator edge-case tests, batch_check(), and multi-contract integration test#345
Idaonoli merged 4 commits into
stellar-compliance-kit:mainfrom
lonerthefirst3-sudo:drips-loner

Conversation

@lonerthefirst3-sudo

Copy link
Copy Markdown

Summary

  • Add targeted unit tests for 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.
  • Add batch_check(env, addresses, allowed_jurisdictions) -> Vec<bool> to compliance-aggregator for evaluating multiple addresses in one call, guarded by a MAX_BATCH_SIZE (100) with a BatchTooLarge error, plus unit tests confirming parity with individual check_address calls.
  • Add a new integration example, examples/compliance-integration-flow, composing jurisdiction-flag, policy-engine, compliance-aggregator, multisig-admin, circuit-breaker, and audit-log in 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-token and denylist-gate. Both currently have pre-existing, unrelated corruption (duplicate function definitions — denylist-gate::add_to_denylist is defined twice, and allowlist-token has 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, and multisig-admin to the workspace members list in the root Cargo.toml — they use version.workspace = true but were missing from members, which the new example's dev-dependencies need resolved.

Test plan

  • cargo test -p compliance-aggregator
  • cargo test -p compliance-integration-flow

Closes #215
Closes #216
Closes #218

@vercel

vercel Bot commented Aug 30, 2026

Copy link
Copy Markdown

@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.

@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@Idaonoli
Idaonoli merged commit ef8fa31 into stellar-compliance-kit:main Sep 3, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants