fix: preserve original pattern in matchers for consistent matching and generation#2337
Merged
joelrosario merged 4 commits intomainfrom Mar 16, 2026
Merged
fix: preserve original pattern in matchers for consistent matching and generation#2337joelrosario merged 4 commits intomainfrom
joelrosario merged 4 commits intomainfrom
Conversation
Summary
|
…ad which makes of the original pattern to build the pattern based off the matcher
86e607a to
6245661
Compare
…n is retained in the pattern generated from matcher
9bb7f0f to
d0c2067
Compare
…ex is invalid for provided basePattern
d0c2067 to
6218cad
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.
Reason for change -
Matchers did not retain enough information about the original pattern when trying to derive a pattern from them.
With this change, each matcher derives a concrete pattern from its own kind using the original pattern, so the same pattern can be used consistently for both matching and generation of values.
Trigger for change -
RegexMatcher was supported on the test side, but it did not behave correctly on the mock side.
Investigation showed that the pattern being derived from RegexMatcher was incorrect, which caused mock-side handling to fail.