find_referenced_groups: Fixes-keyword ID list spans newlines, linking wrong issues as fixed
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
Research direction
Start in src/sentry/utils/groupreference.py with _fixes_re, then trace Commit.find_referenced_groups() and PullRequest.find_referenced_groups() to understand how extracted IDs become resolved references. Add coverage for a fixes keyword followed by a newline and verify that same-line lists such as “Fixes A-1, B-2” still work, with no narrative IDs treated as fixed.
Written by the indexing model from the issue text.
Description
_fixes_re in src/sentry/utils/groupreference.py:
_fixes_re = re.compile(
rf"\b{_fix_keywords}:?\s+([A-Za-z0-9_\-\s\,]+)\b",
re.I,
)
The \s inside the ID-list character class also matches newlines, so the match swallows every line after the keyword, and _short_id_re then pulls short-ID-shaped tokens out of narrative prose. For example:
Fixes SENTRY-1
Backported from OTHER-456 for the release branch
The IDs treated as fixed come out as ['SENTRY-1', 'OTHER-456'], when only SENTRY-1 was meant.
This matters because Commit.find_referenced_groups() and PullRequest.find_referenced_groups() feed the resolved_in_commit / resolved_in_pull_request receivers, which create GroupLink(relationship=resolves) records. A phantom ID that happens to resolve to a real group in the org can then get auto-resolved by a release containing that commit. The \s was clearly intended for same-line separators like Fixes A-1, B-2, not newlines.
(find_fix_statements, used by the Seer RPC path, works per-line and is not affected.)
Observed on master at bb47162e (2026-09-25).
- Dominant language
- Python
- Stars
- 45.7k
- Forks
- 5k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 642
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getsentry/sentry
-
Bug Component: Onboarding
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
getsentry/sentry#130405 · 1 comment ·
Maintainers usually reply within 1 day
-
Tag keys like os.name are auto-linked as domains in issue alert emailsPossibly taken @ashrafulX claimed this 6 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getsentry/sentry#129182 · 1 comment ·
Maintainers usually reply within 1 day
-
Cocoa replays hide Logs tab on supported SDK versionsPossibly taken @Brian-An claimed this 32 days ago. OpenBug Cocoa Replays
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
getsentry/sentry#124217 · 1 comment ·
Maintainers usually reply within 1 day
-
Product Area: Settings - Auth Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
getsentry/sentry#122437 · 6 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Incorrect Russian translation in django.poPossibly taken @nightcityblade claimed this 28 days ago. OpenBug Good First Issue Product Area: Settings - Integrations
Difficulty 1/5 Under an hour Newbie friendliness 90/100
getsentry/sentry#120651 · 3 comments ·
Maintainers usually reply within 1 day
All issues in getsentry/sentry
Similar issues
-
release
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
MichaelYcJo/SpecSeal#1535 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
valentinfrlch/ha-llmvision#769 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 75/100
daniel-ospina/tortoise#11937 · 1 comment ·
Maintainers usually reply within 1 day
-
good first issue help wanted python up-for-grabs
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
andrewsiah/agentswarm-data-tasks#238 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
cadence-workflow/cadence-ai-samples#175 ·
Maintainers usually reply within 1 day