Repository navigation
feat(seer): Put the repos an issue's stack trace points at first for Autofix - #130856
Conversation
Part of the Seer token-based billing work. Token-billed orgs don't pick repos in Seer settings, Seer just uses whatever repos are linked to the project. Some projects have dozens of linked repos, almost all of them auto-linked from events, and Seer got every one in no particular order. Sort them so repos a person linked come first, and when the list goes to Seer keep all of those but only fill up to 8 with auto-linked ones. Settings still show every repo. Refs CW-2261
…Autofix Part of the Seer token-based billing work. Token-billed orgs don't pick repos in Seer settings, Seer just uses whatever repos are linked to the project. When a project has more linked repos than the limit, the limit kept the first 8 auto-linked ones with no idea which the issue needs. For Autofix runs on an issue, use the project's code mappings to find the repos the event's in-app frames belong to, put those first and never cut them. Refs CW-2261
Sentry Snapshot Testing
|
…vent-order # Conflicts: # src/sentry/seer/agent/client_utils.py # src/sentry/seer/autofix/autofix_agent.py # src/sentry/seer/autofix/utils.py # tests/sentry/seer/autofix/test_autofix_utils.py
Match frames with get_sorted_code_mapping_configs, the same order stack trace links use, so there's one rule for which code mapping wins.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5a94b69. Configure here.
| is not None | ||
| ): | ||
| matched_ids.add(code_mapping.project_repository_id) | ||
| break |
There was a problem hiding this comment.
Catch-all mapping hides the specific repo
Medium Severity
get_sorted_code_mapping_configs puts user-generated mappings first, including catch-alls with an empty stack_root. The new loop then takes the first successful path conversion and breaks, so a user catch-all matches every in-app frame and the more specific auto-generated mapping is never considered. Autofix then prioritizes the catch-all repo (often already protected from the limit) and can still drop the repo the stack trace actually points at.
Reviewed by Cursor Bugbot for commit 5a94b69. Configure here.


Part of the Seer token-based billing work. Token-billed orgs don't pick repos in Seer settings, Seer just uses whatever repos are linked to the project.
When a project has more linked repos than the limit, the limit kept the first 8 auto-linked ones with no idea which the issue needs. For Autofix runs on an issue, use the project's code mappings to find the repos the event's in-app frames belong to, put those first and never cut them.
Refs CW-2261