From cf3d88bf65e51923181b5c9489d9ad77be957b7b Mon Sep 17 00:00:00 2001 From: Ed_ Date: Wed, 17 Jun 2026 15:08:25 -0400 Subject: [PATCH] docs(track): result_migration_review_pass decisions for src/ai_client.py UNCLEAR (2 compliant + 0 migration-target) --- docs/reports/RESULT_MIGRATION_REVIEW_PASS_20260617.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/reports/RESULT_MIGRATION_REVIEW_PASS_20260617.md b/docs/reports/RESULT_MIGRATION_REVIEW_PASS_20260617.md index 3b404903..79fd5f6d 100644 --- a/docs/reports/RESULT_MIGRATION_REVIEW_PASS_20260617.md +++ b/docs/reports/RESULT_MIGRATION_REVIEW_PASS_20260617.md @@ -84,7 +84,15 @@ Other audit findings (unchanged by this review pass): ### 2.3 `src/ai_client.py` — UNCLEAR sites (2, baseline) -*(filled in Task 2.3)* +| Line | Context | Snippet | Decision | Pattern / Rationale | +|---|---|---|---|---| +| 828 | `run_with_tool_loop` (sync/async bridge) | `except RuntimeError: results = asyncio.run(...)` after `asyncio.get_running_loop()` | **compliant** | Sync/async bridge: `get_running_loop()` raises `RuntimeError` when no loop is running; the fallback to `asyncio.run` is the canonical pattern | +| 2813 | `_get_llama_cost_tracking` (vendor capabilities lookup) | `except KeyError: return True` after `get_capabilities("llama", _model)` | **compliant** | Lookup-miss-with-default (same as gui_2 L806); default to cost-tracking-on for unknown models | + +**Subtotals:** 2 compliant + 0 migration-target. + +**New heuristic candidates:** +8. `asyncio.get_running_loop()` with `except RuntimeError: asyncio.run(...)` → `INTERNAL_COMPLIANT` (sync/async bridge) ---