TestClearResetsFailureStreak: /clear starts the conversation over, including the repeated-failure backstop's counters.
(t *testing.T)
| 1933 | } |
| 1934 | } |
| 1935 | if final.failStreak != 1 { |
| 1936 | t.Fatalf("after distinct-target failures the streak should sit at 1, got %d", final.failStreak) |
| 1937 | } |
| 1938 | } |
| 1939 | |
| 1940 | // TestSubmitResetsFailureStreak: a fresh user submission is a new goal, so a |
| 1941 | // stale streak from the previous goal must not carry over and trip the nudge |
| 1942 | // early. submit's non-slash path zeroes failKey/failStreak. |
| 1943 | func TestSubmitResetsFailureStreak(t *testing.T) { |
| 1944 | m := newTestModel(t, func(w http.ResponseWriter, _ *http.Request) { |
| 1945 | fmt.Fprint(w, "data: "+`{"choices":[{"delta":{"content":"ok"}}]}`+"\n\n") |
| 1946 | fmt.Fprint(w, "data: [DONE]\n\n") |
| 1947 | }) |
| 1948 | m.failKey = tools.BashName + "|make build" |
nothing calls this directly
no test coverage detected