fix: drop 3-char-root meta fallback; rely on expanded ClaML map (Goal 1)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-18 18:15:21 +02:00
parent b53c4bfb71
commit 5305fb251e
2 changed files with 36 additions and 19 deletions
+10
View File
@@ -25,3 +25,13 @@ fn billable_only_filter_excludes_three_digit_v_codes() {
let res = p.suggest("Cholera", Mode::C, &f, 10);
assert!(res.suggestions.iter().all(|s| s.tags.billable && s.tags.valid));
}
#[test]
fn billable_only_keeps_diabetes_5th_digit_codes() {
let p = Pipeline::load(&cfg()).unwrap();
let f = Filter { billable_only: true, valid_only: true, chapters: None, exclude_exotic: false };
let res = p.suggest("Diabetes mellitus Typ 2", Mode::C, &f, 10);
assert!(res.suggestions.iter().any(|s| s.icd_code.starts_with("E11") && s.tags.billable),
"billable E11.x must survive --billable-only; got {:?}",
res.suggestions.iter().map(|s| (&s.icd_code, s.tags.billable)).collect::<Vec<_>>());
}