Private
Public Access
0
0

conductor(checkpoint): Phase 3 complete - ai_client Result API + deprecation + ProviderError removal

This commit is contained in:
2026-06-12 19:58:52 -04:00
parent 64b787b881
commit d9c34a19e5
@@ -5,7 +5,7 @@
track_id = "data_oriented_error_handling_20260606"
name = "Data-Oriented Error Handling (Fleury Pattern)"
status = "active"
current_phase = 2
current_phase = 3
last_updated = "2026-06-12"
[blocked_by]
@@ -21,8 +21,8 @@ public_api_migration_20260606 = "planned in spec §12.1"
phase_1 = { status = "completed", checkpoint_sha = "c5f2487f", name = "Foundation: result_types module + style guide + baseline check" }
# Phase 2: mcp_client.py refactor (Path C: additive _result variants only; the 30+ tool refactor deferred to follow-up)
phase_2 = { status = "completed", checkpoint_sha = "b144450b", name = "mcp_client.py refactor (Path C: additive _result variants)" }
# Phase 3: ai_client.py refactor (highest risk; ProviderError removal)
phase_3 = { status = "pending", checkpoint_sha = "", name = "ai_client.py refactor (Result API + deprecation + ProviderError removal)" }
# Phase 3: ai_client.py refactor (highest risk: ProviderError removal, 9 vendor renames, send() @deprecated)
phase_3 = { status = "completed", checkpoint_sha = "64b787b8", name = "ai_client.py refactor (Result API + deprecation + ProviderError removal)" }
# Phase 4: rag_engine.py refactor
phase_4 = { status = "pending", checkpoint_sha = "", name = "rag_engine.py refactor (Result + NilRAGState)" }
# Phase 5: Deprecation wiring + docs + integration
@@ -51,14 +51,14 @@ t2_8 = { status = "cancelled", commit_sha = "", description = "Path C: SKIPPED (
t2_9 = { status = "cancelled", commit_sha = "", description = "Path C: SKIPPIPED. tests/test_mcp_client.py does not exist; the 4 specialized mcp test files all pass with no regressions (15/15)." }
t2_10 = { status = "completed", commit_sha = "", description = "Phase 2 Path C checkpoint commit + git note" }
# Phase 3: ai_client.py refactor (HIGHEST RISK) - mirrors plan Tasks 3.1-3.8
t3_1 = { status = "pending", commit_sha = "", description = "Baseline: verify existing 8 vendor test files pass before refactor" }
t3_2 = { status = "pending", commit_sha = "", description = "Red: tests/test_ai_client_result.py + tests/test_deprecation_warnings.py" }
t3_3 = { status = "pending", commit_sha = "", description = "Refactor 6 classifier functions to return ErrorInfo: 5 in src/ai_client.py (_classify_gemini_error, _classify_anthropic_error, _classify_deepseek_error, _classify_minimax_error, _classify_gemini_cli_error) + 1 in src/openai_compatible.py (_classify_openai_compatible_error, shared by qwen/llama/grok) + 1 in src/qwen_adapter.py (classify_dashscope_error, no underscore prefix)" }
t3_4 = { status = "pending", commit_sha = "", description = "Rename _send_<vendor>() to _send_<vendor>_result() for all 8 vendors (Gemini, Anthropic, DeepSeek, MiniMax, Gemini CLI, Qwen, Llama, Grok); new return type is Result[str]. Per-vendor atomic commits (8 sub-tasks in plan)." }
t3_5 = { status = "pending", commit_sha = "", description = "Add send_result() public API to src/ai_client.py; returns Result[str]; mirrors existing send() signature (13+ parameters including 8 callbacks - read with manual-slop_py_get_definition)" }
t3_6 = { status = "completed", commit_sha = "73cf321c", description = "Mark send() as @deprecated + rewire to call send_result() + add filterwarnings to tests/conftest.py to silence deprecation in existing tests" }
t3_7 = { status = "pending", commit_sha = "", description = "Remove the ProviderError class from src/ai_client.py + remove dead 'except ProviderError' clause" }
t3_8 = { status = "pending", commit_sha = "", description = "Phase 3 checkpoint commit + git note" }
t3_1 = { status = "completed", commit_sha = "648d4b95", description = "Baseline: 52/52 vendor + ai_client tests pass (38 vendor/ai_client + 14 gemini_cli); recorded in plan as Task 3.1" }
t3_2 = { status = "completed", commit_sha = "1c997246", description = "Red: tests/test_ai_client_result.py (6 tests) + tests/test_deprecation_warnings.py (2 tests); 8/8 fail with AttributeError/TypeError as expected" }
t3_3 = { status = "completed", commit_sha = "0cad1e16", description = "Refactor 6 classifier functions to return ErrorInfo: 4 in src/ai_client.py (_classify_gemini_error, _classify_anthropic_error, _classify_deepseek_error, _classify_minimax_error) + 1 in src/openai_compatible.py (_classify_openai_compatible_error, shared by qwen/llama/grok) + 1 in src/qwen_adapter.py (classify_dashscope_error, no underscore prefix). Also fixed pre-existing NameError bug in _classify_gemini_error (gac module reference; now uses _require_warmed)." }
t3_4 = { status = "completed", commit_sha = "d4d7d1ab", description = "Rename _send_<vendor>() to _send_<vendor>_result() for 9 functions (gemini 0282f9ff, gemini_cli 943a21bf, anthropic f840dbe8, deepseek 49923f9b, grok 87cac380, minimax e384afce, qwen 64d6ba2d, llama 66651529, llama_native d4d7d1ab). Per-vendor atomic commits; new return type is Result[str]; body wrapped in try/except with vendor-specific classifier." }
t3_5 = { status = "completed", commit_sha = "9f86b2be", description = "Add send_result() public API to src/ai_client.py line 2771; returns Result[str]; mirrors existing send() signature (11 parameters); dispatches to all 9 vendors via new _send_<vendor>_result() functions; catch-all except wraps dispatch in Result(data='', errors=[ErrorInfo(INTERNAL)]); also added Result to import line" }
t3_6 = { status = "completed", commit_sha = "73cf321c", description = "Mark send() as @deprecated (typing_extensions.deprecated) + rewire body to call send_result() and return result.data; errors logged to comms as WARN/deprecated_send_with_errors; added filterwarnings to pyproject.toml to silence deprecation in existing tests" }
t3_7 = { status = "completed", commit_sha = "64b787b8", description = "Remove ProviderError class from src/ai_client.py (32 lines) + remove dead except ProviderError: raise clause in _send_anthropic_result; updated send_openai_compatible in src/openai_compatible.py to return Result[str] (was raising ProviderError); updated 2 test files (test_openai_compatible.py, test_qwen_provider.py) to use ErrorInfo API; 14/14 relevant tests pass" }
t3_8 = { status = "completed", commit_sha = "", description = "Phase 3 checkpoint commit + git note" }
# Phase 4: rag_engine.py refactor
t4_1 = { status = "pending", commit_sha = "", description = "Red: tests/test_rag_engine_result.py (verify RAG methods return Result; verify NilRAGState used)" }
t4_2 = { status = "pending", commit_sha = "", description = "Refactor RAGEngine._init_vector_store to return Result[None] (replaces raise ImportError / ValueError)" }