Private
Public Access
docs(reports): FOLLOWUP_module_taxonomy_20260627 v2.1 - AGENT_TOOL_NAMES is redundant
User: 'isn't AGENT_TOOL_NAMES a redundant thing thats directly associated with the mcp_client.py?' - YES, confirmed. The existing test test_tool_names_subset_of_models_agent_tool_names literally asserts: tool_names() ⊆ AGENT_TOOL_NAMES. So AGENT_TOOL_NAMES is just a hardcoded snapshot of mcp_tool_specs.tool_names(). Action: DELETE AGENT_TOOL_NAMES from models.py (not just move it). Derive at consumer sites: list(mcp_tool_specs.tool_names()). 8 consumer sites to update: - 3 in src/app_controller.py:2110, 2972, 3273 - 5 in tests/test_arch_boundary_phase2.py:23, 29, 31, 32, 33 The cross-check test becomes either redundant or converts to a positive assertion (e.g., assert that the derived list has at least the canonical tool count). models.py reduces further: from ~60 to ~30 lines after deletion. This further reduces the models.py footprint. Combined with the previous audit (move vendor files to ai_client.py, split out mma.py + project.py + project_files.py), models.py becomes essentially empty - just the Pydantic proxy code that may also move to api_hooks.py. Net effect: models.py could be ELIMINATED entirely (becomes ~0 lines or just an __init__.py marker). The followup should consider whether to delete models.py completely.
This commit is contained in:
@@ -81,11 +81,12 @@ ai_client.py grows from 3147 → ~3310 lines. Justified: these ARE the vendor la
|
||||
| `WorkspaceProfile` | `src/workspace_manager.py` (73 lines, exists) |
|
||||
|
||||
**`src/models.py` reduced to:**
|
||||
- `AGENT_TOOL_NAMES` constant (the canonical 45-tool list)
|
||||
- `_create_generate_request`, `_create_confirm_request`, `__getattr__` (Pydantic lazy proxies for the API)
|
||||
- `_create_generate_request`, `_create_confirm_request`, `__getattr__` (Pydantic lazy proxies for the API; could also move to `api_hooks.py` if they're truly API-specific)
|
||||
- Top-level docstring updated to reflect the new scope
|
||||
|
||||
Estimated: ~60 lines (down from 1044).
|
||||
**`AGENT_TOOL_NAMES` is REDUNDANT — DELETE it (not just move).** It's a hardcoded snapshot of `mcp_tool_specs.tool_names()`. The existing test `test_tool_names_subset_of_models_agent_tool_names` literally asserts `tool_names() ⊆ AGENT_TOOL_NAMES`. Derive the list at consumer sites: `list(mcp_tool_specs.tool_names())`. Update 8 consumer sites (3 in `app_controller.py` + 5 in `tests/test_arch_boundary_phase2.py`). The cross-check test becomes either redundant or converts to a positive assertion that the set is derived correctly.
|
||||
|
||||
Estimated: ~30 lines (down from 1044, down from 60 if you keep the redundant constant).
|
||||
|
||||
### Group D: KEEP AS-IS (the rest)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user