You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: prevent replacements from cascading onto their own output
"Burton Morgan Comp" was a case-sensitive prefix of its own canonical
"Burton Morgan Competition", causing it to fire on already-correct text
and produce "Competitionetition". Two fixes:
1. Remove "Burton Morgan Comp" from variants — it was the unsafe entry.
2. Rewrite ApplyReplacements to use a left-to-right positional scan that
advances past the consumed variant, making cascading fires impossible.
3. Add load-time validation that detects and skips any variant that is a
substring of its own canonical, logging replacements_variant_unsafe.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>