Repository navigation
Make OverlayZipper's ascend_until and descend_until stop where the overlay does - #208
Merged
Adam-Vandervorst merged 1 commit intoDec 1, 2026
Conversation
…erlay does ascend_until and ascend_until_branch let each source ascend to its own nearest value or branch, and took the nearer stop. descend_until took the sources' stops the same way. But the overlay's trie is the union, with values from the mapping: - A branch formed by the union (one child in each source, a different byte) is a branch of the overlay. ascend_until climbed past it. - A source value the mapping filters out is not a value of the overlay. ascend_until and descend_until stopped at it. ascend_until / ascend_until_branch now climb a byte at a time and stop where the overlay branches or has a value. descend_until keeps the source-driven descent, which already stops at union branches, and carries on from a stop where the overlay has one child and no value. descend_until_max_bytes follows. This is the same reasoning as the descend_to_val fix in 7eed493.
imlvts
marked this pull request as ready for review
November 30, 2026 09:22
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.
ascend_until and ascend_until_branch let each source ascend to its own nearest value or branch, and took the nearer stop. descend_until took the sources' stops the same way. But the overlay's trie is the union, with values from the mapping:
ascend_until / ascend_until_branch now climb a byte at a time and stop where the overlay branches or has a value. descend_until keeps the source-driven descent, which already stops at union branches, and carries on from a stop where the overlay has one child and no value. descend_until_max_bytes follows. This is the same reasoning as the descend_to_val fix in 7eed493.