fix(resolver): reject empty range rules - #495
Draft
Pybsama wants to merge 1 commit into
Draft
Conversation
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.
Why
The Rust resolver currently treats a range rule with neither a start nor an end
bound as matching every context value. That differs from the shared resolver
specification and the Java resolver, where an empty range is a normal
non-match.
The final boolean expression considered each absent bound automatically
satisfied, so an entirely empty rule evaluated to
true.What
falsewhen both range bounds are absent, while leaving all validone-sided, inclusive, and exclusive comparisons unchanged.
empty_range_ruleresolver spec so Rust now uses the sharedNO_SEGMENT_MATCHexpectation.Validation
expected RESOLVE_REASON_NO_SEGMENT_MATCH, got MATCHbefore the productionchange, then passed after the guard was added.
371 passed.
rustfmtand release Clippy on Rust 1.90.0.rustfmtand release Clippy forwasm32-unknown-unknownonRust 1.90.0.
output (SHA-256
2a51a26f8daba8d9ea5d66977ddec9a87b5b9ec049be6f9e13df16b02f7c945f).confidence/internal/local_resolverandconfidence/internal/flag_loggerboth passed.The repository-wide Go target also contains real-backend E2E cases. In an
unconfigured local environment those existing cases stop at a missing
ClientSecretor mock-support-server 404, so they are not reported as passinghere.
Compatibility
No protobuf, dependency, or public API changes. Empty ranges now match the
shared cross-language contract; ranges with at least one bound keep their
existing behavior.
Closes #296.