Created from a Codex audit of grovedb. No code changes were made as part of the audit.
Summary
Direct delete of a non-empty child tree can reopen the parent path using the child tree’s tree_type.
Impact / failure scenario
Deleting under CountTree/sum/count-sum parents with allow_deleting_non_empty_trees=true can propagate aggregate/root metadata incorrectly.
References
grovedb/src/operations/delete/mod.rs:740
grovedb/src/operations/delete/mod.rs:750
grovedb/src/operations/delete/mod.rs:847
grovedb/src/operations/delete/mod.rs:880
Suggested fix
Reopen with the parent’s saved tree type or reuse the already-open parent subtree handle.
Suggested tests
Delete a non-empty child under an aggregate parent, then verify aggregate count/sum and verify_grovedb.
Created from a Codex audit of grovedb. No code changes were made as part of the audit.
Summary
Direct delete of a non-empty child tree can reopen the parent path using the child tree’s
tree_type.Impact / failure scenario
Deleting under
CountTree/sum/count-sum parents withallow_deleting_non_empty_trees=truecan propagate aggregate/root metadata incorrectly.References
grovedb/src/operations/delete/mod.rs:740grovedb/src/operations/delete/mod.rs:750grovedb/src/operations/delete/mod.rs:847grovedb/src/operations/delete/mod.rs:880Suggested fix
Reopen with the parent’s saved tree type or reuse the already-open parent subtree handle.
Suggested tests
Delete a non-empty child under an aggregate parent, then verify aggregate count/sum and
verify_grovedb.