Skip to content

test(optimistic-governance): add challenge-window boundary and storage cleanup tests#882

Merged
edehvictor merged 1 commit into
edehvictor:mainfrom
Chucks1093:feat/issue-872-873-874-875
Jun 27, 2026
Merged

test(optimistic-governance): add challenge-window boundary and storage cleanup tests#882
edehvictor merged 1 commit into
edehvictor:mainfrom
Chucks1093:feat/issue-872-873-874-875

Conversation

@Chucks1093

Copy link
Copy Markdown
Contributor

Closes #875
Closes #874
Closes #873
Closes #872

What was done

Added deterministic test coverage for the optimistic_governance contract's challenge-window boundary behaviour and post-resolution storage state (issue #875).

Challenge-window boundary tests

  • test_execute_at_exact_boundary — confirms execution is accepted when timestamp == execution_time (inclusive lower bound).
  • test_execute_one_second_before_boundary_fails — verifies ChallengeWindowActive is returned when timestamp == execution_time - 1.
  • test_dispute_at_last_second_inside_window — confirms a dispute submitted at execution_time - 1 is accepted.
  • test_dispute_at_exact_boundary_fails — verifies ChallengeWindowExpired is returned when timestamp == execution_time.

Post-resolution storage cleanup tests

  • test_proposal_record_persists_after_execution — the proposal record remains readable with Executed status after execution; nothing is deleted.
  • test_double_execute_fails — re-executing an already-executed proposal is correctly rejected.
  • test_expired_uncleared_proposal_still_executable — a proposal that has been pending long past its execution time (no phantom cleanup) can still be executed deterministically.

@Chucks1093 Chucks1093 requested a review from edehvictor as a code owner June 27, 2026 10:03
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Chucks1093 is attempting to deploy a commit to the Edeh Victor's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

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

@edehvictor edehvictor left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Nice implementation!

@edehvictor edehvictor merged commit 7ac7637 into edehvictor:main Jun 27, 2026
8 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment