CodeTracked since May 19, 2026
Trim watcher subject truncation at UTF-8 boundaries
A single change in `firstLine()` fixes a correctness bug where slicing event subjects to `maxLen` could cut multibyte UTF-8 characters in half, writing invalid UTF-8 into `watcher_events.subject`; the function now backs up to the nearest valid boundary before storing subjects, with targeted tests added for UTF-8 edge cases (Cyrillic, em dash, emoji, and boundary alignment).
firstLine()UTF-8 boundary trimmingwatcher_events.subjectinternal/watcher/webhook.go