Repository navigation
Escape NUL bytes in white diff admin text. - #1
HyperSoWeak wants to merge 1 commit into
Conversation
NUL is valid UTF-8, so decoding with backslashreplace keeps it as-is. PostgreSQL rejects NUL in text columns, so writing the evaluation fails and EvaluationService retries it forever, leaving the testcase unscored. Escape it as \x00, consistent with how backslashreplace renders invalid bytes, so the admin can still see the difference.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
ChangesMismatch text escaping
Priority: ⬆️ High Estimated code review effort: 2 (Simple) | ~5 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to NULs in mismatch diagnostics are displayed as visible text, and no merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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 |
|
Superseded by cms-dev#1726. |
NUL is valid UTF-8, so
backslashreplaceleaves it as-is in the white diffadmin_text. PostgreSQL rejects NUL in text columns, so writing theevaluation fails, and EvaluationService retries it forever, leaving the
testcase unscored. Triggered by a contestant printing a NUL byte on a
mismatching line (e.g. uninitialized memory) in a Batch task with the
built-in diff.
The fix escapes NUL as
\x00instead of stripping it, so the differencestays visible.
Regression from b98e44b, not in any release. Similar to cms-dev#888. Hit this in
production during an exam.