Skip to content

Add subscription contract property invariant tests#441

Open
TUPM96 wants to merge 1 commit into
Smartdevs17:mainfrom
TUPM96:codex/contract-property-invariants-402
Open

Add subscription contract property invariant tests#441
TUPM96 wants to merge 1 commit into
Smartdevs17:mainfrom
TUPM96:codex/contract-property-invariants-402

Conversation

@TUPM96
Copy link
Copy Markdown

@TUPM96 TUPM96 commented May 25, 2026

Resolves #402

Summary:

  • Add a real Soroban integration property/invariant test target for the subscription contract using the storage contract and generated clients.
  • Cover plan-count consistency, repeated charge accounting, lifecycle state transitions, refund bounds, and subscriber/accounting invariants.
  • Update the invariant workflow to run the registered package-level property_invariants target with CI-controlled proptest cases and shrink iterations.
  • Apply rustfmt to existing contract files so the workflow format check passes cleanly.

Verification:

  • cargo fmt --check
  • PROPTEST_CASES=16 PROPTEST_MAX_SHRINK_ITERS=1000 cargo test -p subtrackr-subscription --test property_invariants -- --nocapture
  • cargo test --workspace --lib --verbose
  • git diff --check

Copilot AI review requested due to automatic review settings May 25, 2026 10:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor contract Tests to use property-based and invariant testing

2 participants