feat(seer): Enrich Autofix overview pull requests with SCM status - #121748
Merged
Conversation
Contributor
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.
Reviewed by Cursor Bugbot for commit de7d191. Configure here.
NicoHinderling
added a commit
that referenced
this pull request
Aug 11, 2026
## Summary
First of three stacked PRs splitting the Autofix overview feature.
Adds the Seer Autofix overview endpoint (`GET
/organizations/{org}/seer/autofix-overview/`), which groups an
organization's autofix runs by their furthest-reached milestone and
returns each run's root cause, proposed fix, and issue details.
Pull-request (SCM) enrichment — checks, review status, and changed files
— is intentionally stubbed out behind `NOTE:` markers in this PR and
re-enabled in the next PR in the stack, so this one stays a
self-contained backend change.
## Stack
1. **This PR** — endpoint core
2. #121748 — SCM enrichment + endpoint wiring
3. #121749 — frontend UI
## Test Plan
- New
`tests/sentry/seer/endpoints/test_organization_seer_autofix_overview.py`
covers milestone grouping, latest-run-per-group, project scoping,
deleted-group tolerance, nested issue object, stats-period filtering,
and per-milestone capping.
---------
Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
NicoHinderling
force-pushed
the
feat/seer-autofix-overview-scm
branch
from
August 11, 2026 18:11
de7d191 to
35b6a77
Compare
NicoHinderling
marked this pull request as draft
August 11, 2026 18:25
NicoHinderling
force-pushed
the
feat/seer-autofix-overview-scm
branch
from
August 11, 2026 19:58
59ba79f to
170ac30
Compare
NicoHinderling
commented
Aug 11, 2026
| from sentry.models.repository import Repository | ||
|
|
||
| logger = logging.getLogger(__name__) | ||
|
|
Contributor
Author
There was a problem hiding this comment.
much of the code from below as just pulled from group_pull_requests.py so it can be shared by that old usage + the seer_autofix_overview endpoint
NicoHinderling
marked this pull request as ready for review
August 11, 2026 20:23
NicoHinderling
force-pushed
the
feat/seer-autofix-overview-scm
branch
from
August 11, 2026 20:43
170ac30 to
25bbc1b
Compare
mtopo27
approved these changes
Aug 11, 2026
NicoHinderling
force-pushed
the
feat/seer-autofix-overview-scm
branch
from
August 11, 2026 21:12
25bbc1b to
8c1d39e
Compare
Add batched pull-request checks, review status, and changed-file enrichment, and wire it into the Seer Autofix overview endpoint so each run's pull requests carry their check/review state and file diffs. Extract the shared batch helpers (get_checks_and_review and provider resolution) out of the group pull requests endpoint into pull_request_status_batch so both consumers share one implementation. GitHub file expansion is opt-in and keyed separately in the provider cache so status-only consumers are unaffected. Harden the enrichment against bad data: wrap the repository-provider registry lookup in try/except KeyError (a stale `integrations:` provider would otherwise 500 the endpoint), skip pull requests whose key is non-numeric before batching so one bad row can't discard an integration's whole batch, and scope repository lookups to ObjectStatus.ACTIVE.
NicoHinderling
force-pushed
the
feat/seer-autofix-overview-scm
branch
from
August 11, 2026 21:22
8c1d39e to
cd591cf
Compare
3 tasks
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
Second of three stacked PRs for the Autofix overview feature. Stacked on #121747 — review/merge that first.
Adds pull-request SCM enrichment and wires it into the Autofix overview endpoint:
pull_request_status_batchmodule extracts the shared batch helpers (get_checks_and_review+ provider resolution) out of the group pull requests endpoint so both consumers share one implementation.NOTE:markers in feat(seer): Add Autofix overview endpoint #121747.Stack
Test Plan
test_group_pull_requests,test_client, andtest_pull_request_statusupdated for the extracted batch module and file expansion.