From 2756c6bb78b5243d17e19561e2439c12c991dc40 Mon Sep 17 00:00:00 2001 From: Xubin Ren <52506698+Re-bin@users.noreply.github.com> Date: Sun, 18 Oct 2026 17:58:20 +0800 Subject: [PATCH] test(agent): capture native shutdown timeout stacks --- tests/agent/test_session_inbox_controls.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/agent/test_session_inbox_controls.py b/tests/agent/test_session_inbox_controls.py index f0532d64f..a5dfbb002 100644 --- a/tests/agent/test_session_inbox_controls.py +++ b/tests/agent/test_session_inbox_controls.py @@ -1,6 +1,7 @@ """Independent turns and internal controls retain their session inbox semantics.""" import asyncio +import faulthandler import threading from unittest.mock import AsyncMock, MagicMock @@ -705,4 +706,13 @@ async def test_queued_continuation_keeps_its_origin_after_another_chat_runs(loop assert replies == [("chat-a", "message-a")] finally: loop.stop() - await asyncio.wait_for(worker, timeout=3) + try: + await asyncio.wait_for(worker, timeout=3) + except TimeoutError: + # Native Windows CI has timed out after the routing assertions. + # Preserve the deadline and expose the shielded storage drain. + close_task = loop.sessions.state._close_task + if close_task is not None: + close_task.print_stack() + faulthandler.dump_traceback() + raise