diff --git a/go/internal/api/routes/zz_commit_conflict_gate_test.go b/go/internal/api/routes/zz_commit_conflict_gate_test.go index a26a12d..ae8a89c 100644 --- a/go/internal/api/routes/zz_commit_conflict_gate_test.go +++ b/go/internal/api/routes/zz_commit_conflict_gate_test.go @@ -166,6 +166,14 @@ type mockLLM struct { func newMockLLM() *mockLLM { m := &mockLLM{} m.server = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + // 2026-09-22 修:槽位探测(probeLLMSlots,GET /props)不是"蒸馏 LLM 调用", + // 不能计入 calls —— 否则 A/B 批次断言(期望 base+1)会被 flush 前后的 + // 两次探测撑成 base+3。根因:5e2cc63 引入并发槽位探测后,本 mock 未按 path 区分。 + if r.URL.Path == "/props" { + w.Header().Set("Content-Type", "application/json") + json.NewEncoder(w).Encode(map[string]any{"total_slots": 1}) + return + } atomic.AddInt32(&m.calls, 1) w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(map[string]any{