Skip to content

feat: add method to check non-NAMED part matching order in multi-part…#3176

Open
nsantacruz wants to merge 2 commits intomasterfrom
non-named-part-matches-in-order
Open

feat: add method to check non-NAMED part matching order in multi-part…#3176
nsantacruz wants to merge 2 commits intomasterfrom
non-named-part-matches-in-order

Conversation

@nsantacruz
Copy link
Copy Markdown
Contributor

This pull request introduces an additional validation step in the reference resolver logic to ensure that non-NAMED parts in multi-part reference matches maintain their input order relative to each other. This helps prevent incorrect matches where non-NAMED parts are reordered, improving the accuracy of reference resolution.

Reference resolution correctness:

  • Added non_named_part_matched_node_with_other_part_out_of_order static method to ResolvedRefPruner to check if non-NAMED parts in multi-part matches are reordered relative to input, returning True if such a case is detected.
  • Updated is_match_correct to return False if non-NAMED parts are matched out of order, enforcing stricter matching rules.

Testing:

  • Removed a test case in test_multiple_ambiguities that appears to be affected by the new stricter matching logic for part types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant