Fix spurious "short buffer" warnings during message decode#1223
Conversation
The non-trace decode path was missing the buf.remaining() < size guard that exists in the trace path. Without it, decode_msg would be called with an undersized take(size) buffer, produce DecodeError::Short, and log a warning — even though it's just normal incremental buffering. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe changes add bounds validation in the non-tracing code paths for message decoding across two modules. Before creating a limited buffer view with 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
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 |
Summary
lite/message.rsandietf/message.rswas missing abuf.remaining() < sizeearly-return guard that existed in the trace pathdecode_msgwas called with an undersizedtake(size)buffer, returnedDecodeError::Short, and logged a warning — even though theReadercorrectly handlesShortby buffering more data and retryingShortis returned silently (as expected), matching the trace path behaviorTest plan
cargo check -p moq-litepasses🤖 Generated with Claude Code