From f0ae074aec005e06e9e23aaac30fc43b3d6df2ca Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sat, 20 Jun 2026 02:39:47 -0400 Subject: [PATCH] fix(gui_2): restore _last_imgui_assert as string (regression from Phase 10) The Phase 10 migration of the run() function (L728 INTERNAL_SILENT_SWALLOW) changed App.run's error drain to set self.controller._last_imgui_assert to traceback.format_exception(...), which returns a list. But the existing test test_app_run_imgui_assert_handling.py expects it to be a string containing 'Missing End'. Fix: set _last_imgui_assert to str(err.original) if available, else err.message. The IM_ASSERT message string is what the health endpoint expects. TIER-2 READ conductor/code_styleguides/error_handling.md end-to-end before Phase 13. Regression test: tests/test_app_run_imgui_assert_handling.py test_app_run_records_degraded_state_on_imgui_assert PASSES after fix. --- src/gui_2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui_2.py b/src/gui_2.py index ff6a3d93..0c4d96bb 100644 --- a/src/gui_2.py +++ b/src/gui_2.py @@ -727,7 +727,7 @@ class App: err = run_result.errors[0] if hasattr(self, "controller") and self.controller is not None: self.controller._gui_degraded_reason = err.message - self.controller._last_imgui_assert = traceback.format_exception(type(err.original), err.original, err.original.__traceback__) if err.original else "" + self.controller._last_imgui_assert = str(err.original) if err.original else err.message if not hasattr(self, '_startup_timeline_errors'): self._startup_timeline_errors = [] self._startup_timeline_errors.append(("run.immapp", err)) return