From e1095a3963b4a9347043eb2eaf0026a1f965612a Mon Sep 17 00:00:00 2001 From: Claudiu Schuster Date: Fri, 18 Sep 2026 17:11:43 +0200 Subject: [PATCH] Assert the dispute window clearly inside its boundary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- scripts/test-settlement-anvil.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/test-settlement-anvil.py b/scripts/test-settlement-anvil.py index 61b4ed4..b4c7eca 100644 --- a/scripts/test-settlement-anvil.py +++ b/scripts/test-settlement-anvil.py @@ -245,7 +245,9 @@ def test_review_deadline_refuses_accept_and_leaves_dispute_path(self) -> None: def test_dispute_fallback_refuses_inside_window_and_refunds_after(self) -> None: self._deliver() self._send_ok(KEYS["contributor"], "openDispute(string)", "evidence unclear") - self._jump_to(self.AGREEMENT_DATA["dispute_deadline"]) + # a real chain never guarantees an exact block time, so assert clearly + # inside the window; the exact-boundary case lives in the model tests + self._jump_to(self.AGREEMENT_DATA["dispute_deadline"] - 60) self._send_reverts(KEYS["contributor"], "applyDisputeFallback()", naming="DisputeWindowStillOpen") # window still open self._jump_to(self.AGREEMENT_DATA["dispute_deadline"] + 1)