From b692b901d2129b149abcc0492cd493c099a7debb Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 29 Sep 2026 14:07:35 +0200 Subject: [PATCH] Mind::rank leaves the cursor to the door that already refused it The narrowed selection cleared a cursor that semantic_selection has already refused, and an empty cursor is no cursor to the evaluator; the mutation run showed the clear could be deleted with every test still green. A test pins that an empty cursor still ranks. Co-Authored-By: Claude Sonnet 5 --- crates/huginn-mind/src/query.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/huginn-mind/src/query.rs b/crates/huginn-mind/src/query.rs index a3d377b..87efa27 100644 --- a/crates/huginn-mind/src/query.rs +++ b/crates/huginn-mind/src/query.rs @@ -532,7 +532,7 @@ impl Mind { let mut evaluation = if keys.is_empty() { Evaluation { rows: Vec::new(), matched: 0, edges: Vec::new(), next_cursor: None } } else { - let narrowed = Selection { keys: Some(keys), limit: Some(LIMIT_MAX), cursor: None, ..selection.clone() }; + let narrowed = Selection { keys: Some(keys), limit: Some(LIMIT_MAX), ..selection.clone() }; select(&Vocabulary, &rows, &narrowed, head, self.cursor_key())? }; let score = |row: &SelectionRow| scores.get(row.key.as_str()).copied().unwrap_or(f32::NEG_INFINITY);