Private
Public Access
0
0

test(ai_client): add red tests for run_with_tool_loop shared helper

5 Red tests in tests/test_ai_client_tool_loop.py verify the planned
run_with_tool_loop contract (no-tool-call fast path, tool-call
dispatch, max-rounds safety, history append, error tolerance).

Deviation from plan: tests patch src.ai_client.send_openai_compatible
(plan's Task 1.1 had src.tool_loop.send_openai_compatible). The plan
predates the AGENTS.md HARD RULE on src/<thing>.py files; per the
follow-up track's Naming Convention section, run_with_tool_loop lives
IN src/ai_client.py. The function body imports send_openai_compatible
from src.openai_compatible, so src.ai_client.send_openai_compatible
is the correct patch path.

state.toml: current_phase 0 -> 1, phase_1 pending -> in_progress,
t1_1 pending -> in_progress, blocked_by status
phase_6_in_progress -> phase_6_complete (parent's Phase 6
checkpointed at 064cb26).

Confirmed red: 5 ImportError against src.ai_client.run_with_tool_loop
at collection time.
This commit is contained in:
2026-06-11 10:43:56 -04:00
parent a22d497591
commit dc0f25c53b
2 changed files with 114 additions and 4 deletions
@@ -5,15 +5,16 @@
track_id = "qwen_llama_grok_followup_20260611"
name = "Qwen/Llama/Grok Follow-Up (tool loop, PROVIDERS move, UX adaptations 2-9, local-first, matrix v2, Anthropic/Gemini/DeepSeek migration)"
status = "active"
current_phase = 0
current_phase = 1
last_updated = "2026-06-11"
[blocked_by]
# This follow-up is blocked on the parent track's Phase 6 (docs) completing.
qwen_llama_grok_integration_20260606 = "phase_6_in_progress"
# Resolved 2026-06-11 (parent Phase 6 checkpoint sha 064cb26).
qwen_llama_grok_integration_20260606 = "phase_6_complete"
[phases]
phase_1 = { status = "pending", checkpoint_sha = "", name = "Tool loop lift (run_with_tool_loop helper for 8 vendors)" }
phase_1 = { status = "in_progress", checkpoint_sha = "", name = "Tool loop lift (run_with_tool_loop helper for 8 vendors)" }
phase_2 = { status = "pending", checkpoint_sha = "", name = "PROVIDERS move (out of src/models.py)" }
phase_3 = { status = "pending", checkpoint_sha = "", name = "UX adaptations 2-9 (8 of 9 deferred from parent Phase 5)" }
phase_4 = { status = "pending", checkpoint_sha = "", name = "Local-first + matrix v2 expansion (12 new fields)" }
@@ -21,7 +22,7 @@ phase_5 = { status = "pending", checkpoint_sha = "", name = "Anthropic/Gemini/De
[tasks]
# Phase 1: Tool loop lift
t1_1 = { status = "pending", commit_sha = "", description = "Read tool-loop patterns in _send_minimax + the 4 inline-loop vendors" }
t1_1 = { status = "in_progress", commit_sha = "", description = "Read tool-loop patterns in _send_minimax + the 4 inline-loop vendors" }
t1_2 = { status = "pending", commit_sha = "", description = "Design run_with_tool_loop helper signature" }
t1_3 = { status = "pending", commit_sha = "", description = "Red: 5 tests for run_with_tool_loop in tests/test_tool_loop.py" }
t1_4 = { status = "pending", commit_sha = "", description = "Green: implement run_with_tool_loop in src/ai_client.py" }