fix(merk): reject dangling multi-chunk ids#750
Conversation
|
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 (1)
📝 WalkthroughWalkthroughThis PR refactors multi-chunk ordering validation in the restore module by extracting inline checks into a dedicated ChangesMulti-chunk restore validation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #750 +/- ##
========================================
Coverage 91.43% 91.44%
========================================
Files 236 236
Lines 67111 67175 +64
========================================
+ Hits 61364 61428 +64
Misses 5747 5747
🚀 New features to boost your workflow:
|
|
✅ Review complete (commit b025e7b) |
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
Targeted, correct fix for issue #705: validate_multi_chunk runs before any restorer mutation and rejects both ordering violations and trailing dangling ChunkIds via the post-loop check. Two regression tests cover the reported failure modes, including a state-unchanged assertion. No in-scope issues found.
GitHub does not allow PastaClaw to approve their own PR, so this is posted as a COMMENT review rather than an APPROVE review.
No findings.
PR Body
Summary
ChunkOpordering before processing any chunks.ChunkId.valid chunk.
Fixes #705.
Validation
cargo fmt --allgit diff --checkcargo test -p grovedb-merk test_process_multi_chunk --libdashpay/grovedbupstream/developreview-fix-multi-chunk-dangling-idSummary by CodeRabbit
Tests
Refactor