fix(planning): hasConflict only when scoreDelta strictly negative

Neutral suggestions (scoreDelta = 0) are not conflicts — they simply
don't improve variety. Changing scoreDelta <= 0 to scoreDelta < 0
lets empty-plan additions and quality-neutral swaps show without a
misleading ⚠ Variationskonflikt warning.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-09 12:47:41 +02:00
parent 1611ddabf6
commit 77cdccb26c
2 changed files with 6 additions and 6 deletions

View File

@@ -152,7 +152,7 @@ public class PlanningService {
double simulatedScore = simulateVarietyScore(
plan, candidate, slotDate, config, recentlyCookedIds);
double scoreDelta = simulatedScore - currentScore;
boolean hasConflict = scoreDelta <= 0;
boolean hasConflict = scoreDelta < 0;
return new SuggestionResponse.SuggestionItem(toSlotRecipe(candidate), scoreDelta, hasConflict);
})
.sorted((a, b) -> Double.compare(b.scoreDelta(), a.scoreDelta()))