Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a correctness bug in get_split_prefixes_for_manifest() where prefix fragments produced by a split were prematurely classified as Single without being re-checked against the full overlap set, which could yield incorrect VpcdLookupResult decisions in multi-overlap scenarios.
Changes:
- Reworks prefix splitting to use a worklist so newly created fragments are re-evaluated against all overlap prefixes before being finalized.
- Adds a regression test covering splitting against two overlaps, plus small test cleanups via helper constructors.
b434739 to
9f53670
Compare
We have an issue in function get_split_prefixes_for_manifest(), because we do not match fragments resulting from a split against the remaining overlapping prefixes in the list. Add a test to illustrate the issue (the test was in part generated with Claude Opus 4.6): we'll fix it in a follow-up commit. Signed-off-by: Quentin Monnet <qmo@qmon.net>
We had a bug in function get_split_prefixes_for_manifest(): when splitting a prefix against some overlap prefix, we would immediately store all resulting fragments into the vector prefixes_with_vpcd, considering the one matching the overlap prefix as a MultipleMatches, the others as Single results. This is wrong, because the fragments associated to Single results can in fact still overlap with some over prefix in the overlaps list, and we need to compare them again. Fix the issue by re-inserting the resulting fragments into a stack, to later compare them with the overlap prefixes from the list. Fixes: 8691a71 ("feat(flow-filter): Split prefixes with partial overlap") Signed-off-by: Quentin Monnet <qmo@qmon.net>
9f53670 to
6d75ee8
Compare
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.
We had a bug in function
get_split_prefixes_for_manifest(): when splitting a prefix against some overlap prefix, we would immediately store all resulting fragments into the vectorprefixes_with_vpcd, considering the one matching the overlap prefix as aMultipleMatches, the others asSingleresults. This is wrong, because the fragments associated toSingleresults can in fact still overlap with some over prefix in theoverlapslist, and we need to compare them again. Fix the issue by re-inserting the resulting fragments into a queue, and comparing them with the overlap prefixes from the list.Fixes: 8691a71 ("feat(flow-filter): Split prefixes with partial overlap")