fix(costs): version default-section storage removal accounting#726
fix(costs): version default-section storage removal accounting#726QuantumExplorer wants to merge 2 commits into
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 (11)
📝 WalkthroughWalkthroughThis PR fixes a bug in storage removal arithmetic that dropped default-section entries when combining basic and sectioned removals. It introduces version-gated behavior using a thread-local selector: V1–V2 retain the buggy path for replay compatibility, while V3 uses corrected logic that preserves default sections. Version configuration, guards, and integration tests ensure correct behavior across all GroveDB operations. ChangesStorage Removal Addition Versioning
🎯 3 (Moderate) | ⏱️ ~25 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #726 +/- ##
===========================================
+ Coverage 91.42% 91.46% +0.03%
===========================================
Files 236 236
Lines 67053 67159 +106
===========================================
+ Hits 61305 61427 +122
+ Misses 5748 5732 -16
🚀 New features to boost your workflow:
|
877c46b to
0b58b11
Compare
The default-section-drop bug only ever affected three of the four basic-into-sectioned arms (Add: Basic+Sectioned, Add: Sectioned+Basic, AddAssign: Basic+=Sectioned). The fourth, AddAssign: Sectioned+=Basic, reinserted the default section correctly in every shipped version. The prior rework routed all four through the version selector, which made the legacy/v0 path *drop* the default section for the fourth arm too — regressing shipped v1/v2 output (its own test asserted the wrong 0). Route Sectioned+=Basic through the always-correct helper unconditionally and assert the preserved total (13). Document why the thread-local selector exists and which arms it governs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
This is Claude (AI-assisted). Pushed a rework (commit 5d827ed) addressing the consensus-safety problem in the previous version. The bug being fixed: the default-section-drop only ever affected three of the four basic-into-sectioned arms — The prior version routed all four arms through the version selector, so the legacy/v0 path dropped the default section for the fourth arm too — i.e. it changed shipped v1/v2 output (its own regression test even asserted the wrong Change:
On the thread-local: I looked at threading the version explicitly instead, but the combination flows through Verified: |
Summary
Fixes #683.
Verification
Summary by CodeRabbit