Added a validator to prevent changes that result in an empty or whitespace-only string

This commit is contained in:
2026-04-25 13:42:18 -05:00
parent 5944f13404
commit bf05d79fc6
9 changed files with 198 additions and 2 deletions

View File

@@ -131,18 +131,21 @@ def test_process_transcript_result_writes_report_and_preserves_skips_per_policy(
assert [validator["name"] for validator in result.report.modules[0].to_dict()["validators"]] == [
"proposal_confidence_guard",
"protected_glossary_guard",
"non_empty_segment_guard",
"spoken_form_plausibility_review",
"meaning_reversal_review",
]
assert [validator["name"] for validator in result.report.modules[3].to_dict()["validators"]] == [
"proposal_confidence_guard",
"protected_glossary_guard",
"non_empty_segment_guard",
"spoken_word_review",
"meaning_reversal_review",
]
assert [validator["name"] for validator in result.report.modules[4].to_dict()["validators"]] == [
"proposal_confidence_guard",
"protected_glossary_guard",
"non_empty_segment_guard",
"grammar_only_guard",
"meaning_reversal_review",
]
@@ -182,30 +185,35 @@ def test_default_module_specs_expose_final_validator_order():
assert [validator.name for validator in specs[0].module.validators()] == [
"proposal_confidence_guard",
"protected_glossary_guard",
"non_empty_segment_guard",
"spoken_form_plausibility_review",
"meaning_reversal_review",
]
assert [validator.name for validator in specs[1].module.validators()] == [
"proposal_confidence_guard",
"protected_glossary_guard",
"non_empty_segment_guard",
"spoken_form_plausibility_review",
"meaning_reversal_review",
]
assert [validator.name for validator in specs[2].module.validators()] == [
"proposal_confidence_guard",
"protected_glossary_guard",
"non_empty_segment_guard",
"spoken_form_plausibility_review",
"meaning_reversal_review",
]
assert [validator.name for validator in specs[3].module.validators()] == [
"proposal_confidence_guard",
"protected_glossary_guard",
"non_empty_segment_guard",
"spoken_word_review",
"meaning_reversal_review",
]
assert [validator.name for validator in specs[4].module.validators()] == [
"proposal_confidence_guard",
"protected_glossary_guard",
"non_empty_segment_guard",
"grammar_only_guard",
"meaning_reversal_review",
]