diff --git a/scripts/audit_no_inline_tool_loops.py b/scripts/audit_no_inline_tool_loops.py index d23538bd..879cc1d2 100644 --- a/scripts/audit_no_inline_tool_loops.py +++ b/scripts/audit_no_inline_tool_loops.py @@ -2,10 +2,15 @@ tool-call loop (i.e., a for loop with MAX_TOOL_ROUNDS in it). The follow-up track's invariant: all tool loops should go through -run_with_tool_loop. Inline loops are forbidden EXCEPT for the 4 -vendored-call-path vendors (anthropic, gemini, gemini_native, -deepseek) which use their own SDKs and are tracked as deferred -work in state.toml's deferred_work section. +run_with_tool_loop. Inline loops are forbidden EXCEPT for the 3 +vendored-call-path vendors (anthropic, gemini, deepseek) which use +their own SDKs and are tracked as deferred work (Phase 5 t5_6/7/8 +in state.toml). + +Note: gemini_cli was migrated to run_with_tool_loop via send_func +in commit 4748d134. The previous exclusion list incorrectly +included 'gemini_native' (a non-existent function name); that was +removed on 2026-06-11. Usage: uv run python scripts/audit_no_inline_tool_loops.py Exit code: 0 = pass; 1 = violations found. @@ -15,7 +20,7 @@ import sys from pathlib import Path TARGET = Path("src/ai_client.py") -DEFERRED_VENDORS = frozenset(["anthropic", "gemini", "gemini_native", "deepseek"]) +DEFERRED_VENDORS = frozenset(["anthropic", "gemini", "deepseek"]) def main() -> int: text = TARGET.read_text(encoding="utf-8")