Repository navigation
chore: Isolate skill file normalization from layout handling - #1617
Conversation
Move the existing UTF-16 little-endian coverage into a focused fixture and characterize the remaining byte-normalization branches before extracting them from SkillInstallLayout. Cover single-byte carriage returns, UTF-16 big-endian content, non-text extensions, NUL-containing binary data, and the LF-only fast path without constraining allocation behavior.
Move text-extension policy, UTF-16 detection, and byte-level line-ending normalization from SkillInstallLayout into a focused SkillFileContentNormalizer. Update the two production callers and focused tests to reference the extracted class directly, leaving no compatibility wrapper or behavior change.
📝 WalkthroughWalkthroughThis PR extracts skill file line-ending normalization logic into a new ChangesSkill file content normalizer extraction
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Summary
User Impact
Changes
SkillFileContentNormalizerwithout changing their logic or names.SkillInstallLayoutinstead of leaving a compatibility wrapper.SkillInstallLayoutfrom 571 lines to 397 lines.Verification
SkillFileContentNormalizerTests: 6 passed.SkillInstallLayoutTests: 18 passed.ToolSkillSynchronizerTests: 52 passed.git diff --check.Compatibility
Deferred Review Finding