Skip to content

Assert the dispute window clearly inside its boundary - #113

Merged
ClaudiuSchuster merged 1 commit into
mainfrom
oss-oo/anvil-time-margin
Sep 18, 2026
Merged

ClaudiuSchuster merged 1 commit into
mainfrom
oss-oo/anvil-time-margin

Conversation

@ClaudiuSchuster

Copy link
Copy Markdown
Member

Fixes the flaky repository-baseline failure on main (fc8c6f6): the on-chain settlement exercise jumped to exactly the dispute deadline and expected applyDisputeFallback to revert with DisputeWindowStillOpen — but the follow-up transaction is mined in a block whose timestamp is the chain's own choice, and anvil can land it one second past the boundary, which flips the expectation. Real chains never guarantee exact block times; the suite now asserts clearly inside the window (deadline minus a minute), while the exact-boundary semantics remain covered by the deterministic Python model test. Verified 4× green locally (the failure reproduced on main's CI).

The on-chain fallback test jumped to exactly the dispute deadline and
expected the still-open revert, but a mined block's timestamp is the
chain's own — anvil can land the follow-up transaction one second past
the boundary, which flips the expectation. Assert clearly inside the
window instead (deadline minus a minute); the exact-boundary semantics
stay covered by the deterministic Python model. Fixes the flaky
repository-baseline failure on main.
@ClaudiuSchuster
ClaudiuSchuster merged commit 334b1c2 into main Sep 18, 2026
5 checks passed
@ClaudiuSchuster
ClaudiuSchuster deleted the oss-oo/anvil-time-margin branch September 18, 2026 15:19
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.

1 participant