fix(channel): preserve UTF-8 across incremental event reads - #569
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe Core and CLI channel watchers now preserve UTF-8 characters that span incremental file-read boundaries. New tests verify correct reconstruction of the ChangesChannel watcher UTF-8 handling
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change preserves UTF-8 characters across incremental event reads and includes regression coverage for both watchers. No actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
The Core and CLI channel watchers decoded each appended buffer independently. A read boundary inside a multibyte UTF-8 character therefore produced replacement characters while leaving the JSON event parseable.
Change
Keep a streaming
StringDecoderin each watcher's read state, reset it when the event file disappears or truncates, and cover both live implementations with split-byte regression tests.Verification
pnpm lintpnpm typecheckgit diff --checkCloses #568.
Summary by CodeRabbit
Bug Fixes
Tests