feat(policy-engine): add integration test chaining all three primitiv… - #339
Merged
Idaonoli merged 2 commits intoSep 3, 2026
Conversation
…es (stellar-compliance-kit#233) - Add CheckKind::Allowlist variant (with AllowlistCheck struct) to policy-engine, alongside the existing Denylist and Jurisdiction variants - Fix CheckKind enum variants to use contracttype-compatible tuple struct form (#[contracttype] does not support named struct fields in enum variants) - Add AllowlistCheckInterface + AllowlistCheckClient for cross-contract calls to allowlist-token.is_allowed() - Add allowlist-token as a dev-dependency to policy-engine - Add policy-engine and rwa-token to workspace Cargo.toml members - Write contracts/policy-engine/src/integration_test.rs with 5 tests: - test_all_three_pass: all checks clear → evaluate returns true - test_fail_allowlist_check: from not allowlisted → false (AND semantics) - test_fail_denylist_check: from denylisted → false (AND semantics) - test_fail_jurisdiction_check: to in forbidden jurisdiction → false (AND) - test_or_semantics_any_check_passes: denylist fails but allowlist passes → true (OR) - Fix pre-existing compile errors in denylist-gate, jurisdiction-flag, and allowlist-token source files (broken by conflicting PR merges on main) - Update existing policy-engine/src/test.rs to use new CheckKind tuple syntax All 9 tests pass (4 existing + 5 new integration tests).
|
@Peace-001 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! 🚀 |
|
@Peace-001 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. |
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.
…es (#233)
All 9 tests pass (4 existing + 5 new integration tests).
Closes
Closes #
What changed and why
Checklist
cargo test --workspacepasses locallycargo clippy --workspace --all-targets -- -D warningspasses locallyCloses Add an integration test: policy-engine chaining jurisdiction-flag, denylist-gate, and allowlist-token #233