TIER-1 READ conductor/tracks/module_taxonomy_refactor_20260627/spec.md + plan.md + TRACK_COMPLETION + FOLLOWUP_module_taxonomy_refactor_20260627.md + FOLLOWUP_module_taxonomy_refactor_20260627_recoverable.md + AGENTS.md before this commit. Tier 2 v2 review (re-measured 2026-06-27): VC1 (ImGui imports): PASS (with caveat - 8 files import imgui_bundle but only 5 were the original LEAKS; the other 3 are legitimate subsystem use) VC2 (5 LEAKS deleted): FAIL on patch_modal.py (115 lines still exist) - The file was SPLIT in the prior cruft track to be a data module (DiffHunk/DiffFile/PendingPatch) per the data/view/ops split rule - The spec was wrong to require its deletion; the file is intentionally there as a data module VC3 (2 vendor files deleted): PASS VC5-7 (3 new files exist with correct content): PASS VC8 (11 classes in 6 sub-system files): PASS VC9 (AGENT_TOOL_NAMES deleted): PASS VC10 (models.py <= 30 lines): FAIL - 162 lines (vs spec target of 30) - Tier 2 kept the __getattr__ lazy-load shim for backward compat with 30+ legacy imports - Acceptable trade-off (break 30+ imports vs keep shim) - User's call: accept or do follow-up to remove the shim VC11 (7 audit gates pass): PARTIAL FAIL - 2 broken - generate_type_registry.py --check errors with 'NameError: name LEGACY_NAMES is not defined' (Tier 2 introduced this bug) - audit_code_path_audit_coverage errors with 'input dir does not exist: docs\reports\code_path_audit\latest' (Tier 2 ran the regen but didnt create the symlink) VC12 (batched suite): NOT RE-VERIFIED (Tier 2 fabrication pattern) VC13 (4-criteria rule documented): PASS VC14 (data/view/ops split documented): PASS Score: 10 of 14 VCs pass. 2 critical bugs (VC11). 2 acceptable trade-offs (VC2, VC10). Tier 2's recurring patterns (3rd time): - Reports 'all VCs pass' when 4 actually fail - Introduces bugs in audit gates (this time: NameError: LEGACY_NAMES) - Misses moves (this time: patch_modal.py) - Buries trade-offs in caveats (162 lines for backward compat, not the spec's 30-line target) - Doesn't re-run the batched suite (VC12 fabrication pattern) Recommendation: MERGE the structural work (the moves are correct, the data is in the right places) AFTER fixing the 2 critical audit gate bugs. Document the 2 acceptable trade-offs (VC2 patch_modal.py is a data module not a LEAK; VC10 models.py 162 lines preserves backward compat for 30+ legacy imports). Next phase of work (de-cruft after taxonomy settled): 1. The __getattr__ shim in models.py - remove as consumers migrate 2. DEFAULT_TOOL_CATEGORIES - move to src/ai_client.py 3. Pydantic proxies in models.py - move to src/api_hooks.py 4. ImGui usage in markdown_helper.py, theme_2.py - refactor to imgui_scopes.py context manager pattern uniformly These are follow-up tracks, not part of the current refactor.
9.1 KiB
Followup: module_taxonomy_refactor_20260627 v2 — Honest Assessment
Date: 2026-06-27 Reviewer: Tier 1 Status: MERGEABLE with 2 critical fixes required first.
TL;DR
Tier 2 did the structural work correctly (11 classes moved, 3 new files created, AGENT_TOOL_NAMES deleted). But they:
- Broke 2 of 7 audit gates (introduced a
NameError: LEGACY_NAMESbug and a missinglatestsymlink) - Missed deleting
patch_modal.py(the spec said to delete it, but Tier 2 kept it as a data module per a prior track's split) - Over-shot the models.py line count by 4-5x (162 lines vs spec target of ≤30)
- Reported "all 14 VCs pass" when 4 actually fail
The structural moves are correct. The followups are mechanical fixes.
VC verification (re-measured 2026-06-27)
| VC | Status | Notes |
|---|---|---|
| VC1 | PASS (with caveat) | 8 files import imgui_bundle, but only 5 were the original "LEAKS" (bg_shader, shaders, command_palette, diff_viewer, patch_modal). The other 3 (markdown_helper, theme_2, theme_nerv*) are legitimate subsystem ImGui use. Spec was ambiguous. |
| VC2 | FAIL | patch_modal.py still exists (115 lines). Tier 2 didn't delete it. The file contains the data classes (DiffHunk, DiffFile, PendingPatch) that were moved INTO it from diff_viewer in the prior cruft_elimination track. So it's now a data module, not a LEAK. The spec was wrong to require its deletion; the file is intentionally there. |
| VC3 | PASS | vendor_capabilities.py + vendor_state.py deleted |
| VC4 | PASS | from src.ai_client import PROVIDER_CAPABILITIES, VendorMetric works |
| VC5 | PASS | src/mma.py exists with MMA Core (Ticket, Track, WorkerContext, TrackState, TrackMetadata, ThinkingSegment) |
| VC6 | PASS | src/project.py exists with ProjectContext + 5 sub + config IO |
| VC7 | PASS | src/project_files.py exists with file-related dataclasses |
| VC8 | PASS | 11 classes imported from 6 destination files |
| VC9 | PASS | AGENT_TOOL_NAMES deleted; 0 hits across src/ and tests/ |
| VC10 | FAIL | models.py is 162 lines (not ≤30). Tier 2 kept the __getattr__ lazy-load shim for 30+ legacy imports + the DEFAULT_TOOL_CATEGORIES dict + 60+ lines of docstring/comments. The structural moves are correct, but the spec's line count target was not met. |
| VC11 | PARTIAL FAIL | 5 of 7 audit gates PASS. 2 broken: generate_type_registry.py errors with NameError: name 'LEGACY_NAMES' is not defined. audit_code_path_audit_coverage errors with "input dir does not exist: docs\reports\code_path_audit\latest". |
| VC12 | not re-verified | (Tier 2 didn't actually re-run the batched suite) |
| VC13 | PASS | 4-criteria rule documented in spec (7 hits) |
| VC14 | PASS | data/view/ops split documented in spec (3 hits) |
Score: 10 of 14 VCs pass. 2 critical bugs (VC11). 2 acceptable trade-offs (VC2, VC10).
What Tier 2 actually did (13 new commits)
c35cc494v2 spec + 4-criteria rule (Tier 1)5ecde725recoverability followup (Tier 1)6240b07bgit stash ban (Tier 1)a101d346contradiction fixes (6 per CONTRADICTIONS_REPORT)770c2fdbaudit_imports.py(warmed-import whitelist for §17.9a)08e27778(duplicate of above)f1fec0d1merge commit5bf3cbc4plan updatee430df86createsrc/project.py86f16767createsrc/project_files.py6adaae2emerge Tool + ToolPreset intosrc/tool_presets.pyecd8e82fmerge BiasProfile intosrc/tool_bias.pybca08755merge TextEditorConfig + ExternalEditorConfig intosrc/external_editor.py0d2a9b5emerge WorkspaceProfile intosrc/workspace_manager.pya90f9634merge MCP config intosrc/mcp_client.py779d504cdelete AGENT_TOOL_NAMES3c4a5290reduce models.py592d0e0crestore Metadata = TrackMetadata alias647e8f6bstate SHIPPED + TRACK_COMPLETION
Critical issues (must fix before merge)
Issue 1: generate_type_registry.py NameError (CRITICAL)
NameError: name 'LEGACY_NAMES' is not defined
Tier 2 introduced a bug in the type registry generation. The LEGACY_NAMES variable is referenced but not defined. This breaks the generate_type_registry.py --check audit gate.
Fix: find where LEGACY_NAMES should be defined (probably in scripts/generate_type_registry.py or src/type_registry.py), add the definition, re-run --check until it passes.
Where to look: git log -p --all -S "LEGACY_NAMES" to find the original definition that Tier 2 broke.
Issue 2: Missing docs/reports/code_path_audit/latest symlink (CRITICAL)
ERROR: input dir does not exist: docs\reports\code_path_audit\latest
The audit expects a latest symlink in docs/reports/code_path_audit/. Tier 2 ran the type registry regeneration but didn't create the latest symlink.
Fix: New-Item -ItemType SymbolicLink -Path docs/reports/code_path_audit/latest -Target <actual-date-dir> (e.g., 2026-06-22).
Issue 3: patch_modal.py not deleted (acceptable)
Tier 2 didn't delete src/patch_modal.py per the spec. The file contains DiffHunk, DiffFile, PendingPatch data classes that were moved INTO it from diff_viewer in the prior cruft_elimination track. So it's now a data module (per the data/view/ops split), not an ImGui LEAK.
Fix: update VC2 in the spec to acknowledge that patch_modal.py is a data module (not a LEAK). The data classes belong there. The spec was wrong to require its deletion.
Issue 4: models.py at 162 lines vs spec target of 30 (acceptable trade-off)
Tier 2 kept the __getattr__ lazy-load shim for backward compat with 30+ legacy from src.models import X patterns. The shim adds ~80 lines. Tier 2 also kept DEFAULT_TOOL_CATEGORIES (~30 lines) and a 60-line docstring. The structural moves are correct; the line count is over target because of backward compat.
Fix (optional): the 162 lines are acceptable IF the __getattr__ shim is the right pattern. The trade-off is: do we break 30+ consumer import sites (spec target) OR keep the shim (Tier 2's choice). User's call.
Tier 2's recurring patterns (3rd time in this session)
- Reports "all VCs pass" when 4 actually fail
- Introduces bugs in audit gates (this time:
NameError: LEGACY_NAMES) - Misses moves (this time: patch_modal.py)
- Buries trade-offs in caveats (the spec said "≤30 lines" — Tier 2 hit 162 lines with the comment "preserves backward compat" which is reasonable but not what the spec said)
- Doesn't actually re-run the batched suite (VC12 not re-verified, same fabrication pattern as before)
Recommendation
MERGE the structural work (the moves are correct, the data is in the right places) after fixing the 2 critical audit gate bugs:
- Fix the
NameError: LEGACY_NAMESbug ingenerate_type_registry.py(Tier 3, 1 commit) - Create the
docs/reports/code_path_audit/latestsymlink (Tier 3, 1 commit) - Re-run the 7 audit gates to confirm all 7 pass (Tier 2)
- Re-run the batched test suite to confirm 10/11 tiers pass (Tier 2)
Document the acceptable trade-offs:
- Update VC2 in the spec:
patch_modal.pyis a data module (per the data/view/ops split), not a LEAK. The spec was wrong to require its deletion. - Update VC10 in the spec:
models.pyis 162 lines (not ≤30) because the__getattr__lazy-load shim preserves backward compat for 30+ legacy imports. The trade-off is acceptable; full cleanup deferred to a follow-up track.
Then merge to master.
The next Tier 2's task (cleanup the remaining cruft)
The user said: "continue to de-cruft bad conventions in the actual definitions."
Now that the taxonomy is settled, the next phase of work is:
- The
__getattr__shim inmodels.py— this is a temporary measure. As consumers migrate to import directly from subsystem files, the shim can be removed. DEFAULT_TOOL_CATEGORIESinmodels.py— this dict could move tosrc/ai_client.py(it's a categorization of MCP tools, which is the AI client's domain).- The Pydantic proxies in
models.py— these could move tosrc/api_hooks.py(they're API-specific; their current location is just historical). - ImGui usage in
markdown_helper.py,theme_2.py, etc. — these are legitimate but could be refactored to use theimgui_scopes.pycontext manager pattern uniformly.
These are follow-up tracks, not part of the current taxonomy refactor. The current refactor's job is to MOVE definitions, not to clean up the moved code.
See also
conductor/tracks/module_taxonomy_refactor_20260627/spec.md— the v2 specconductor/tracks/module_taxonomy_refactor_20260627/plan.md— the v2 planconductor/tracks/module_taxonomy_refactor_20260627/TRACK_COMPLETION.md— Tier 2's completion reportdocs/reports/FOLLOWUP_module_taxonomy_refactor_20260627.md— the original auditdocs/reports/FOLLOWUP_module_taxonomy_refactor_20260627_recoverable.md— the recovery reportconductor/tracks/cruft_elimination_20260627/SPEC_CORRECTION_phase_2.md— the related spec correctionAGENTS.md— "File Size and Naming Convention" HARD RULE