Skip to content

Conversation

@Mihir-Mavalankar
Copy link
Contributor

@Mihir-Mavalankar Mihir-Mavalankar self-assigned this Nov 19, 2025
@Mihir-Mavalankar Mihir-Mavalankar requested a review from a team as a code owner November 19, 2025 18:06
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 19, 2025
Comment on lines +317 to +325
with sentry_sdk.start_span(op="ai_summary.generate_fixability_score"):
issue_summary = _generate_fixability_score(group)

if not issue_summary.scores:
raise ValueError("Issue summary scores is None or empty.")
if issue_summary.scores.fixability_score is None:
raise ValueError("Issue summary fixability score is None.")

group.update(seer_fixability_score=issue_summary.scores.fixability_score)
Copy link

Choose a reason for hiding this comment

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

Bug: The _generate_fixability_score function is unconditionally called in _run_automation, causing redundant Seer API requests.
Severity: CRITICAL | Confidence: High

🔍 Detailed Analysis

The _generate_fixability_score function, which makes an expensive signed HTTP request to the Seer API, is now unconditionally called within _run_automation (lines 317-325). This occurs on every automation trigger, even if group.seer_fixability_score is already populated, leading to increased load on the Seer API, unnecessary latency, and reduced reliability. This regression likely caused canary deploy failures due to timeouts or rate limiting.

💡 Suggested Fix

Reintroduce a check within _run_automation to only call _generate_fixability_score if group.seer_fixability_score is None or if the source explicitly requires a fresh score, similar to the previous guarded logic.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/sentry/seer/autofix/issue_summary.py#L317-L325

Potential issue: The `_generate_fixability_score` function, which makes an expensive
signed HTTP request to the Seer API, is now unconditionally called within
`_run_automation` (lines 317-325). This occurs on every automation trigger, even if
`group.seer_fixability_score` is already populated, leading to increased load on the
Seer API, unnecessary latency, and reduced reliability. This regression likely caused
canary deploy failures due to timeouts or rate limiting.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference_id: 2817270

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.

2 participants