Repository navigation
fix(review): resolve full ticket IDs despite shared numeric suffixes - #5167
Merged
IsmaelMartinez merged 1 commit intoNov 26, 2026
Conversation
Chunked reviews can report the same linked ticket by its URL or by its tracker key. Numeric suffix collisions prevent distinct full keys from resolving, leaving duplicate compliance entries with split requirements and potentially unusable ticket links. Index the supplied named IDs separately from numeric references, resolving only unambiguous keys. This also handles IDs whose canonical Linear URLs end in title slugs without weakening the existing URL identity or numeric ambiguity checks. Cover shared suffixes, cross-tracker key collisions, repeated ticket records, and hash-prefixed numeric IDs.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the chunked ticket-resolution changes.
No open issues 🎉
What changed in this PR
This PR extends chunked /review ticket merging so distinct full tracker keys resolve to canonical URLs even when they share a numeric suffix, building on #4139 and #4662.
Changes:
- Index named ticket IDs separately for case-insensitive resolution, including Linear URLs with title slugs.
- Keep ambiguous keys unresolved while accepting repeated records for the same URL.
- Add regression coverage for shared suffixes, mixed-case keys, cross-tracker ambiguity, and hash-prefixed numeric IDs.
| File | Description |
|---|---|
tests/unittest/test_review_chunk_merge.py |
Adds full-key resolution and ambiguity regression cases. |
pr_agent/algo/review_merge.py |
Adds a full-key index and uses it during canonical ticket URL resolution. |
Review effort: Balanced
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
⚙️ Agent run details
|
PR Code Suggestions ✨No code suggestions found for the PR. ⚙️ Agent run details
|
IsmaelMartinez
approved these changes
Nov 26, 2026
IsmaelMartinez
left a comment
Collaborator
There was a problem hiding this comment.
Thanks, full ticket keys now resolve correctly when numbers collide, and the ambiguous cases stay unresolved.
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.
User description
Problem
Chunked
/reviewresults can refer to the same linked ticket by its full URL in one chunk and its tracker key in another. If two tickets share a numeric suffix (e.g.ABC-12andXYZ-12), the existing ambiguity guard prevents resolving even these distinct full keys.This splits compliance requirements across duplicate entries, can produce inconsistent compliance verdicts, and may leave ticket links pointing to bare identifiers. Linear URLs with title slugs also cannot reliably be resolved by comparing the identifier with the last URL segment.
Changes
ticket_idvalues separately from numeric references, allowing unique full keys to resolve case-insensitively to their canonical URLs.This extends #4139 and #4662 without changing ticket retrieval, prompts, configuration, or provider APIs.
Regression coverage
Added cases for shared numeric suffixes across Jira and Linear, mixed-case keys, named IDs resolving to slugged Linear URLs, ambiguous cross-tracker keys, repeated ticket records, and hash-prefixed numeric IDs.
PR Type
Bug fix, Tests
Description
Resolve full ticket keys despite shared numbers.
Support case-insensitive keys and slugged Linear URLs.
Preserve ambiguous keys and numeric collision safeguards.
Add regression coverage for ticket resolution.
Diagram Walkthrough
File Walkthrough
review_merge.py
Resolve named ticket keys independently of numeric suffixespr_agent/algo/review_merge.py
ticket_idvalues case-insensitively,independently of numeric suffixes.
URLs.
repeated identical records.
resolution safeguards.
test_review_chunk_merge.py
Cover named ticket resolution and ambiguity safeguardstests/unittest/test_review_chunk_merge.py
across Jira and Linear.
records still resolve.
⚙️ Agent run details