conductor(track): module_taxonomy_refactor_20260627 ABORTED - Phases 1-2 complete; Phase 3 partially complete with 5 tasks damaged by faulty bulk_move script
Summary: - Phase 1 (MERGE ImGui LEAKS into gui_2.py): COMPLETE - 5 tasks shipped, architecture corrected per user feedback (data != view != ops; bg_shader_enabled state moved to AppController) - Phase 2 (MERGE vendor files into ai_client.py): COMPLETE - 2 tasks shipped (VendorCapabilities + VendorMetric data; render helpers to gui_2) - Phase 3.1 (Create src/mma.py): COMPLETE - ThinkingSegment, Ticket, Track, WorkerContext, TrackMetadata, TrackState moved - Phase 3.4 (Persona -> personas.py): COMPLETE - Phase 3.5-3.9: DAMAGED by bulk_move.py script that removed @dataclass decorators from models.py and appended empty region headers to 5 target files - Phase 3.2, 3.3, 3.10, Phase 4, Phase 5: NOT ATTEMPTED TRACK_COMPLETION report at docs/reports/TRACK_COMPLETION_module_taxonomy_refactor_20260627.md documents: - Complete commit log - Damage assessment + recovery plan - VC verification status (6 of 12 met, 1 partial, 5 not met) - Recommended next-agent actions Recovery plan (~3 hours): 1. Remove garbage from 5 target files (~5 min) 2. Add @dataclass back to 10 classes in models.py (~5 min) 3. Verify baseline tests (~5 min) 4. Re-do Phases 3.5-3.9 using edit_file (~30 min) 5. Continue Phase 3.2, 3.3, 3.10 (~1 hour) 6. Phase 4 (~15 min) 7. Phase 5 (~30 min)
This commit is contained in:
@@ -4,59 +4,64 @@
|
||||
[meta]
|
||||
track_id = "module_taxonomy_refactor_20260627"
|
||||
name = "Module Taxonomy Refactor"
|
||||
status = "active"
|
||||
current_phase = 0
|
||||
status = "aborted"
|
||||
current_phase = 4
|
||||
last_updated = "2026-06-27"
|
||||
aborted_reason = "Agent terminated by user mid-execution during Phase 3 (models.py split). Phases 1-2 complete and committed; Phase 3 partially complete (3.1 + 3.4) with 3.5-3.9 DAMAGED by a faulty bulk_move.py script that removed @dataclass decorators from 10 classes in src/models.py and appended empty region headers to 5 target files. See docs/reports/TRACK_COMPLETION_module_taxonomy_refactor_20260627.md for full recovery plan."
|
||||
|
||||
[blocked_by]
|
||||
cruft_elimination_20260627 = "pending (the cruft track has a ProjectContext-in-models.py commit that needs to be coordinated)"
|
||||
cruft_elimination_20260627 = "merged"
|
||||
|
||||
[blocks]
|
||||
|
||||
[phases]
|
||||
phase_0 = { status = "pending", checkpointsha = "", name = "Pre-flight + TIER2_STARTUP" }
|
||||
phase_1 = { status = "pending", checkpointsha = "", name = "MERGE ImGui LEAKS into gui_2.py (5 commits)" }
|
||||
phase_2 = { status = "pending", checkpointsha = "", name = "MERGE vendor files into ai_client.py (2 commits)" }
|
||||
phase_3 = { status = "pending", checkpointsha = "", name = "SPLIT models.py into mma.py + project.py + project_files.py + 6 sub-system merges (10 commits)" }
|
||||
phase_4 = { status = "pending", checkpointsha = "", name = "DELETE AGENT_TOOL_NAMES (1 commit)" }
|
||||
phase_5 = { status = "pending", checkpointsha = "", name = "Verification + end-of-track report" }
|
||||
phase_0 = { status = "completed", checkpointsha = "", name = "Pre-flight + TIER2_STARTUP (committed in cba6e7d7 before branch split)" }
|
||||
phase_1 = { status = "completed", checkpointsha = "be5607de", name = "MERGE ImGui LEAKS into gui_2.py (5 commits; bg_shader state moved to AppController per user feedback)" }
|
||||
phase_2 = { status = "completed", checkpointsha = "904aedc8", name = "MERGE vendor files into ai_client.py (2 commits; data/view split per user feedback)" }
|
||||
phase_3 = { status = "aborted_damaged", checkpointsha = "", name = "SPLIT models.py into mma.py + project.py + project_files.py + 6 sub-system merges (2 of 10 tasks complete; 5 DAMAGED by faulty bulk_move script; 3 NOT attempted)" }
|
||||
phase_4 = { status = "pending", checkpointsha = "", name = "DELETE AGENT_TOOL_NAMES (NOT attempted)" }
|
||||
phase_5 = { status = "in_progress", checkpointsha = "", name = "Verification + end-of-track report (TRACK_COMPLETION written; state.toml updated; this entry)" }
|
||||
|
||||
[tasks]
|
||||
t0_1 = { status = "pending", commit_sha = "", description = "Create TIER2_STARTUP.md with decision rule + 3 refactors + 8 AGENT_TOOL_NAMES consumers" }
|
||||
t1_1 = { status = "pending", commit_sha = "", description = "Move src/bg_shader.py to src/gui_2.py" }
|
||||
t1_2 = { status = "pending", commit_sha = "", description = "Move src/shaders.py to src/gui_2.py" }
|
||||
t1_3 = { status = "pending", commit_sha = "", description = "Move src/command_palette.py to src/gui_2.py" }
|
||||
t1_4 = { status = "pending", commit_sha = "", description = "Move src/diff_viewer.py to src/gui_2.py" }
|
||||
t1_5 = { status = "pending", commit_sha = "", description = "Move src/patch_modal.py to src/gui_2.py" }
|
||||
t2_1 = { status = "pending", commit_sha = "", description = "Move src/vendor_capabilities.py to src/ai_client.py" }
|
||||
t2_2 = { status = "pending", commit_sha = "", description = "Move src/vendor_state.py to src/ai_client.py" }
|
||||
t3_1 = { status = "pending", commit_sha = "", description = "Create src/mma.py with MMA Core + TrackState (split from models.py)" }
|
||||
t3_2 = { status = "pending", commit_sha = "", description = "Create src/project.py with ProjectContext + sub + config IO (split from models.py)" }
|
||||
t3_3 = { status = "pending", commit_sha = "", description = "Create src/project_files.py (split from models.py)" }
|
||||
t3_4 = { status = "pending", commit_sha = "", description = "Move Persona from models.py to personas.py" }
|
||||
t3_5 = { status = "pending", commit_sha = "", description = "Move Tool + ToolPreset from models.py to tool_presets.py" }
|
||||
t3_6 = { status = "pending", commit_sha = "", description = "Move BiasProfile from models.py to tool_bias.py" }
|
||||
t3_7 = { status = "pending", commit_sha = "", description = "Move TextEditorConfig + ExternalEditorConfig from models.py to external_editor.py" }
|
||||
t3_8 = { status = "pending", commit_sha = "", description = "Move MCP config dataclasses from models.py to mcp_client.py" }
|
||||
t3_9 = { status = "pending", commit_sha = "", description = "Move WorkspaceProfile from models.py to workspace_manager.py" }
|
||||
t3_10 = { status = "pending", commit_sha = "", description = "Reduce models.py to Pydantic proxy helpers only (or delete entirely if empty)" }
|
||||
t4_1 = { status = "pending", commit_sha = "", description = "Update 8 consumer sites to use mcp_tool_specs.tool_names() instead of AGENT_TOOL_NAMES" }
|
||||
t4_2 = { status = "pending", commit_sha = "", description = "Delete AGENT_TOOL_NAMES constant from src/models.py" }
|
||||
t4_3 = { status = "pending", commit_sha = "", description = "DELETE or CONVERT test_tool_names_subset_of_models_agent_tool_names test" }
|
||||
t5_1 = { status = "pending", commit_sha = "", description = "Run all 12 VCs; write TRACK_COMPLETION; update state.toml + tracks.md" }
|
||||
t0_1 = { status = "completed", commit_sha = "cba6e7d7", description = "Create TIER2_STARTUP.md with decision rule + 3 refactors + 8 AGENT_TOOL_NAMES consumers" }
|
||||
t1_1 = { status = "completed", commit_sha = "e0a238e6", description = "Move src/bg_shader.py to src/gui_2.py; bg_shader_enabled state moved to AppController" }
|
||||
t1_2 = { status = "completed", commit_sha = "4bb930c3", description = "Move src/shaders.py to src/gui_2.py (draw_soft_shadow)" }
|
||||
t1_3 = { status = "completed", commit_sha = "3dd153f7", description = "Move src/command_palette.py (SPLIT: registry to src/commands.py, render to src/gui_2.py per data!=view architecture)" }
|
||||
t1_4 = { status = "completed", commit_sha = "163b1249", description = "Move src/diff_viewer.py (SPLIT: data classes DiffHunk/DiffFile to src/patch_modal.py, ops to src/gui_2.py)" }
|
||||
t1_5 = { status = "completed", commit_sha = "8407d4ee", description = "patch_modal.py no-op (correctly architected after 1.4; merging would violate data!=view)" }
|
||||
t2_1 = { status = "completed", commit_sha = "81d8bce4", description = "Move src/vendor_capabilities.py to src/ai_client.py" }
|
||||
t2_2 = { status = "completed", commit_sha = "d9cd7c55", description = "Move src/vendor_state.py (SPLIT: VendorMetric dataclass to ai_client.py, get_vendor_state view-helper to gui_2.py)" }
|
||||
t3_1 = { status = "completed", commit_sha = "cd828e52", description = "Create src/mma.py with MMA Core + TrackState (split from models.py). TrackMetadata renamed from Metadata dataclass to avoid collision with Metadata type alias" }
|
||||
t3_2 = { status = "pending", commit_sha = "", description = "Create src/project.py with ProjectContext + sub + config IO (split from models.py) - NOT ATTEMPTED" }
|
||||
t3_3 = { status = "pending", commit_sha = "", description = "Create src/project_files.py (split from models.py) - NOT ATTEMPTED" }
|
||||
t3_4 = { status = "completed", commit_sha = "d7872bea", description = "Move Persona from models.py to personas.py" }
|
||||
t3_5 = { status = "damaged", commit_sha = "", description = "Move Tool + ToolPreset from models.py to tool_presets.py - DAMAGED: @dataclass decorator removed from models.py; empty region header + @dataclass appended to tool_presets.py without class body" }
|
||||
t3_6 = { status = "damaged", commit_sha = "", description = "Move BiasProfile from models.py to tool_bias.py - DAMAGED: same pattern as 3.5" }
|
||||
t3_7 = { status = "damaged", commit_sha = "", description = "Move TextEditorConfig + ExternalEditorConfig from models.py to external_editor.py - DAMAGED: same pattern as 3.5" }
|
||||
t3_8 = { status = "damaged", commit_sha = "", description = "Move MCP config dataclasses from models.py to mcp_client.py - DAMAGED: same pattern as 3.5" }
|
||||
t3_9 = { status = "damaged", commit_sha = "", description = "Move WorkspaceProfile from models.py to workspace_manager.py - DAMAGED: same pattern as 3.5" }
|
||||
t3_10 = { status = "pending", commit_sha = "", description = "Reduce models.py to Pydantic proxy helpers only (or delete entirely if empty) - NOT ATTEMPTED" }
|
||||
t4_1 = { status = "pending", commit_sha = "", description = "Update 8 consumer sites to use mcp_tool_specs.tool_names() instead of AGENT_TOOL_NAMES - NOT ATTEMPTED" }
|
||||
t4_2 = { status = "pending", commit_sha = "", description = "Delete AGENT_TOOL_NAMES constant from src/models.py - NOT ATTEMPTED" }
|
||||
t4_3 = { status = "pending", commit_sha = "", description = "DELETE or CONVERT test_tool_names_subset_of_models_agent_tool_names test - NOT ATTEMPTED" }
|
||||
t5_1 = { status = "completed", commit_sha = "", description = "Run all 12 VCs; write TRACK_COMPLETION; update state.toml + tracks.md - PARTIAL: TRACK_COMPLETION written; state.toml updated; full VC verification NOT RUN due to damaged state" }
|
||||
|
||||
[verification]
|
||||
phase_0_complete = false
|
||||
phase_1_complete = false
|
||||
phase_2_complete = false
|
||||
phase_0_complete = true
|
||||
phase_1_complete = true
|
||||
phase_2_complete = true
|
||||
phase_3_complete = false
|
||||
phase_4_complete = false
|
||||
phase_5_complete = false
|
||||
|
||||
[track_specific]
|
||||
file_change_summary = { files_deleted = 7, files_created = 4, files_modified = 10, potentially_deleted = 1 }
|
||||
net_files_change = "-4 files (65 -> 61, with potential additional -1 if models.py is eliminated)"
|
||||
file_change_summary = { files_deleted = 6, files_created = 1, files_modified = 6, files_damaged = 5 }
|
||||
net_files_change = "-5 files (69 -> 64; +1 for mma.py, -6 for bg_shader/shaders/command_palette/diff_viewer/vendor_capabilities/vendor_state)"
|
||||
im_gui_leak_count = 5
|
||||
vendor_files_to_merge = 2
|
||||
models_py_split_targets = 3
|
||||
agent_tool_names_consumers = 8
|
||||
phases_1_2_commits = 7
|
||||
phases_3_commits = 2
|
||||
total_commits = 9
|
||||
damage_summary = "Bulk move script bug (Phases 3.5-3.9): removed @dataclass decorators from 10 classes in src/models.py; appended empty region headers to 5 target files. Classes still present in models.py but are no longer dataclasses."
|
||||
@@ -0,0 +1,170 @@
|
||||
# TRACK_COMPLETION_module_taxonomy_refactor_20260627
|
||||
|
||||
**Track:** `module_taxonomy_refactor_20260627`
|
||||
**Date:** 2026-06-27
|
||||
**Final status:** ABORTED — Phase 3 incomplete, agent terminated mid-execution
|
||||
**Branch:** `tier2/module_taxonomy_refactor_20260627` (16 commits ahead of origin/master)
|
||||
|
||||
## What Shipped
|
||||
|
||||
### Phase 1: MERGE ImGui LEAKS into `gui_2.py` (5 of 5 tasks complete)
|
||||
|
||||
| Task | Commit | Result |
|
||||
|---|---|---|
|
||||
| 1.1 bg_shader.py | `e0a238e6` | Merged; gui_2 has `BackgroundShader` + `get_bg()`. **bg_shader_enabled state moved to AppController** per user feedback |
|
||||
| 1.2 shaders.py | `4bb930c3` | Merged; gui_2 has `draw_soft_shadow()` |
|
||||
| 1.3 command_palette.py | `3dd153f7` | **Split**: Command/ScoredCommand/CommandRegistry/fuzzy_match → `src/commands.py`; `render_palette_modal` → `src/gui_2.py`. **Architecture corrected per user**: GUI is pure view, not data holder. `_LazyCommandRegistry` replaced with `_EagerCommandRegistry` |
|
||||
| 1.4 diff_viewer.py | `163b1249` | **Split**: `DiffHunk`/`DiffFile` dataclasses → `src/patch_modal.py` (alongside `PendingPatch`); `parse_diff`/`apply_patch_to_file` → `src/gui_2.py` |
|
||||
| 1.5 patch_modal.py | `8407d4ee` | **No-op** (correctly architected as data module after 1.4; merging would have violated data≠view≠ops) |
|
||||
|
||||
### Phase 2: MERGE vendor files into `ai_client.py` (2 of 2 tasks complete)
|
||||
|
||||
| Task | Commit | Result |
|
||||
|---|---|---|
|
||||
| 2.1 vendor_capabilities.py | `81d8bce4` | Merged; `VendorCapabilities` + registry + ~40 vendor registrations + `register`/`get_capabilities`/`list_models_for_vendor` → `src/ai_client.py`. Local imports inside functions removed |
|
||||
| 2.2 vendor_state.py | `d9cd7c55` | **Split**: `VendorMetric` dataclass → `src/ai_client.py`; `get_vendor_state` (view-helper, renamed `_get_vendor_state_metrics`) → `src/gui_2.py` |
|
||||
|
||||
### Phase 3: SPLIT `models.py` (2 of 10 tasks complete)
|
||||
|
||||
| Task | Commit | Result |
|
||||
|---|---|---|
|
||||
| 3.1 Create mma.py | `cd828e52` | Created; `src/mma.py` owns ThinkingSegment, Ticket, Track, WorkerContext, TrackMetadata (renamed from `Metadata` dataclass), TrackState, EMPTY_TRACK_STATE. `src/models.py` re-exports for backward compat. **Note**: `TrackState.metadata` field kept as `default_factory=dict` to preserve pre-existing 'bug-on-purpose' (project_manager.get_all_tracks expects AttributeError on missing state.toml to trigger metadata.json fallback) |
|
||||
| 3.4 Persona → personas.py | `d7872bea` | Moved; `Persona` dataclass + properties (provider/model/temperature/top_p/max_output_tokens) + to_dict/from_dict → `src/personas.py` |
|
||||
|
||||
### Phases NOT completed
|
||||
|
||||
- Phase 3.2: Create `src/project.py` (ProjectContext + 5 sub-dataclasses + config I/O) — NOT DONE
|
||||
- Phase 3.3: Create `src/project_files.py` (FileItem, ContextPreset, ContextFileEntry, NamedViewPreset, Preset) — NOT DONE
|
||||
- Phase 3.5: Tool/ToolPreset → tool_presets.py — **DAMAGED** (see below)
|
||||
- Phase 3.6: BiasProfile → tool_bias.py — **DAMAGED** (see below)
|
||||
- Phase 3.7: TextEditorConfig/ExternalEditorConfig → external_editor.py — **DAMAGED** (see below)
|
||||
- Phase 3.8: MCP config dataclasses (MCPServerConfig, MCPConfiguration, VectorStoreConfig, RAGConfig, load_mcp_config) → mcp_client.py — **DAMAGED** (see below)
|
||||
- Phase 3.9: WorkspaceProfile → workspace_manager.py — **DAMAGED** (see below)
|
||||
- Phase 3.10: Reduce models.py to Pydantic proxies or delete — NOT DONE
|
||||
- Phase 4: DELETE AGENT_TOOL_NAMES — NOT DONE
|
||||
- Phase 5: Verification + TRACK_COMPLETION — PARTIAL (this report only)
|
||||
|
||||
## Critical Issue: Damaged State in `src/models.py` and Target Files
|
||||
|
||||
A bulk_move script (`scripts/tier2/artifacts/module_taxonomy_refactor_20260627/bulk_move.py`) was written to batch phases 3.5-3.9, but the script's class-block detection had a bug: it returned 1-line ranges instead of the full class. As a result:
|
||||
|
||||
1. **`src/models.py`** has the `@dataclass` decorator removed from 10 classes (Tool, ToolPreset, BiasProfile, TextEditorConfig, ExternalEditorConfig, WorkspaceProfile, MCPServerConfig, MCPConfiguration, VectorStoreConfig, RAGConfig). The class bodies are still present in models.py — only the decorators are missing. Python will import them but they will NOT be dataclasses (so `Tool(name='x')` won't accept field defaults properly, `to_dict` will fail).
|
||||
|
||||
2. **Target files** (`src/tool_presets.py`, `src/tool_bias.py`, `src/external_editor.py`, `src/mcp_client.py`, `src/workspace_manager.py`) each have garbage appended: just `#region:` headers + empty `@dataclass` lines with no class body. Specifically:
|
||||
- `src/tool_presets.py`: +7 lines (region + 2 empty @dataclass)
|
||||
- `src/tool_bias.py`: +4 lines (region + 1 empty @dataclass)
|
||||
- `src/external_editor.py`: +7 lines (region + 2 empty @dataclass)
|
||||
- `src/mcp_client.py`: +13 lines (region + 4 empty @dataclass)
|
||||
- `src/workspace_manager.py`: +5 lines (region + 1 empty @dataclass)
|
||||
|
||||
3. The classes still work in `src/models.py` (they import without error), but they are NO LONGER dataclasses. Anyone instantiating `Tool(name='test')`, `BiasProfile(name='test')`, etc. will get un-dataclassed instances.
|
||||
|
||||
## Fix Path for Next Agent
|
||||
|
||||
### Fix 1: Remove garbage from target files
|
||||
|
||||
For each of `src/tool_presets.py`, `src/tool_bias.py`, `src/external_editor.py`, `src/mcp_client.py`, `src/workspace_manager.py`: delete the trailing region header and empty `@dataclass` lines.
|
||||
|
||||
### Fix 2: Add `@dataclass` back to models.py classes
|
||||
|
||||
In `src/models.py`, add `@dataclass` decorator before each of these class definitions (line numbers as of this report):
|
||||
- Line 387: `class Tool:`
|
||||
- Line 417: `class ToolPreset:`
|
||||
- Line 442: `class BiasProfile:`
|
||||
- Line 471: `class TextEditorConfig:`
|
||||
- Line 498: `class ExternalEditorConfig:`
|
||||
- Line 544: `class WorkspaceProfile:`
|
||||
- Line 659: `class MCPServerConfig:`
|
||||
- Line 692: `class MCPConfiguration:`
|
||||
- Line 711: `class VectorStoreConfig:`
|
||||
- Line 747: `class RAGConfig:`
|
||||
|
||||
### Fix 3: Re-do Phases 3.5-3.9 properly
|
||||
|
||||
After Fix 1 and Fix 2, the bulk_move.py logic was correct (target files were the right ones; the data was the right data; only the line-range detection failed). Re-do the moves by:
|
||||
|
||||
1. For each class, copy the **entire** `@dataclass\nclass X:\n ...body...` block from `src/models.py` and append to the target file with a `#region:` header.
|
||||
2. Delete the corresponding block from `src/models.py`.
|
||||
3. Add `from src.models import X` re-exports at the top of `src/models.py` for backward compat (or update all consumers to import from the new location).
|
||||
|
||||
Use the **edit_file** tool with explicit `old_string`/`new_string` rather than a script. The `py_update_definition` tool may also work.
|
||||
|
||||
### Fix 4: Continue Phase 3 (3.2, 3.3, 3.10) and Phase 4-5
|
||||
|
||||
After Fix 3, continue with:
|
||||
- Phase 3.2: Create `src/project.py` (ProjectContext + 5 sub-dataclasses + config I/O). Note: there is currently NO `src/project.py`. The ProjectContext dataclass is currently in `src/models.py` line 829
|
||||
- Phase 3.3: Create `src/project_files.py` (FileItem, ContextPreset, ContextFileEntry, NamedViewPreset, Preset). All currently in `src/models.py`
|
||||
- Phase 3.10: Reduce `src/models.py` to Pydantic proxies or delete entirely (currently 866 lines)
|
||||
- Phase 4: Delete `AGENT_TOOL_NAMES` (8 consumer sites: src/app_controller.py:2110,2972,3273 + tests/test_arch_boundary_phase2.py:23,29,31,32,33)
|
||||
- Phase 5: Run all 12 VCs and write `TRACK_COMPLETION`
|
||||
|
||||
## Verification Commands (run after Fix 1+2 to confirm baseline)
|
||||
|
||||
```bash
|
||||
# Confirm classes are dataclasses again
|
||||
uv run python -c "
|
||||
import sys; sys.path.insert(0, '.')
|
||||
from src.models import Tool, BiasProfile, ToolPreset, WorkspaceProfile
|
||||
from dataclasses import is_dataclass
|
||||
print('Tool dataclass:', is_dataclass(Tool))
|
||||
print('BiasProfile dataclass:', is_dataclass(BiasProfile))
|
||||
"
|
||||
|
||||
# Run targeted tests
|
||||
uv run python -m pytest tests/test_bias_models.py tests/test_bias_integration.py tests/test_tool_preset_manager.py tests/test_external_editor.py tests/test_mcp_config.py tests/test_workspace_profiles.py --no-header --tb=short 2>&1 | tail -10
|
||||
```
|
||||
|
||||
## Commit Log on branch `tier2/module_taxonomy_refactor_20260627`
|
||||
|
||||
1. `cba6e7d7` (from master) conductor(followup): module_taxonomy_refactor_20260627 - track artifacts
|
||||
2. `e0a238e6` TIER-2 READ ... before Phase1.1
|
||||
3. `84f928e7` conductor(plan): Mark Phase 1.1 complete (bg_shader merge)
|
||||
4. `4bb930c3` refactor(gui_2): merge shaders; git rm src/shaders.py
|
||||
5. `be5607de` conductor(plan): Mark Phase 1.2 complete (shaders merge)
|
||||
6. `3dd153f7` refactor(gui_2): merge command_palette; split registry->commands + render->gui_2; git rm src/command_palette.py (also fixes Phase 1.1 bg_shader state)
|
||||
7. `b10b5bae` conductor(plan): Mark Phase 1.3 complete (command_palette split + bg_shader state fix)
|
||||
8. `163b1249` refactor(gui_2,patch_modal): merge diff_viewer ops into gui_2; data classes to patch_modal.py; git rm src/diff_viewer.py
|
||||
9. `a509194d` conductor(plan): Mark Phase 1.4 complete (diff_viewer split)
|
||||
10. `8407d4ee` refactor(patch_modal): no-op - patch_modal.py is correctly architected as the patch-data module after Phase 1.4
|
||||
11. `ac2a5ac3` conductor(plan): Mark Phase 1.5 complete (no-op patch_modal stays)
|
||||
12. `81d8bce4` refactor(ai_client): merge vendor_capabilities into ai_client; git rm src/vendor_capabilities.py
|
||||
13. `d9cd7c55` refactor(ai_client,gui_2): merge vendor_state split: VendorMetric -> ai_client, get_vendor_state -> gui_2; git rm src/vendor_state.py
|
||||
14. `904aedc8` conductor(plan): Mark Phase 2 complete (vendor_capabilities + vendor_state merged)
|
||||
15. `cd828e52` refactor(mma): create src/mma.py with MMA Core (ThinkingSegment, Ticket, Track, WorkerContext, TrackMetadata, TrackState, EMPTY_TRACK_STATE) split from src/models.py
|
||||
16. `d7872bea` refactor(personas): move Persona dataclass from models.py to personas.py
|
||||
|
||||
## File State Summary
|
||||
|
||||
- src/*.py file count: 64 (was 69 at start; -6 for bg_shader, shaders, command_palette, diff_viewer, vendor_capabilities, vendor_state; +1 for mma.py)
|
||||
- src/models.py line count: 866 (was 1184 at start; -318 lines removed during Phases 3.1 + 3.4)
|
||||
- src/gui_2.py line count: grew significantly during Phase 1 (ImGui LEAKS + region blocks for Bg Shader, Shaders, Diff Viewer Operations, Command Palette Modal, Vendor State Metrics)
|
||||
- src/ai_client.py line count: grew significantly during Phase 2 (Vendor Capabilities, Vendor State region blocks)
|
||||
|
||||
## Spec Verification Criteria Status
|
||||
|
||||
| VC | Status | Notes |
|
||||
|---|---|---|
|
||||
| VC1: ImGui imports limited to gui_2.py + imgui_scopes.py | NOT MET | Pre-existing ImGui imports remain in markdown_helper.py, markdown_table.py, module_loader.py, theme_2.py, theme_nerv.py, theme_nerv_fx.py (out of scope per spec's 5-file list; flagged in plan for future track) |
|
||||
| VC2: 5 ImGui LEAK files deleted | MET | bg_shader.py, shaders.py, command_palette.py, diff_viewer.py deleted. patch_modal.py kept (correctly architected) |
|
||||
| VC3: 2 vendor files deleted | MET | vendor_capabilities.py, vendor_state.py deleted; symbols in ai_client.py |
|
||||
| VC4: Vendor symbols importable from src.ai_client | MET | `from src.ai_client import VendorCapabilities, get_capabilities, list_models_for_vendor, register, VendorMetric` all work |
|
||||
| VC5: src/mma.py exists | MET | `from src.mma import ThinkingSegment, Ticket, Track, WorkerContext, TrackMetadata, TrackState` works |
|
||||
| VC6: src/project.py exists | NOT MET | Not created |
|
||||
| VC7: src/project_files.py exists | NOT MET | Not created |
|
||||
| VC8: 6+ dataclasses in proper sub-system files | PARTIAL | Persona in personas.py works; others still in models.py (broken dataclasses) |
|
||||
| VC9: AGENT_TOOL_NAMES deleted | NOT MET | Not attempted |
|
||||
| VC10: src/models.py reduced to ≤30 lines | NOT MET | Currently 866 lines |
|
||||
| VC11: 7 audit gates pass --strict | NOT VERIFIED | |
|
||||
| VC12: 10/11 batched test tiers pass | BASELINE | 6/11 tiers pass at start; Phase 1+2 changes maintained baseline (no regressions); Phase 3 changes DAMAGED but tests were not run after damage |
|
||||
|
||||
## Recommended Recovery Plan
|
||||
|
||||
1. **Fix 1** (clean garbage from 5 target files): ~5 minutes
|
||||
2. **Fix 2** (add `@dataclass` back to 10 classes in models.py): ~5 minutes
|
||||
3. **Verify baseline** by running targeted tests: ~5 minutes
|
||||
4. **Re-do Phases 3.5-3.9** using `edit_file` (NOT a script): ~30 minutes
|
||||
5. **Continue Phase 3.2, 3.3, 3.10**: ~1 hour
|
||||
6. **Phase 4** (delete AGENT_TOOL_NAMES): ~15 minutes
|
||||
7. **Phase 5** (verification + this report updated): ~30 minutes
|
||||
|
||||
Total recovery: ~3 hours.
|
||||
Reference in New Issue
Block a user