fix: use msgpack binary headers#13
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ 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. Review rate limit: 0/1 reviews remaining, refill in 34 minutes and 40 seconds.Comment |
|
Oh wow. How did i mess this up? Thank you. |
Summary
bin8/bin16/bin32headersUnpacker.readBinary()through the binary decoderBinarywrapper test exerciseBinaryinstead ofStringBug
The binary helpers were using MessagePack string headers (
fixstr/str8/str16/str32) instead of the binary header family (bin8/bin16/bin32). As a result,packBinary()produced values tagged as strings, andunpackBinary()could not read correctly tagged binary payloads from other MessagePack implementations.The public
Unpacker.readBinary()method had the same issue because it calledunpackString()instead ofunpackBinary(). The existing "Binary struct" test did not catch this because it accidentally encoded and decodedString, notBinary.This keeps decode compatibility for previously string-tagged binary bytes by continuing to accept string headers in
unpackBinaryHeader(), but new binary encodes now use the MessagePack binary tags.Tests
env PATH=/Users/banteg/.cache/zig/toolchains/zig-aarch64-macos-0.15.1:$PATH ./check.sh --ci