The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(desktop): cover finalizing orphan delegation state
Nicholas Mariani719a3da11fee
diff --git a/tests/test_tui_gateway_server.py b/tests/test_tui_gateway_server.pyindex 6883916ed97..0fab3f3b67c 100644--- a/tests/test_tui_gateway_server.py+++ b/tests/test_tui_gateway_server.py@@ -3927,11 +3927,20 @@ def test_ws_orphan_reap_spares_detached_session_with_running_async_delegation(moassert len(timers) == 1with ad._records_lock:- ad._records["deleg_bg"]["status"] = "completed"+ ad._records["deleg_bg"]["status"] = "finalizing"ad._records["deleg_bg"]["interrupt_fn"] = Nonetimers.pop(0).fn()+ assert closed == []+ assert "bg-sid" in server._sessions+ assert len(timers) == 1++ with ad._records_lock:+ ad._records["deleg_bg"]["status"] = "completed"++ timers.pop(0).fn()+assert closed == [("bg-sid", "ws_orphan_reap")]finally:ad._reset_for_tests()