Repository navigation
Conversation
prune_path_internal started pruning wherever the node holding the focus was empty. That gave two wrong answers when a dangling path is held as an empty node: - A pruning remove at a focus that doesn't exist removed the dangling parent above it, because the missing focus is inside that empty node too. This happens below a stump a ZipperHead writer leaves, and below what an empty graft_masked_branches leaves. Below an ordinary dangling path the same remove does nothing, which is what the docs say: prune = true is the remove with prune = false followed by prune_path. - A dangling tip held as a link to an empty node wasn't pruned, because the node holding the link isn't empty. A ZipperHead leaves such a node at a leaf head root after splitting it off for a read zipper, so remove() left the location dangling. remove_val, remove_branches, remove_subtrie and remove_unmasked_branches now prune only when the focus exists on entry. prune_path_internal also starts at a valueless link to an empty node.
imlvts
marked this pull request as ready for review
November 30, 2026 20:38
imlvts
marked this pull request as draft
December 1, 2026 23:03
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.
prune_path_internal started pruning wherever the node holding the focus was empty. That gave two wrong answers when a dangling path is held as an empty node:
remove_val, remove_branches, remove_subtrie and remove_unmasked_branches now prune only when the focus exists on entry. prune_path_internal also starts at a valueless link to an empty node.