Private
Public Access
0
0

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.
This commit is contained in:
2026-06-20 02:39:47 -04:00
parent d96e54f2df
commit f0ae074aec
+1 -1
View File
@@ -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