Simplify string normalization - don't convert numeric strings to numbers #46
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.
Summary
extract_string_compared_variablesmechanism in favor of this simpler approachWhat was the issue?
device.appBuildString == "5690201"was returningfalseeven whendevice.appBuildStringwas the string"5690201". The previous fix tried to selectively skip normalization usingextract_string_compared_variables, but this was complex and had edge cases.The fix
Instead of selective normalization, we now simply don't convert numeric strings to numbers. Quoted strings stay as strings - if users want a number, they write it without quotes.
Test plan
cargo test --lib- all 107 tests passdevice.appBuildString == "5690201"returnstruewhen variable is string"5690201"device.appVersionPadded > "007.003.001")🤖 Generated with Claude Code