From 634a70bebf156201f7947a89cee1733a086adefb Mon Sep 17 00:00:00 2001 From: nesquena-hermes <[email protected]> Date: Sun, 31 May 2026 00:26:59 +0000 Subject: [PATCH] test(#3218): extend cache-eviction lock-discipline guard to the self-heal site (Opus NIT) Opus advisor noted the static guard covered 4 of the 5 identity-mismatch eviction sites; add the credential-self-heal pop/close pair so a future re-lock of that path is caught by the gate too. --- tests/test_streaming_agent_cache_lifecycle.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_streaming_agent_cache_lifecycle.py b/tests/test_streaming_agent_cache_lifecycle.py index 815b9fcba..1cf513be4 100644 --- a/tests/test_streaming_agent_cache_lifecycle.py +++ b/tests/test_streaming_agent_cache_lifecycle.py @@ -97,6 +97,7 @@ def test_identity_mismatch_cache_evictions_close_entries_outside_cache_lock(): "_stale_runtime_entry = SESSION_AGENT_CACHE.pop(session_id, None)", "_skipped_agent_migration_entry = _cached_entry", "evicted_cached_entry = _cfg.SESSION_AGENT_CACHE.pop(sid, None)", + "_evicted_entry = SESSION_AGENT_CACHE.pop(session_id, None)", ] for marker in expected_markers: assert marker in src @@ -106,6 +107,7 @@ def test_identity_mismatch_cache_evictions_close_entries_outside_cache_lock(): "_close_cached_agent_entry_at_session_boundary(session_id, _stale_runtime_entry)", "_close_cached_agent_entry_at_session_boundary(old_sid, _skipped_agent_migration_entry)", "_close_cached_agent_entry_at_session_boundary(sid, evicted_cached_entry)", + "_close_cached_agent_entry_at_session_boundary(session_id, _evicted_entry)", ] lines = src.splitlines() for marker in close_markers: