From 4bf29ca16af782f328c51e834299dce8575b7ecc Mon Sep 17 00:00:00 2001 From: Eureka Hands Date: Sat, 7 Nov 2026 00:01:51 +0000 Subject: [PATCH] thought: four candidates are valid, pinned Co-Authored-By: Claude Sonnet 5.5 --- crates/eureka-pipeline/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/eureka-pipeline/src/lib.rs b/crates/eureka-pipeline/src/lib.rs index e514f8d..ecb8813 100644 --- a/crates/eureka-pipeline/src/lib.rs +++ b/crates/eureka-pipeline/src/lib.rs @@ -2062,6 +2062,11 @@ mod tests { assert_eq!(validated(&|thought| { thought.chosen = 1; thought.text = thought.candidates[1].0.as_str().into(); }), Ok(())); assert_eq!(validated(&|thought| { thought.candidates.truncate(1); thought.nearest_permille.truncate(1); }), Ok(())); assert_eq!(validated(&|thought| thought.nearest_permille[0] = 1000), Ok(()), "1000 means no earlier thought"); + let four = |thought: &mut PipelineThought| { + thought.candidates = vec![thought.text.0.as_str().into(); 4]; + thought.nearest_permille = vec![0; 4]; + }; + assert_eq!(validated(&four), Ok(()), "four candidates are the most there may be"); for (change, field) in [ (&(|thought: &mut PipelineThought| { thought.text = " \n".into(); thought.candidates[0] = " \n".into(); }) as &dyn Fn(&mut PipelineThought), "thought.text"), (&|thought: &mut PipelineThought| thought.text = "Another thing entirely.".into(), "thought.text"),