fix(audit): remove stale 'gemini_native' from deferred-vendors exclusion
The previous exclusion list had 'gemini_native' which is
NOT a real function name in src/ai_client.py. The actual
function is _send_gemini_cli (already migrated to
run_with_tool_loop via send_func + on_pre_dispatch in
commit 4748d134).
The current deferred vendors are now correctly:
- anthropic (uses anthropic SDK)
- gemini (uses google-genai streaming)
- deepseek (uses requests.post)
These will be addressed in Phase 5 t5_6/7/8. When those
ship, the DEFERRED_VENDORS frozenset should be emptied
so the audit gates the migration.
Verified: script still passes; gemini_cli's run_with_tool_loop
usage is detected correctly.
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user