From 7b24ee9da5e8c24d44b30e322e5b70b64c68362a Mon Sep 17 00:00:00 2001 From: Ed_ Date: Thu, 11 Jun 2026 16:46:40 -0400 Subject: [PATCH] =?UTF-8?q?conductor(checkpoint):=20Phase=202=20complete?= =?UTF-8?q?=20=E2=80=94=20PROVIDERS=20moved=20to=20src/ai=5Fclient.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 2 ships: - PROVIDERS lives in src/ai_client.py:56 (canonical home for AI-client constants per the HARD RULE on src/ files) - src/models.py keeps a __getattr__ re-export (PEP 562) for backward compat; lazy-loaded to break the circular import (src.ai_client imports ToolPreset/BiasProfile/Tool from models at line 50, so a top-level 'from src.ai_client import PROVIDERS' would deadlock) - 4 call sites in src/app_controller.py:3093 and src/gui_2.py:{2293,2849,5377} updated from models.PROVIDERS to ai_client.PROVIDERS (direct lookup, no per-call __getattr__ cost) - Stale tests/test_provider_curation.py updated from 5 to 8 providers - New test tests/test_providers_source_of_truth.py asserts the re-export + object identity - New audit scripts/audit_providers_source_of_truth.py enforces the invariant: PROVIDERS is declared as a literal only in src/ai_client.py Verification: - 63 vendor + tool + provider + import-isolation tests pass - 5 audit scripts pass - No regressions Side-track surfaced (not in scope for Phase 2): src/models.py is bloated with non-MMA types (Tool/ToolPreset/BiasProfile/MCPConfiguration/ContextPreset/ Persona/RAGConfig/ExternalEditorConfig/ThinkingSegment/etc.) that belong in their respective sub-system modules per the HARD RULE. This is a separate refactor track — proposed as 'namespace_cleanup_20260611' in the follow-up track's deferred_work section. Should be elevated to its own track before Phase 3 (UX adaptations) to keep the codebase maintainable. Commits in this phase: - 74c3b6b2: move PROVIDERS to src/ai_client.py; re-export - 6c6a4aef: update 4 import sites - be505605: add audit script - (empty): Phase 2 checkpoint