Repository navigation
fix(indexed-tree): close security invariant gaps - #773
Merged
QuantumExplorer merged 1 commit intoJul 28, 2026
Merged
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
QuantumExplorer
marked this pull request as ready for review
July 14, 2026 15:03
QuantumExplorer
force-pushed
the
codex/fix-indexed-tree-security
branch
from
July 27, 2026 12:14
bd6f09c to
4f213c4
Compare
This was referenced Sep 6, 2026
Closed
Open
Closed
QuantumExplorer
added a commit
that referenced
this pull request
Sep 7, 2026
…anup (#888) (#934) * fix(grovedb): sweep nested indexed secondaries in every recursive cleanup (#888) Recursive storage cleanup discovered nested subtrees via find_subtrees and cleared their primary namespaces, but a nested indexed-tree primary's per-axis secondary namespaces live at Blake3(prefix ‖ axis_tag) — outside the path-prefix walk — and were orphaned by: - full-batch DeleteTree cleanup, - partial-batch DeleteTree cleanup, - the batch cidx safe-subset overwrite cleanup, - the dedicated indexed-tree child overwrite. Prefixes are path-derived, so recreating the same path resurrected the stale secondary rows and broke primary-secondary agreement (reads named primary entries that no longer exist). Extract the direct delete's per-descendant sweep (which was already correct) into one shared routine, GroveDb::clear_subtree_storage_recursively, that clears every discovered subtree's primary namespace plus all three axis secondary namespaces, and use it from all six call sites (delete v0/v1 keep their exact cost sequence). Indexed trees are GROVE_V4-era and the sweep is idempotent on empty namespaces, matching the ungated precedent of the existing sweeps (#657/#732/#773). Co-Authored-By: Claude Fable 5 <[email protected]> * fix: preserve versioned batch cleanup costs --------- Co-authored-by: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root causes and fixes
BigSumTreeat the signed 64-bit boundary, and enforceNonCountedparent policy for specialized indexed subtrees.Validation
cargo test -p grovedb indexed_tree— 239 passedcargo test -p grovedb-merk insert_count_indexed_subtree— 6 passedcargo test -p grovedb-element indexed::sort_keys— 12 passedcargo clippy -p grovedb-element -p grovedb-merk -p grovedb -- -D warningscargo fmt --all -- --checkRebased and conflict-tested against feature commit
47cff3ad. This remains a security-hardening follow-up to #657 and intentionally targets its feature branch.