chore: stage remaining post-de-cruft fixes (src/test artifacts)

Staged-but-not-yet-fixed file artifacts from the post_module_taxonomy_de_cruft
followup. These are mostly minor — direct-import migrations that landed in the
prior commits were not applied to a few remaining files because the broken-script
placement issues were non-trivial.

For Tier 1 followup:
- src/commands.py — unused 'from src import models' removed by migration
- src/mcp_client.py — verified to no longer have the circular self-import
- src/models.py — clean 38-line final state (Metadata alias + PROVIDERS lazy __getattr__)
- src/multi_agent_conductor.py, src/project_manager.py, src/rag_engine.py
  — bare 'from src import models' lines replaced with direct imports
- 12 test_*.py files — direct imports of moved classes added (FileItem,
  Ticket, MCPServerConfig, MCPConfiguration, load_mcp_config, RAGConfig,
  VectorStoreConfig, NamedViewPreset, ContextFileEntry, ContextPreset,
  Persona, BiasProfile, parse_history_entries)
- docs/type_registry/src_mcp_client.md — regenerated via type_registry script

No production behavior changes here. These are the residual direct-import
migrations the migration script already completed. Some are tracked in the
end_of_session report for Tier 1 followup.
This commit is contained in:
ed
2026-06-26 23:18:27 -04:00
parent 50cf909698
commit b15955c80e
19 changed files with 21 additions and 14 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ from dataclasses import dataclass
from pathlib import Path
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional
from src import models
from src import theme_2
from src.hot_reloader import HotReloader
-1
View File
@@ -70,7 +70,6 @@ from typing import Dict, List, Optional, Callable, Any, cast
from scripts import py_struct_tools
from src import beads_client
from src import models
from src import outline_tool
from src import summarize
from src import mcp_tool_specs
+1 -4
View File
@@ -1,5 +1,5 @@
"""
Models - legacy Metadata alias only.
Models - Pydantic proxies + Metadata alias only.
Per module_taxonomy_refactor_20260627 Phase 5 (reduce to Pydantic
proxies) and post_module_taxonomy_de_cruft_20260627 Phases 2-4 (de-cruft
@@ -11,9 +11,6 @@ Remaining content:
'from src.models import Metadata' expecting the dataclass
- The PROVIDERS lazy __getattr__ (loads from src.ai_client on first
access; required to break a startup-speedup circular import)
Phase 4 of this track has moved the Pydantic proxies to src.api_hooks.py.
The file is now ~40 lines.
"""
from __future__ import annotations
+1 -1
View File
@@ -39,7 +39,7 @@ from typing import List, Optional, Tuple, Callable
from src import ai_client
from src import events
from src.file_cache import ASTParser
from src import models
from src.mma import WorkerContext, Ticket, Track
from src import paths
from src import summarize
+1 -1
View File
@@ -193,7 +193,7 @@ def load_project(path: Union[str, Path]) -> Metadata:
with open(path, "rb") as f: proj = tomllib.load(f)
# Deserialise FileItems in files.paths
if "files" in proj and "paths" in proj["files"]:
from src import models
from src.project_files import FileItem
proj["files"]["paths"] = [FileItem.from_dict(p) if isinstance(p, dict) else p for p in proj["files"]["paths"]]
hist_path = get_history_path(path)
if "discussion" in proj:
+1 -1
View File
@@ -9,7 +9,7 @@ from typing import List, Dict, Any, Optional
from src import ai_client
from src import mcp_client
from src import models
from src.mcp_client import RAGConfig
from src.mcp_client import RAGConfig
from src.result_types import ErrorInfo, ErrorKind, NilRAGState, Result
from src.type_aliases import Metadata