Track artifacts for the MMA quarantine + RAG test decoupling effort.
Design doc lives at docs/superpowers/specs/ (historical record preserved).
Plan.md pending user spec approval.
The previous write_registry wiped existing .md files first, then wrote
new ones. When multiple xdist workers ran the script concurrently, they
would clobber each other mid-write, causing intermittent test failures
(test_generate_type_registry.py would see missing or stale files).
Fix: generate to a sibling staging directory (PID+timestamp suffix)
first, then use os.replace() to atomically swap into place. No observer
can see the registry in a partial state.
The staging dir is built manually (not via tempfile) because
scripts/audit_no_temp_writes.py forbids tempfile imports in scripts/.
Verified: 6/6 tests in test_generate_type_registry.py PASS in isolation
and in tier-1-unit-core batch (was: 2 failed due to race); audit CLEAN.
Auto-generated by scripts/generate_type_registry.py after the recent
src/gui_2.py and src/paths.py changes:
- src_paths.md: adds 'layouts: Path' to the Paths struct fields list
- src_layouts.md: NEW module file (src/layouts.py added by the
default_layout_install track)
- index.md: includes the new src_layouts.md entry
Pure doc regeneration; no production code changed.
test_undo_redo_lifecycle in tests/test_undo_redo_sim.py was failing in
the live_gui batch (passes in isolation) because btn_reset
(_handle_reset_session) was not clearing the HistoryManager's undo and
redo stacks. Prior tests in the same live_gui session leave stale
entries that interfere with tests that assume btn_reset provides a
clean history baseline.
Adds clearing of:
- app.history._undo_stack
- app.history._redo_stack
- app._last_ui_snapshot (None so the next take sets the baseline)
- app._pending_snapshot (False so debounce starts fresh)
- app._state_to_push (None so no stale state queued for push)
at the end of _handle_reset_session. The App is reached via
self.hook_server.app (set during _init_ai_and_hooks); all accesses are
guarded with hasattr/getattr for safety when the hook_server isn't
initialized yet (tests that construct AppController without starting
services).
Tests: test_undo_redo_lifecycle, test_undo_redo_discussion_mutation,
test_undo_redo_context_mutation all pass (3/3). The previously-failing
batch context also passes (verified with 14 tests from the gw7 worker
plus the test_undo_redo_sim set).
Migrates two INTERNAL_BROAD_CATCH / INTERNAL_SILENT_SWALLOW sites in
src/gui_2.py to the drain-aware Result[T] pattern per Phase 10:
1. L1540 _install_default_layout_if_empty: extract the
imgui.load_ini_settings_from_memory try/except (broad Exception
catch) into a new _apply_default_layout_to_session_result helper
that returns Result[bool]. The helper converts the exception to
ErrorInfo; the caller propagates the error so App._post_init can
drain it to _startup_timeline_errors.
2. L7136 render_tier_stream_panel (else branch, tier3_keys loop):
replace the inline except (TypeError, AttributeError): pass with
the existing _tier_stream_scroll_sync_result helper, mirroring
the migration already applied to the if-branch (L7074). Errors
drain to app._last_request_errors with source
'render_tier_stream_panel.tier3_dispatcher'.
Audit: BROAD_CATCH count 1 -> 0; SILENT_SWALLOW count 1 -> 0.
Tests: test_phase_8_invariant_property_setter_count_dropped,
test_phase_9_invariant_helper_utility_count_dropped,
test_phase_10_invariant_silent_swallow_count_zero all pass.
Documents the MiniMax_understand_image workflow for converting
screenshots to ASCII Layout Maps. Covers: when to use it, the
6-step workflow, the proportional-measurement prompt pattern,
faithful rendering rules (width ratios, empty space, floating
window position, color annotations, tab bars, table rows),
multi-screenshot composition, and limitations.
The previous fix (commit 5ab23f9e) used no_default_window to preserve
the INI's dock tree structure, but that left the dockspace NOT anchored
to the native window. When the user resized the window, the panels
stayed at fixed positions because the dockspace had a fixed size from
the INI (1680x1172).
Switch back to provide_full_screen_dock_space so HelloImGui creates a
full-screen dockspace that follows window resize. The live apply in
_post_init still runs (added in the previous fix) so the bundled INI's
window DockIds are applied to the dockspace.
Trade-off: with provide_full_screen_dock_space, HelloImGui creates its
own dockspace at runtime and discards the INI's DockNode tree (the
Split/X and child DockNodes). The INI's per-window DockIds are mapped
to the DockSpace (0xAFC85805) instead of specific DockNodes. Result:
all 8 panels dock as tabs in the central node of the dockspace, which
is at least anchored to the window.
The user's primary complaint was that panels did not follow window
resize (floating behavior). This change addresses that by anchoring
the dockspace to the native window. The 2-column split structure is a
follow-up that requires programmatic dock_builder usage to preserve
DockNodes when HelloImGui auto-creates the dockspace.
Verification (imgui.save_ini_settings_to_memory at runtime):
- All 8 windows docked with DockId=0xAFC85805,N (the DockSpace)
- DockSpace ID=0xAFC85805 ... CentralNode=1 (anchored to window)
- [Docking][Data] block fully preserved
Tests (16/16 PASS):
- tests/test_default_layout_install.py: 3/3 PASS
- tests/test_api_hooks_gui_health_live.py: 1/1 PASS
- tests/test_command_palette_sim.py: 7/7 PASS
- tests/test_saved_presets_sim.py: 2/2 PASS
- tests/test_live_gui_integration_v2.py: 3/3 PASS
The pre-run install wrote the bundled INI to cwd, and the
_install_default_layout_if_empty helper applies it via
imgui.load_ini_settings_from_memory() when cwd is empty. But the
GUI was rendering all panels as floating windows at default position
(60, 60) with no DockId, despite the bundled INI having a full
[Docking][Data] block with DockSpace + DockNodes + per-window DockIds.
Root cause analysis (via imgui.save_ini_settings_to_memory() at runtime):
1. With default_imgui_window_type=provide_full_screen_dock_space:
HelloImGui creates its own DockSpace at runtime, overriding the INI's
DockSpace settings. The DockSpace ID matches (0xAFC85805) but the
Split/X and child DockNodes from the bundled INI are discarded.
Runtime INI shows: 'DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=0,28
Size=1666,1172 CentralNode=1' (no DockNodes, no DockIds honored).
2. The pre-run install writes the INI to disk, but HelloImGui's
load_user_pref runs BEFORE post_init, so even a perfect on-disk
INI doesn't get re-applied to the current session's dock state
unless we call imgui.load_ini_settings_from_memory() after the
first frame.
Two-part fix:
A. src/gui_2.py line 678: change default_imgui_window_type from
'provide_full_screen_dock_space' to 'no_default_window'. Without
the auto-created DockSpace, HelloImGui honors the INI's full
docking tree structure.
B. src/gui_2.py _post_init (line 575): always call
imgui.load_ini_settings_from_memory() after _install_default_layout
runs, regardless of whether the cwd INI was empty. This re-applies
the bundled INI to the live session after the first frame is
rendered, so the panels are docked correctly on the current launch.
Layouts/default.ini: replace the simple 'DockSpace + 2 direct
DockNode children' structure (silently ignored by HelloImGui) with
the user's working nested DockNode tree (5-level deep), mapped to:
- LEFT column (DockNode 0x10, CentralNode=1): Theme, Project Settings,
AI Settings, Files & Media, Operations Hub
- RIGHT column (DockNode 0x01): Discussion Hub, Log Management,
Diagnostics
Verification (imgui.save_ini_settings_to_memory at runtime after
15s + first frame):
- LEFT column windows: Pos=0,28, Size=881,1697 (5 panels stacked)
- RIGHT column windows: Pos=883,28, Size=1183,1697 (3 panels stacked)
- [Docking][Data] block fully preserved (DockSpace + 8 DockNodes)
- All 8 panels docked (not floating)
Tests:
- tests/test_default_layout_install.py: 3/3 PASS
- tests/test_api_hooks_gui_health_live.py: 1/1 PASS
- tests/test_command_palette_sim.py: 7/7 PASS
- tests/test_saved_presets_sim.py: 2/2 PASS
- tests/test_live_gui_integration_v2.py: 3/3 PASS
render_theme_panel is a module-level function that takes app as its
parameter, but two lines still referenced 'self' (line 6373 and 6376).
The function was converted from a method (_render_theme_panel) to a
module-level function in the module_taxonomy_refactor_20260627 Phase 1.3
(commit 3dd153f7), but the self -> app substitution was missed.
Symptom: on every frame, render_theme_panel called imgui.begin('Theme', ...)
which pushed the Theme window onto the imgui stack. Then the
'getattr(self, ...)' raised NameError. The exception was swallowed by
_render_main_interface_result's try/except, but the imgui.end() call
at the end of the function was never reached. The Theme window stayed
pushed on the stack, and HelloImGui's auto-managed MainDockSpace asserted
'Missing End()' on every frame.
The bug was masked earlier by commit 71028dad, which fixed a stale
'from src.command_palette import' in render_main_interface. Before that
fix, render_main_interface aborted entirely every frame, so the Theme
window's never-reached end() was hidden behind a different error.
Bisect confirmed: disabling any other default-visible window left the
error; only disabling Theme made /api/gui_health report healthy=True.
Verification:
- tests/test_default_layout_install.py: 3/3 PASS (install behavior unchanged)
- tests/test_api_hooks_gui_health_live.py: 1/1 PASS (was failing)
- tests/test_command_palette_sim.py: 7/7 PASS
- tests/test_saved_presets_sim.py: 2/2 PASS
The spec was drafted while the working tree was on tier2/post_module_taxonomy_de_cruft_20260627, but the track targets master. 2 line numbers were from the cruft branch, not master:
- src/commands.py reset_layout: spec said :342-378 + :371; master is :248-275 + :268
- src/command_palette.py: spec said 208 lines; master is 165 lines
Also added a Branch State Warning section documenting:
- main working tree is on tier2/post_module_taxonomy_de_cruft_20260627 (NOT master)
- module_taxonomy_refactor_20260627 + post_module_taxonomy_de_cruft_20260627 are NOT merged to master
- this track does NOT depend on those cruft tracks
- master worktree at C:\projects\manual_slop_master is the editing surface
All other line numbers (App._post_init:566, App.run:619, _run_immapp_result:691, _post_init_callback_result:1449, render_persona_editor_window:3433, orphan end_child:6990, paths.py themes:60/83/150/209-216/295) verified correct against master.