Skip to content

feat(seer): Add Autofix overview endpoint - #121747

Merged
NicoHinderling merged 2 commits into
masterfrom
feat/seer-autofix-overview-endpoint
Aug 11, 2026
Merged

feat(seer): Add Autofix overview endpoint#121747
NicoHinderling merged 2 commits into
masterfrom
feat/seer-autofix-overview-endpoint

Conversation

@NicoHinderling

@NicoHinderling NicoHinderling commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

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. feat(seer): Enrich Autofix overview pull requests with SCM status #121748 — SCM enrichment + endpoint wiring
  3. feat(seer): Add Autofix overview UI #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.

Add the Seer Autofix overview endpoint, 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 stubbed out behind NOTE markers and lands in a follow-up PR.
@NicoHinderling
NicoHinderling requested review from a team as code owners August 11, 2026 17:45
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 11, 2026
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Aug 11, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 59ced16. Configure here.

for run in runs_by_id.values():
if run.group_id not in latest_per_group:
latest_per_group[run.group_id] = run
return latest_per_group

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded run treated as latest

Medium Severity

_latest_run_per_group only considers runs that already have milestone rows, so a newer autofix run that has not reached root cause yet is invisible. The previous run is still returned as the group's latest, so the overview can show stale root cause or fix data after a re-run starts.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 59ced16. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a real concern... we are only concerned with runs that have milestones

@NicoHinderling
NicoHinderling merged commit b742da2 into master Aug 11, 2026
66 of 67 checks passed
@NicoHinderling
NicoHinderling deleted the feat/seer-autofix-overview-endpoint branch August 11, 2026 18:08
NicoHinderling added a commit that referenced this pull request Aug 11, 2026
…21748)

## 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:

- New `pull_request_status_batch` module extracts the shared batch
helpers (`get_checks_and_review` + provider resolution) out of the group
pull requests endpoint so both consumers share one implementation.
- Adds batched checks, review status, and changed-file enrichment.
GitHub file expansion is opt-in and keyed separately in the provider
cache, so existing status-only consumers are unaffected.
- Re-enables the pull-request serialization in the overview endpoint
that was stubbed behind `NOTE:` markers in #121747.

## Stack

1. #121747 — endpoint core
2. **This PR** — SCM enrichment + endpoint wiring
3. #121749 — frontend UI

## Test Plan

- Overview endpoint tests now cover pull requests, checks/review status,
changed files, merged-PR fetch skipping, and provider-failure
degradation.
- `test_group_pull_requests`, `test_client`, and
`test_pull_request_status` updated for the extracted batch module and
file expansion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants