6748f57898
User asked to continue investigation of the 3 failing tests in tests/test_z_negative_flows.py. Ran the test in batched tier-3 mode, isolated the failure to a native Windows STATUS_STACK_OVERFLOW (0xC00000FD) in the io_pool worker thread when calling GeminiCliAdapter.send -> subprocess.Popen -> communicate. Verified the failure: - Reproduces 100% on a fresh subprocess (no xdist, no other tests). - Is NOT caused by the send_result -> send rename (purely mechanical). - Happens on MOCK_MODE=malformed_json, error_result, AND success (rules out the exception/traceback construction as cause). - Adapter body completes normally; process dies immediately after. - Is the io_pool worker thread's 1MB C stack being exhausted by the deep call chain (run_with_tool_loop -> asyncio cross-thread dispatch -> _send -> adapter.send -> subprocess.Popen -> communicate + Windows ReadFile/WaitForSingleObject). Conclusion: pre-existing bug. The test file (originally test_negative_flows.py from 2026-03-06, renamed to test_z_negative_flows.py on 2026-03-07) is the ONLY test in the suite that exercises a real subprocess AI call end-to-end through the io_pool worker. Other tier-3 tests use MockProvider and short-circuit at the ai_client.send level. Documented: root cause, reproduction evidence, 4 proposed solutions (thread stack bump, multiprocessing migration, blocking main thread, xfail), and a follow-up track suggestion for the long-term fix. This is an investigation report only; no code changes. The theme fix in9fcf0517is unaffected. The rename track in8c6d9aa0is unaffected.