Skip to content

Test/comprehensive coverage - #168

Open
Jambox11 wants to merge 4 commits into
stellar-vortex-protocol:mainfrom
Jambox11:test/comprehensive-coverage
Open

Test/comprehensive coverage#168
Jambox11 wants to merge 4 commits into
stellar-vortex-protocol:mainfrom
Jambox11:test/comprehensive-coverage

Conversation

@Jambox11

Copy link
Copy Markdown

Summary

Adds comprehensive test coverage for critical contract behaviors: two-solver race conditions on intent acceptance, boundary conditions for bond withdrawals, storage TTL extension near archival
thresholds, and complete error variant reachability.

Changes

#70 — Two-solver race on same intent_id

  • Added two_solver_race_on_same_intent_id test
  • Confirms first solver accepts successfully, second fails with IntentNotOpen
  • Verifies losing solver's active_intents counter is unaffected

#69 — withdraw_bond boundary test

  • Added withdraw_bond_leaving_exactly_min_bond_succeeds test
  • Added withdraw_bond_below_exact_min_bond_fails test
  • Confirms withdrawal leaving exactly MIN_BOND is allowed
  • Confirms withdrawal leaving less than MIN_BOND is rejected

#68 — Storage TTL extension tests

  • Added persistent_intent_ttl_extended_near_threshold test
  • Added persistent_solver_ttl_extended_near_threshold test
  • Added instance_ttl_extended_near_threshold test
  • Advances ledger close to thresholds and confirms TTLs are extended to expected values

#67 — Error variant coverage

  • Added intent_already_filled_error_when_fill_called_twice test
  • Added not_initialized_error_when_accessing_admin_before_init test
  • Added solver_inactive_error_when_accepting_after_slash_deactivation test
  • Added fill_window_expired_error_when_slash_called_too_early test
  • Confirms all 21 Error variants are reachable and correctly triggered

Notes

  • All tests use existing Ctx fixture and test utilities
  • No dependencies added
  • Tests follow established patterns in the test suite

Closes #70, Closes #69, Closes #68, Closes #67

@drips-wave

drips-wave Bot commented Jul 27, 2026

Copy link
Copy Markdown

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

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

Labels

None yet

Projects

None yet

1 participant