Skip to content

feat(seer): Add autofix RCA feature#120099

Draft
rbro112 wants to merge 1 commit into
masterfrom
ryan/07-20-feat_seer_add_autofix_rca_feature
Draft

feat(seer): Add autofix RCA feature#120099
rbro112 wants to merge 1 commit into
masterfrom
ryan/07-20-feat_seer_add_autofix_rca_feature

Conversation

@rbro112

@rbro112 rbro112 commented Jul 20, 2026

Copy link
Copy Markdown
Member

Adds a new autofix_rca feature which will route RCA to run in Seer (corresponding Seer PR: https://github.com/getsentry/seer/pull/7294).

This will allow RCA (and future autofix-related steps) to live in Seer where we can properly run evals on them. Wireup of this in the existing autofix flow is in the stacked PR (#120100)

rbro112 commented Jul 20, 2026

Copy link
Copy Markdown
Member Author

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jul 20, 2026
@rbro112
rbro112 changed the base branch from master to graphite-base/120099 July 20, 2026 18:08
@rbro112
rbro112 force-pushed the ryan/07-20-feat_seer_add_autofix_rca_feature branch from 1f5c567 to 8cc9ed4 Compare July 20, 2026 18:08
@rbro112
rbro112 force-pushed the graphite-base/120099 branch from 3aa724c to 794ea20 Compare July 20, 2026 18:08
@rbro112
rbro112 changed the base branch from graphite-base/120099 to ryan/07-20-register_autofix-rca-in-seer_feature July 20, 2026 18:08
@sentry

sentry Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
0 0 0 0 451 0 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

@rbro112
rbro112 force-pushed the ryan/07-20-register_autofix-rca-in-seer_feature branch from 794ea20 to 9a16143 Compare July 20, 2026 18:18
Base automatically changed from ryan/07-20-register_autofix-rca-in-seer_feature to master July 20, 2026 18:36
@rbro112
rbro112 force-pushed the ryan/07-20-feat_seer_add_autofix_rca_feature branch from 8cc9ed4 to 117fb46 Compare July 20, 2026 18:59
@rbro112 rbro112 changed the title feat(seer): add autofix RCA feature feat(seer): Add autofix RCA feature Jul 20, 2026
@rbro112
rbro112 force-pushed the ryan/07-20-feat_seer_add_autofix_rca_feature branch from 117fb46 to 7078af9 Compare July 22, 2026 22:59
Add the autofix_rca feature package (payload/result models, dispatch via
SeerAgentClient.start_feature_run, and the delivery handler that hooks a
completed root cause back into the existing autofix webhooks/analytics), and
register it in the feature-delivery registry. Extract the shared step
started/completed webhook+analytics helpers in autofix_agent so the delivery
handler can reuse them.

Not yet wired into any trigger path; that follows in the next PR.
@rbro112
rbro112 force-pushed the ryan/07-20-feat_seer_add_autofix_rca_feature branch from 7078af9 to 8c359d4 Compare July 23, 2026 01:02
Comment on lines +59 to +62
# Match trigger_autofix_agent: a new run consumes Seer autofix budget.
quotas.backend.record_seer_run(
group.organization.id, group.project.id, DataCategory.SEER_AUTOFIX
)

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.

Autofix RCA dispatch records paid Seer usage without checking quota

trigger_autofix_rca_feature always record_seer_runs a SEER_AUTOFIX charge but never calls check_seer_quota, so runs can start after the org has exhausted paid autofix budget. Add the same pre-flight quota check used by trigger_autofix_agent and raise when over budget.

Evidence
  • trigger_autofix_rca_feature creates a Seer feature run then calls quotas.backend.record_seer_run(..., DataCategory.SEER_AUTOFIX) with no preceding check_seer_quota.
  • The parallel path in trigger_autofix_agent blocks new runs with check_seer_quota(..., DataCategory.SEER_AUTOFIX) and raises NoSeerQuotaException before starting or recording usage.
  • The dispatch comment states it should match that billing behavior, but only the record half is implemented.
  • Nothing else in this function rate-limits or gates paid Seer autofix capacity before start_feature_run.

Identified by Warden security-review · 3SY-AV2

payload=payload,
agent_run_options=self._build_agent_run_options(),
agent_run_options=agent_run_options,
# Seer's feature runner reads this top-level flag; mirror what

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Remove

feature_id: str
payload: dict[str, Any]
agent_run_options: NotRequired[dict[str, Any]]
# Top-level context-engine flag Seer's feature runner reads

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Remove

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant