These scripts were created during the search for the "Missing End()" imgui error
that the user reported on 2026-06-29. They are throwaway diagnostic tools;
their purpose was to find the orphan imgui.end_child() call in
render_tier_stream_panel (commit c2155593) and verify the fix worked.
No production code depends on these. They are kept for archival purposes
only so future debugging of similar imbalanced-begin/end issues has a
reference.
Scripts included:
- apply_fix.py : the actual applied fix to src/gui_2.py
- fix_orphan.py/fix_orphan2.py : iterative attempts at removing the orphan
- fix_indent.py : was used to attempt an indent fix; superseded
- remove_orphan.py : rejected because pattern didn't match
- find_imbalance.py : the canonical begin/end imbalance detector
- find_extras.py : finds orphan imgui.end() (window-level)
- find_ends.py : dumps all imgui.end() lines with context
- peek*.py (8 files) : various context-dump helpers used during
investigation
- check_dynamic.py : dynamic-control-flow imbalanced tracker
- check_indents.py : indent diagnostic for L7086
- diag_install_heuristic.py : earlier diagnostic for install heuristic
- inspect_imgui_apis.py : dumps imgui-bundle API surface
- search_indent*.py (3) : indent search helpers
- window_balance.py : dedicated imgui.begin/imgui.end balance check
- apply_fix.py/remove_orphan2.py : final iterations that succeeded
None of these are imported by src/ or tests/. The fix commit c2155593 is
the actual production change; these scripts are just the trail of breadcrumbs
left during the investigation.