e9b1138949
Tier 2 produced this analysis during phase2_4_5_call_site_completion_20260621 Phase 6e. Supersedes Tier 1's draft at PHASE3_HYPOTHETICAL_PROMOTION.md (kept as the hypothesis doc; this is the refined version with in-context data from Phase 6b/6d work in src/ai_client.py). Key findings: - Measured 104 history references (Tier 1 estimated 112; 7% under) - Anthropic dominates per-turn cost (~35-65µs vs Tier 1's 8-15µs estimate) - Grok/qwen/llama are LOWER than Tier 1 estimated (~400ns vs 2-8µs) - Total per-session: ~0.5-1.0ms (Tier 1 estimated 1.1-2.4ms) - Discovered 3 hidden cross-references Tier 1 missed (_strip_private_keys, _extract_minimax_reasoning, _send_llama_native) - Recommendations for the future Phase 3 track: anthropic first; use 'with h.lock: msg_list = h.messages' for read snapshots; use 'with h.lock: h.messages = [filtered]' for in-place mutations Covers all 6 senders (anthropic, deepseek, minimax, grok, qwen, llama) with per-site cost estimates + hidden cross-references + recommendations. The audit (code_path_audit_20260607) quantifies these estimates after merge.