-
-
Notifications
You must be signed in to change notification settings - Fork 166
fix: improve control image matching by sorting image paths and avoidi… #684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves control image matching by implementing a sorted matching strategy and preventing duplicate matches. The changes address issues #678 and #680 by ensuring that control images are correctly paired with their corresponding source images, particularly when image names share common prefixes.
- Sorts image paths by basename length (longest first) to prioritize more specific matches
- Pre-loads all control images into a set and removes them after matching to prevent duplicates
- Replaces glob-based matching with startswith filtering for more precise control
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Closes #678, ref #680.