Fix modular duplicate detection to compare streams, not just boolean - #756
Open
fila43 wants to merge 2 commits into
Open
Fix modular duplicate detection to compare streams, not just boolean#756fila43 wants to merge 2 commits into
fila43 wants to merge 2 commits into
Conversation
fila43
force-pushed
the
modular
branch
2 times, most recently
from
August 15, 2026 15:59
1bc2edb to
14c71e7
Compare
_check_duplicate_tracker() used is_modular() which only returned a boolean, causing false duplicate matches between issues with different module streams (e.g. postgresql:16 vs postgresql:18). Extract parse_module_stream() into version_utils as a shared utility and use it in both jira.py (duplicate detection) and triage_agent.py (branch mapping), replacing the private _parse_module_summary wrapper. Also generalises MODULAR_SUMMARY_PREFIX to skip arbitrary tokens before the module:stream/ pattern instead of only optional CVE prefixes. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
jpodivin
approved these changes
Aug 17, 2026
jpodivin
left a comment
Collaborator
There was a problem hiding this comment.
I like this. Although couple more test cases for strings that should result in None return from parse_module_stream would be nice.
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.
Summary
_check_duplicate_tracker()previously usedis_modular()which only returned a boolean (modular vs non-modular). This caused false duplicate matches between issues with different module streams (e.g.postgresql:16vspostgresql:18). Replaced withparse_module_stream()which compares the full(module, stream)tuple.MODULAR_SUMMARY_PREFIXhad a CVE-specific optional prefix(?:CVE-\d{4}-\d+\s+)?that would fail on summaries with multiple CVEs or non-CVE prefixes. Replaced with generic(?:\S+\s+)*that skips any tokens before themodule:stream/pattern.parse_module_stream()utility: Extracted stream-parsing logic intoversion_utils.pyso bothjira.pyandtriage_agent.pyuse the same function.Supersedes the stream-comparison gap left by #743.
Test plan
parse_module_stream()including multi-CVE prefixpostgresql:16/postgis) completed successfullyMade with Cursor