From 492f8358a314df156722818e5ba0a7f90a5d6acc Mon Sep 17 00:00:00 2001 From: Weksa Date: Sat, 14 Nov 2026 02:44:19 +0000 Subject: [PATCH 1/2] Delete dead U+0130 arm in fold_variant; tighten two cut-B test pins Co-Authored-By: Claude Sonnet 5.5 --- crates/weksa/src/store.rs | 6 +++--- crates/weksa/tests/mutants_b.rs | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/crates/weksa/src/store.rs b/crates/weksa/src/store.rs index 9c95e70..340154b 100644 --- a/crates/weksa/src/store.rs +++ b/crates/weksa/src/store.rs @@ -490,13 +490,13 @@ pub(crate) fn normalized(text: &str) -> String { } /// The one-to-one folds `normalized` adds to NFKC and case folding, applied -/// before the case fold (U+0130 would otherwise fold to i plus a combining dot, -/// which the key keeps as a mark). +/// before the case fold. (U+0130 needs no arm: it folds to i plus a combining +/// dot, and the dot is dropped when the NFKC split reaches the filter in +/// `normalized`, so the key is plain `i`.) fn fold_variant(c: char) -> impl Iterator { let one = |c: char| (c, None); let (first, second) = match c { '\u{131}' => one('i'), - '\u{130}' => one('I'), // Voiced katakana wa, wi, we, wo: the hiragana (U+308F-3092) plus the // combining voiced mark, which is how NFKC spells the hiragana forms. '\u{30f7}'..='\u{30fa}' => ( diff --git a/crates/weksa/tests/mutants_b.rs b/crates/weksa/tests/mutants_b.rs index 9d932e3..89830a6 100644 --- a/crates/weksa/tests/mutants_b.rs +++ b/crates/weksa/tests/mutants_b.rs @@ -78,7 +78,7 @@ fn a_pronunciation_keeps_at_most_eight_rejected_variants() { } #[test] -fn an_ontology_entry_read_at_an_unknown_revision_is_refused_once_per_condition() { +fn an_ontology_entry_read_at_an_unknown_revision_is_refused_with_one_refusal() { let w = world(); let mut onto = OntologyStore::open(&w.dir.path().join("o2.cc")).unwrap(); let entry = OntologyEntry { @@ -292,5 +292,6 @@ fn relower_refuses_malformed_arm_and_floor_labels_before_reading_the_run() { } // Well-formed, distinct labels get past the label check (to the missing run). let o = relower("a", &["b", "c"]); - assert!(!out(&o).contains("arm and floor labels"), "{}", out(&o)); + assert!(!o.status.success()); + assert!(out(&o).contains("the root holds no run"), "{}", out(&o)); } -- 2.47.3 From f5c266c121e743e0f2287aa2236d4bb51e53dae9 Mon Sep 17 00:00:00 2001 From: Weksa Date: Sat, 14 Nov 2026 03:05:06 +0000 Subject: [PATCH 2/2] Correct fold_variant doc: the dotless loop drops the U+0307 after i Co-Authored-By: Claude Sonnet 5.5 --- crates/weksa/src/store.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/weksa/src/store.rs b/crates/weksa/src/store.rs index 340154b..e942a66 100644 --- a/crates/weksa/src/store.rs +++ b/crates/weksa/src/store.rs @@ -491,8 +491,8 @@ pub(crate) fn normalized(text: &str) -> String { /// The one-to-one folds `normalized` adds to NFKC and case folding, applied /// before the case fold. (U+0130 needs no arm: it folds to i plus a combining -/// dot, and the dot is dropped when the NFKC split reaches the filter in -/// `normalized`, so the key is plain `i`.) +/// dot, and the `dotless` loop in `normalized` drops that dot after an `i`, so +/// the key is plain `i`.) fn fold_variant(c: char) -> impl Iterator { let one = |c: char| (c, None); let (first, second) = match c { -- 2.47.3