cc234b1b83
Per user question about whether execution is properly isolated between AppController and gui_2.py main thread. Verified by reading the architecture contract (docs/guide_architecture.md lines 12, 884-890) and the two click handlers in question: - _handle_generate_send (btn_gen_send): self.submit_io(worker) - _cb_plan_epic (btn_mma_plan_epic): self.submit_io(_bg_task) BOTH click handlers return immediately after submitting work. The heavy AI call (ai_client.send -> subprocess.Popen -> process.communicate) runs on the io_pool worker thread. The execution isolation between AppController and gui_2.py's main render thread IS being followed. The crash (STATUS_STACK_OVERFLOW, 0xC00000FD) is NOT in the click handler chain. It IS in the main thread's imgui-bundle render loop. The render loop runs concurrently with the io_pool worker's subprocess operations. imgui-bundle's per-frame C++ draw code can exceed the main thread's 1.94 MB stack (verified via kernel32.GetCurrentThreadStackLimits). What aspect of negative_flows triggers this: the error-response render path. MOCK_MODE=malformed_json causes the adapter to raise, which triggers _handle_request_event to emit a 'response' event with status='error'. The render loop draws this error response on the next frame, exhausting the main thread's stack. test_visual_orchestration.py uses the same provider setup but does NOT set MOCK_MODE, so the mock defaults to 'success' mode, the adapter returns normally, no error event, no crash. Empirically PASSED in 11.01s. The architecture's render-loop contract assumes imgui-bundle's C stack usage is bounded. It's not. The architecture has no enforcement mechanism (no stack guard, no per-frame stack measurement, no graceful degradation). Next step (post-compact): capture Windows crash dump via procdump to identify the specific imgui-bundle draw call.