From 9667236ccbee9fb139431b41ab9a43b84818029e Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Sun, 2 Aug 2026 11:46:23 -0700 Subject: [PATCH] test(tui_gateway): accept predicate kwarg in _close_session_by_id stub The LRU-cap test in tests/tui_gateway/test_protocol.py stubs _close_session_by_id with a two-arg lambda; the reaper now passes a revalidation predicate. Widen the stub signature. --- tests/tui_gateway/test_protocol.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/tui_gateway/test_protocol.py b/tests/tui_gateway/test_protocol.py index 00678f4b79b35..37efc79918a08 100644 --- a/tests/tui_gateway/test_protocol.py +++ b/tests/tui_gateway/test_protocol.py @@ -356,7 +356,9 @@ def test_enforce_session_cap_evicts_oldest_detached_only(server, monkeypatch): monkeypatch.setattr(server, "_load_cfg", lambda: {"max_live_sessions": 2}) evicted: list[str] = [] monkeypatch.setattr( - server, "_close_session_by_id", lambda sid, end_reason=None: evicted.append(sid) + server, + "_close_session_by_id", + lambda sid, end_reason=None, predicate=None: evicted.append(sid), ) def _ready() -> threading.Event: