drainFinal submits a prompt and pumps the whole turn to completion, returning the settled model. Centralises the submit+drain dance the empty-reply tests share.
(t *testing.T, m Model, prompt string)
| 3335 | } |
| 3336 | |
| 3337 | // TestEmptyReplyNudgeReArmsAfterProgress pins the galaxy1 fix: once an empty |
| 3338 | // reply has nudged this turn, a round that issues a real tool call is genuine |
| 3339 | // progress and must re-arm the latch, so a LATER transient empty on the same |
| 3340 | // long turn earns its own re-prompt instead of hitting the leak-and-die branch. |
| 3341 | // A flaky stream that drops the occasional call must not abandon a half-built |
| 3342 | // file. Two CONSECUTIVE empties (no tool call between) still terminate: that |
| 3343 | // path has pending=0 and so never reaches the re-arm. |
| 3344 | func TestEmptyReplyNudgeReArmsAfterProgress(t *testing.T) { |
| 3345 | m := newTestModel(t, func(http.ResponseWriter, *http.Request) {}) |
no test coverage detected