Skip to content

Add placeholder collision validation#13

Merged
jserv merged 1 commit intomainfrom
placeholder
Feb 11, 2026
Merged

Add placeholder collision validation#13
jserv merged 1 commit intomainfrom
placeholder

Conversation

@jserv
Copy link
Copy Markdown
Owner

@jserv jserv commented Feb 11, 2026

This strips \u{FEFF} from input before extraction to prevent silent data corruption when user text contains placeholder-like sequences. Placeholders use \u{FEFF}cjk...\u{FEFF} as delimiters; any \u{FEFF} in user input (BOM, adversarial) would cause restore_preserved() to replace user content with placeholder originals.

Since \u{FEFF} is an invisible zero-width character with no semantic value in CJK prompt text, stripping is safe and eliminates the entire collision class.

This strips \u{FEFF} from input before extraction to prevent silent data
corruption when user text contains placeholder-like sequences.
Placeholders use \u{FEFF}cjk...\u{FEFF} as delimiters; any \u{FEFF} in
user input (BOM, adversarial) would cause restore_preserved() to replace
user content with placeholder originals.

Since \u{FEFF} is an invisible zero-width character with no semantic
value in CJK prompt text, stripping is safe and eliminates the entire
collision class.
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.48%. Comparing base (ccfbe23) to head (9ee3fae).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/translator.rs 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #13      +/-   ##
==========================================
+ Coverage   68.24%   68.48%   +0.24%     
==========================================
  Files          11       11              
  Lines         762      768       +6     
==========================================
+ Hits          520      526       +6     
  Misses        242      242              
Flag Coverage Δ
unittests 68.48% <80.00%> (+0.24%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/preserver.rs 98.86% <100.00%> (+0.08%) ⬆️
src/translator.rs 44.71% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jserv jserv merged commit 2616bee into main Feb 11, 2026
7 checks passed
@jserv jserv deleted the placeholder branch February 11, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant