test(dispute): add timeline ordering and monotonicity property tests#1286
Merged
Baskarayelu merged 1 commit intoJun 2, 2026
Merged
Conversation
|
@Agbasimere 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.
Description
Adds a doc-backed dispute timeline property-test harness and tightens the dispute state machine so timeline ordering, timestamp monotonicity, and terminal resolution are enforced consistently.
Closes #1210
What changed
docs/dispute-timeline-invariants.mdas the executable source of truth for dispute timeline orderingquicklendx-contracts/src/test_dispute_timeline_props.rsUnderReviewtimestamp for disputes so the timeline can be strictly monotoniccreateonly fromNoneupdate_dispute_evidenceonly whileDisputedput_dispute_under_reviewonly fromDisputedresolve_disputeonly fromUnderReviewget_dispute_timelinethrough the contract surfaceInvariants covered
Opened -> UnderReview -> Resolvedis the only visible timeline orderResolvedis terminal and cannot be re-reviewed, re-resolved, or have evidence rewrittenTesting
Validated locally with:
cargo check --libcargo check --testsI also ran
cargo test test_dispute_timeline_props --libfar enough to confirm the new tests themselves passed:test_dispute_timeline_props_doc_synctest_dispute_timeline_props_resolve_is_terminaltest_dispute_timeline_props_randomized_sequencesThe full command could not complete cleanly in this Windows GNU environment because linking/artifact generation eventually ran into local disk-space exhaustion in
quicklendx-contracts/target.Notes
quicklendx-contracts/tests/backup_retention_validation.rsquicklendx-contracts/tests/invoice_lifecycle_e2e.rswere left untouched and are not part of this commit