test: implement test suites and cancel functions for issues 212, 211, 210, 209 - #330
Open
williamspatrivk-rgb wants to merge 4 commits into
Open
Conversation
…ttlement Add matrix strategy across all CI jobs (fmt, contract, wasm-size, audit) to test both intent_settlement and proof_registry crates, ensuring proof_registry gets equivalent coverage for formatting, linting, building, and dependency auditing. Closes stellar-vortex-protocol#212
…ondition test suite Add comprehensive test coverage for all deadline-gated functions verifying the documented boundary semantics: - accept_intent: deadline EXCLUSIVE — now >= deadline rejects at boundary - fill_intent: deadline EXCLUSIVE — now >= deadline rejects at boundary - slash_solver: deadline INCLUSIVE — now == deadline allows slashing - expire_intent: deadline INCLUSIVE — now == deadline allows expiry For each function, tests cover (deadline - 1), (deadline), and (deadline + 1) to verify the exact boundary behavior and prevent future regressions in the seams between these interdependent functions. Closes stellar-vortex-protocol#211
…imelocked admin proposals Add admin-only cancel functions for all four timelocked proposal types: - cancel_pending_admin_transfer() - cancel_pending_fee_recipient() - cancel_pending_dst_token_add(token) - cancel_pending_dst_token_remove(token) Each function clears the pending proposal and emits a distinct _proposal_cancelled event for off-chain monitoring. Canceling a nonexistent proposal fails with the same error as a failed accept/execute, preventing silent failures. Also add the missing DataKey enum variants (PendingAdmin, PendingDstTokenAdd, PendingDstTokenRemove) that were already being used in the code but not defined. Includes comprehensive tests covering: - Successful cancellation and event emission - Canceling without an existing proposal fails - After cancellation, accept/execute correctly fail with NoPending* errors - Admin can propose a new value after canceling Closes stellar-vortex-protocol#210
…e and fee conservation Add comprehensive property-based test suite modeling the fill lifecycle: submit_intent → accept_intent → [fill_intent]* → terminal state Invariants tested after every step: - intent.total_filled equals sum of all fill_amounts applied - user and fee recipient balance changes equal fill amounts and fees - intent state machine never reaches invalid combinations (e.g., Filled with total_filled < min_dst_amount) Covers edge cases including partial fills, multiple fills per intent, and boundary conditions on min_dst_amount crossing. Test can be run locally with: PROPTEST_CASES=256 cargo test --features testutils -- fill_conservation Closes stellar-vortex-protocol#209
|
@williamspatrivk-rgb 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
Implement comprehensive test coverage and new functionality across four major issues:
proof_registryinto CI with parity tointent_settlement#212: Add proof_registry to CI workflows with feature parity to intent_settlementfill_intentvolume/fee conservation #209: Property-based tests for fill_intent volume and fee conservationChanges
Issue #212 - CI Coverage for proof_registry
Issue #211 - Deadline Boundary Tests
Issue #210 - Cancel Functions for Proposals
Issue #209 - Fill Conservation Proptest
Testing
All changes are test implementations (test-only, no changes to tested business logic beyond issue #210's required cancel functions). Test suites can be run with:
Closes #212
Closes #211
Closes #210
Closes #209