Skip to content

test: resolve fuzz (#826) - #1049

Merged
greatest0fallt1me merged 1 commit into
Predictify-org:masterfrom
Michealshodipo56:task/fuzz-resolve
Jul 27, 2026
Merged

test: resolve fuzz (#826)#1049
greatest0fallt1me merged 1 commit into
Predictify-org:masterfrom
Michealshodipo56:task/fuzz-resolve

Conversation

@Michealshodipo56

Copy link
Copy Markdown

Summary

Add proptest-based fuzz target for MarketResolutionManager::resolve_market() — the automated resolution path that requires an oracle result already set on the market.

Changes

  • src/tests/resolve_market_fuzz.rs (new): Proptest-based fuzz tests covering:
    • Oracle result edge cases (None, empty, invalid, long strings)
    • Market state transitions (Active fails, Ended succeeds, already Resolved fails)
    • Vote distributions (no votes, single voter, skewed, balanced, ties)
    • Extreme stake values (i128::MIN, i128::MAX via raw bytes)
    • Idempotency (at most one resolve succeeds)
    • Min pool size enforcement
    • Resolution timeout behavior
  • fuzz/targets/resolve.rs (new): Cargo-fuzz reference file documenting the proptest target
  • fuzz/Cargo.toml: Register new resolve binary
  • src/tests/mod.rs: Register new module

Tests

Run with:

cargo test -p predictify-hybrid -- resolve_market_fuzz

Closes #826

Add proptest-based fuzz target for MarketResolutionManager::resolve_market() covering oracle result edge cases, market state transitions, idempotency, extreme values, min pool size, and tie outcomes.

Closes Predictify-org#826
@drips-wave

drips-wave Bot commented Jul 27, 2026

Copy link
Copy Markdown

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

@greatest0fallt1me
greatest0fallt1me merged commit fd27b33 into Predictify-org:master Jul 27, 2026
0 of 2 checks passed
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.

Add fuzz target for resolve_market

2 participants