TestEmptyReplyNudgeReArmsAfterProgress pins the galaxy1 fix: once an empty reply has nudged this turn, a round that issues a real tool call is genuine progress and must re-arm the latch, so a LATER transient empty on the same long turn earns its own re-prompt instead of hitting the leak-and-die bran
(t *testing.T)
| 3317 | round++ |
| 3318 | fmt.Fprintf(w, "data: %s\n\n", `{"choices":[{"delta":{},"finish_reason":"stop"}],"usage":{"completion_tokens":1}}`) |
| 3319 | fmt.Fprint(w, "data: [DONE]\n\n") |
| 3320 | } |
| 3321 | |
| 3322 | m := newTestModel(t, handler) |
| 3323 | final := drainFinal(t, m, "build it") |
| 3324 | |
| 3325 | if round != 2 { |
| 3326 | t.Fatalf("latch must bound re-prompts to one (want 2 requests total, got %d)", round) |
| 3327 | } |
| 3328 | scroll := stripANSI(final.scroll.String()) |
| 3329 | if !strings.Contains(scroll, "dropped the call") { |
| 3330 | t.Fatalf("a persistently-empty turn must surface a diagnostic, not die silently:\n%s", scroll) |
| 3331 | } |
| 3332 | if final.phase != phaseIdle { |
| 3333 | t.Fatalf("turn must end idle, phase=%v", final.phase) |
| 3334 | } |
| 3335 | } |
| 3336 |
nothing calls this directly
no test coverage detected