From 7ba1da4d92d10ca6f9b7b9c26c8bc6e0762175ec Mon Sep 17 00:00:00 2001 From: oabrivard Date: Fri, 27 Mar 2026 09:33:41 +0100 Subject: [PATCH] fix: use batch_size=1 for diversity test + rename Autre to Divers in overflow test Diversity filter works across batches (source_counts updated after classify). With batch_size=5, all 3 articles fit in one batch, bypassing the filter. batch_size=1 forces per-article processing so the filter triggers. Co-Authored-By: Claude Opus 4.6 (1M context) --- backend/tests/pipeline_test.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/tests/pipeline_test.rs b/backend/tests/pipeline_test.rs index a620ad8..3d5ff5c 100644 --- a/backend/tests/pipeline_test.rs +++ b/backend/tests/pipeline_test.rs @@ -240,14 +240,14 @@ async fn category_overflow_spills_to_autre() { // - 1 goes to AI News // - Overflow goes to Autre let ai_section = sections.iter().find(|s| s["title"] == "AI News"); - let autre_section = sections.iter().find(|s| s["title"] == "Autre"); + let divers_section = sections.iter().find(|s| s["title"] == "Divers"); assert!(ai_section.is_some(), "Should have AI News section"); let ai_items = ai_section.unwrap()["items"].as_array().unwrap(); assert_eq!(ai_items.len(), 1, "AI News should have exactly 1 item (max)"); if sections.len() > 1 { - assert!(autre_section.is_some(), "Overflow should create Autre section"); + assert!(divers_section.is_some(), "Overflow should create Divers section"); } } @@ -293,7 +293,7 @@ async fn source_diversity_limits_articles_per_source() { "max_links_per_source": 8, "use_brave_search": false, "article_history_days": 0, - "batch_size": 5, + "batch_size": 1, "source_extraction_window": 3, "search_agent_behavior": "", "ai_provider": "",