From 050e27de8dd08f58a0e53080add0b7c966c23db7 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 26 Oct 2026 16:30:14 +0000 Subject: [PATCH] test: keep the concurrent-session entry inside the 30-day state TTL The test saved the other session's entry with a fixed date. save_hook_state drops entries older than 30 days, so from 2026-10-10 the entry was pruned and the test failed regardless of the change under test. Stamp it with the current time instead. Co-authored-by: hassieb.pakzad --- tests/integration/test_state_lock_contention.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/test_state_lock_contention.py b/tests/integration/test_state_lock_contention.py index 899105b..0bb49c3 100644 --- a/tests/integration/test_state_lock_contention.py +++ b/tests/integration/test_state_lock_contention.py @@ -111,7 +111,7 @@ def test_entry_of_another_session_survives_the_emit( def other_session_saves() -> None: with hook_module.FileLock(hook_module.LOCK_FILE): state = hook_module.load_hook_state() - state["other-session-key"] = {"offset": 42, "updated": "2026-09-10T00:00:00+00:00"} + state["other-session-key"] = {"offset": 42, "updated": datetime.now(timezone.utc).isoformat()} hook_module.save_hook_state(state) _during_emit(hook_module, monkeypatch, other_session_saves)