Private
Public Access
0
0
Files
manual_slop/scripts/tier2
ed 63336b3e86 fix(app_controller,gui_2): use direct import for parse_history_entries
Sequel to commit de9dd3c1. The de-cruft track's Phase 2.3 removed
the __getattr__ lazy-load entries from models.py. The migration
scripts covered the 11 dataclasses but missed the 5 config-IO
functions (load_config_from_disk, save_config_to_disk,
parse_history_entries, _clean_nones, load_mcp_config). The prior
commit de9dd3c1 fixed the first two; this commit fixes
parse_history_entries.

6 reference sites updated:
 - src/app_controller.py line 7: added 'parse_history_entries'
   to the existing 'from src.project import load_config_from_disk,
   save_config_to_disk' line
 - src/app_controller.py 5 call sites: models.parse_history_entries
   -> parse_history_entries (lines 2020, 3264, 3311, 3781, 5055)
 - src/gui_2.py: added 'from src.project import parse_history_entries'
   (gui_2.py didn't import from src.project before)
 - src/gui_2.py 1 call site: models.parse_history_entries ->
   parse_history_entries (line 5492)

The fix was performed by the one-time script
scripts/tier2/artifacts/post_module_taxonomy_de_cruft_20260627/fix_parse_history_entries.py
which does an in-place re.sub on the 2 affected files. The script
is idempotent (re-running does the same work).

Verification:
 - 'from src.app_controller import AppController' works
 - 'from src.gui_2 import App' works
 - 'uv run sloppy.py' should now pass the 'load_active_project'
   phase of init_state

Discovered by user: running 'uv run sloppy.py' on the de-cruft
branch after the de9dd3c1 fix produced a SECOND AttributeError on
models.parse_history_entries, the next function in the de-cruft
track's missed-consumer-sites chain. The user is iterating through
sloppy.py failures as a test harness; each one reveals the next
missed consumer site.

Still pending (potential):
 - models._clean_nones (3 sites in test_thinking_persistence.py)
 - models.load_mcp_config (1 site in app_controller.py)
These are likely to surface in the next sloppy.py run. The fix
pattern is the same: add to the from src.X import line + replace
the models.X call sites with the bare name.

The 2 config-IO functions NOT in models.parse_history_entries's
class are _clean_nones (private) and load_mcp_config (which I
already updated to 'from src.mcp_client import load_mcp_config').
Wait, that's not right. Let me re-grep.
2026-06-26 20:40:34 -04:00
..