From f28248c66238d4419e11211358896ef49ee853bf Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Thu, 16 Jul 2026 09:29:13 -0700 Subject: [PATCH] test: update lock-io auto-reset assertion to the promote write-path test_auto_reset_does_not_recover_session_being_ended asserted the old end_session('session_reset') call; auto-reset now writes through promote_to_session_reset with the specific auditable reason ('suspended' for a suspended entry). Missed in the local targeted run because the file wasn't in the touched-suite list; caught by CI shard 6. --- tests/gateway/test_session_store_lock_io.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/gateway/test_session_store_lock_io.py b/tests/gateway/test_session_store_lock_io.py index 7b959f315c1..a1d1fd1e885 100644 --- a/tests/gateway/test_session_store_lock_io.py +++ b/tests/gateway/test_session_store_lock_io.py @@ -272,7 +272,13 @@ def test_auto_reset_does_not_recover_session_being_ended(tmp_path): assert entry.session_id != old.session_id assert entry.was_auto_reset is True db.reopen_session.assert_not_called() - db.end_session.assert_called_once_with(old.session_id, "session_reset") + # Auto-reset now writes through promote_to_session_reset (upgrades + # accidental agent_close/ws_orphan_reap ends) with the specific + # auditable reason — a suspended session resets as "suspended". + db.promote_to_session_reset.assert_called_once_with( + old.session_id, "suspended" + ) + db.end_session.assert_not_called() def test_legacy_and_off_lock_saves_share_one_serialization_lock(tmp_path):