Refactor validators into built-in registry chains

This commit is contained in:
2026-05-13 18:36:46 +00:00
parent 1bc5936681
commit d6126bf52b
21 changed files with 559 additions and 83 deletions

View File

@@ -148,9 +148,9 @@ func TestHomophonesModuleValidatorChain(t *testing.T) {
"no_effect",
"original_text_presence",
"confidence_threshold",
"protected_glossary_terms",
"non_empty_correction",
"spoken_form_plausibility_review",
"protected_terms",
"non_empty_corrected_text",
"spoken_form_plausibility",
"meaning_reversal_review",
}
if strings.Join(got, ",") != strings.Join(want, ",") {
@@ -276,13 +276,13 @@ func TestHomophonesProtectedGlossaryTermBehaviorRejectsUnsafeCorrection(t *testi
}
var protectedValidator contracts.Validator
for _, v := range module.Validators() {
if v.Name() == "protected_glossary_terms" {
if v.Name() == "protected_terms" {
protectedValidator = v
break
}
}
if protectedValidator == nil {
t.Fatal("expected protected_glossary_terms validator")
t.Fatal("expected protected_terms validator")
}
working := &schema.Transcript{Segments: []schema.Segment{