Private
Public Access
0
0

chore: TIER-2 READ conductor/code_styleguides/error_handling.md lines 356-518 (Pattern 2 drain) before Phase 3

Per AI Agent Checklist Rule #0 (re-read per phase).

Phase 3 focuses on the 8 INTERNAL_BROAD_CATCH sites inside render-loop
functions called every frame. The key constraint (per Batch A pattern
in the plan):

- For render-loop sites: the legacy wrapper returns early on error to
  avoid breaking the immediate-mode frame.
- The _result helper returns Result[bool] with ErrorInfo on failure.
- The drain target is app._last_request_errors (the per-request
  accumulator added by sub-track 3 Phase 6).

Per the styleguide (lines 396-407), Pattern 2 (GUI error display) is the
canonical drain for render-loop errors: imgui.open_popup in the same
frame, non-blocking, no crash. The render loop MUST NOT break even
if the underlying call raises.

Sites to migrate in Phase 3 (8 sites from PHASE1_SITE_INVENTORY.md):
- L731, L742 (_load_fonts): font loading via third-party SDK
- L1123 (_gui_func -> render_main_interface): main render loop
- L1172, L1198, L1223 (_show_menus): win32gui calls in menu bar
- L1285 (_handle_history_logic): history logic called every frame
- L4849 (render_warmup_status_indicator): status indicator render

Each site gets its own _result helper + legacy wrapper; one atomic
commit per site.
This commit is contained in:
2026-06-19 21:34:58 -04:00
parent 4e9ab451dc
commit 8af65ab319

Diff Content Not Available