LocalStore::doAddToStore(): Check NAR size before NAR hash#510
Conversation
Size mismatch indicates issues like truncated files, whereas hash mismatch for the matching file size suggests data corruption.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughIn ChangesNAR integrity check ordering and test coverage
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
Looks good, thanks! Unfortunately our CI is currently broken for external PRs, so I've recreated this as #512. |
If the file size is wrong, the hash is almost certainly wrong. Checking the size first provides useful information that is not shown otherwise.
Size mismatch indicates issues like truncated files, whereas hash mismatch for the matching file size suggests data corruption. Reporting the correct condition helps troubleshoot the issue.
Summary by CodeRabbit
Bug Fixes
Tests