Reduce noisy Gemini batch failure warnings
build-push / docker (push) Successful in 4m2s

This commit is contained in:
AI Assistant
2026-03-17 13:38:46 +09:00
parent 4844394334
commit 6faff4d269
4 changed files with 73 additions and 3 deletions
+15
View File
@@ -213,3 +213,18 @@ func TestMergeRecommendationsExcludesIrrelevantAndPendingFiller(t *testing.T) {
t.Fatalf("unexpected merged result: %#v", merged)
}
}
func TestFilterHardGeminiErrorsIgnoresLowValueVisualFailures(t *testing.T) {
errs := []string{
"candidate thumbnail is low value",
"no candidate thumbnails or preview frames could be fetched for gemini vision",
"gemini vision JSON extraction failed: no complete JSON object found",
}
filtered := filterHardGeminiErrors(errs)
if len(filtered) != 1 {
t.Fatalf("expected only hard errors to remain, got %#v", filtered)
}
if !strings.Contains(filtered[0], "JSON extraction failed") {
t.Fatalf("unexpected filtered errors: %#v", filtered)
}
}