1fa2b19257
Phase 11: ai_client silent-swallow cleanup (11 sites migrated).
Helpers added to src/ai_client.py:
- _try_warm_sdk_result(name) -> Result[Any] (sites 1+2)
- _set_tool_preset_result(preset_name) -> Result[None] (site 5)
- _set_bias_profile_result(profile_name) -> Result[None] (site 6)
- _extract_gemini_thoughts_result(resp) -> Result[str] (site 7)
- _list_minimax_models_result(api_key) -> Result[list[str]] (site 8)
- _count_gemini_tokens_for_stats_result(md_content) -> Result[int] (sites 9+10)
Helpers reused from earlier phases:
- _delete_gemini_cache_result from Phase 10 (sites 3+4)
- _set_tool_preset_result from site 5 (site 11)
Per-site decision (TIER1_REVIEW Phase 11 anti-sliming protocol):
- Sites with 'except: pass': MIGRATE to Result (no sentinel-None)
- Sites with 'except (NarrowType): sys.stderr.write': MIGRATE to Result
- _try_warm_sdk_result: Result variant (NOT sentinel-None which the audit
flagged as UNCLEAR; Result pattern matches Heuristic A)
Dilemma resolved: initial sentinel approach (_try_warm_sdk -> Any | None)
flagged as UNCLEAR (Heuristic B requires class method + self.attr assign).
Per Phase 9 redo precedent: migrate to Result instead of adding heuristic.
Audit state (after Phase 11):
mcp_client: 0 migration-target (Phase 3-8 complete)
ai_client: 18 -> 7 migration-target
BC: 0 (Phase 10 done)
SS: 11 -> 0 ✓
RETHROW: 6 (Phase 12)
UNCLEAR: 0
COMPLIANT: 27 -> 33 (+6 from helpers)
rag_engine: 9 migration-target (Phase 13)
Tests: 97 pass (was 79 in Phase 10; +18 Phase 11 site/invariant tests).