Grammar corrections now run through a deterministic guard that blocks protected glossary names/aliases from being changed

This commit is contained in:
2026-04-22 09:04:00 -05:00
parent e50124fa0d
commit 9afb5c5a4e
9 changed files with 238 additions and 5 deletions

View File

@@ -93,7 +93,9 @@ def test_grammar_prompt_limits_readability_corrections_and_protects_glossary():
assert "homophone fixes" in prompt_text
assert "spelling fixes" in prompt_text
assert "Do not paraphrase" in prompt_text
assert "protected vocabulary" in prompt_text
assert "glossary names and aliases as protected spellings" in prompt_text
assert "Do not autocorrect, Anglicize, replace, normalize, lowercase" in prompt_text
assert "Preserve canonical glossary capitalization" in prompt_text
assert "appears exactly once" in prompt_text
assert "Do not return speaker, start, or end fields" in prompt_text