TestEndTurnResetsVerifyNudged: the latch is per-turn, so endTurn must clear it or a later turn never re-grounds.
(t *testing.T)
| 2218 | fmt.Fprint(w, "data: {\"choices\":[{\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":{\"completion_tokens\":6}}\n\n") |
| 2219 | fmt.Fprint(w, "data: [DONE]\n\n") |
| 2220 | } |
| 2221 | |
| 2222 | m := newTestModel(t, handler) |
| 2223 | final := drainFinal(t, m, "build galaxy.html") |
| 2224 | |
| 2225 | // 8 tool rounds + a summary that gets re-prompted + the final summary = 10. |
| 2226 | if round != verifyNudgeMinRounds+2 { |
| 2227 | t.Fatalf("substantial finish must re-prompt exactly once (want %d requests, got %d)", verifyNudgeMinRounds+2, round) |
| 2228 | } |
| 2229 | var nudges int |
| 2230 | for _, msg := range final.history { |
| 2231 | if msg.Role == chmctx.RoleSystem && strings.Contains(msg.Content, "acceptance criteria") { |
nothing calls this directly
no test coverage detected