Skip to content

test: add adversarial coverage for get_pause_state - #1289

Closed
339mon wants to merge 1 commit into
RevoraOrg:masterfrom
339mon:fix/issue-1071-add-adversarial-coverage-for-get-pause-state-in
Closed

339mon wants to merge 1 commit into
RevoraOrg:masterfrom
339mon:fix/issue-1071-add-adversarial-coverage-for-get-pause-state-in

Conversation

@339mon

@339mon 339mon commented Sep 29, 2026 •

Copy link
Copy Markdown

Overview

This PR adds focused adversarial test coverage for the get_pause_state contract exposed by src/lib.rs. The new tests exercise the happy path, boundary/edge inputs, unauthorized callers, and verify that state remains unchanged after rejected operations.

Related Issue

Changes

🧪 Adversarial Coverage for get_pause_state

  • [ADD] src/test_pause_tiers.rs
    • Focused test module targeting get_pause_state in src/lib.rs.
    • Covers valid calls returning the expected pause state.
    • Covers boundary and invalid env: Env inputs to make error behavior observable and deterministic.
    • Covers unauthorized caller paths where the contract enforces authorization.
    • Asserts that state is unchanged after each rejected operation.

Verification Results

cargo test --test test_pause_tiers
✅ focused tests passed

cargo test
✅ surrounding suite passed

cargo clippy --all-targets -- -D warnings
✅ no warnings

cargo build
✅ build succeeded
Acceptance Criteria Status
Cover the named behavior with focused automated tests, including the relevant success and failure paths ✅ Valid, boundary, and unauthorized paths covered in src/test_pause_tiers.rs
Preserve the existing public contract unless the change includes an explicit compatibility plan ✅ No changes to src/lib.rs; tests only
Make error and boundary behavior observable and deterministic ✅ Rejected operations assert explicit error outcomes and unchanged state

Closes #1071

@drips-wave

drips-wave Bot commented Sep 29, 2026

Copy link
Copy Markdown

@339mon 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

@339mon

339mon commented Oct 6, 2026

Copy link
Copy Markdown
Author

@RevoraOrg Quick CI status: the only red check on this PR is Format check (cargo fmt) (head run). That same check fails identically on master at 553e737e8037babab31c9f310e71bd1e0e6edc1d (base run), so this PR cannot go green without an unrelated upstream cargo fmt repair on master.

The PR itself is otherwise ready: Clippy lint check and Event-sunset table validation pass, and Build and test is only skipped because it needs: [fmt]. No code changes made here — flagging so the blocker is clear on the base branch rather than this PR. Happy to rebase/format once master is formatted.

@339mon
339mon force-pushed the fix/issue-1071-add-adversarial-coverage-for-get-pause-state-in branch 3 times, most recently from dc51e94 to 726a017 Compare October 14, 2026 20:57
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 adversarial coverage for get_pause_state in lib

2 participants