Skip to content

Conversation

@Mihir-Mavalankar
Copy link
Contributor

PR Details

@Mihir-Mavalankar Mihir-Mavalankar self-assigned this Nov 17, 2025
@Mihir-Mavalankar Mihir-Mavalankar requested a review from a team as a code owner November 17, 2025 21:17
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 17, 2025
Copy link
Member

@JoshFerge JoshFerge left a comment

Choose a reason for hiding this comment

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

please follow guidelines in our guide for naming pull requests please.

@Mihir-Mavalankar Mihir-Mavalankar changed the title first commit feat(triage signals): Remove fixability from run_automation to _generate_summary Nov 17, 2025
Comment on lines 308 to 318
if fixability_score is None:
with sentry_sdk.start_span(op="ai_summary.generate_fixability_score"):
fixability_response = _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.")
if not fixability_response.scores:
raise ValueError("Issue summary scores is None or empty.")
if fixability_response.scores.fixability_score is None:
raise ValueError("Issue summary fixability score is None.")

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

Choose a reason for hiding this comment

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

feels like this could be a helper as it's duplicate code.

and also, what if there's no summary generated? should that be part of the retry?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That check I will have in the job that triggers the direct call to run_automation.

Copy link
Member

Choose a reason for hiding this comment

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

oh i mean in that case we could also keep the fixability score check there too instead of putting the retry in here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So you mean remove it from run_automation and add it in the task at directly calls run_automation? I did think of that and there I think if issue summary doesn't exist I was just gonna call _generate_summary which would do all 3 generate_summary, generate fixability and start_autofix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or even just have a fixability check there.

Copy link
Member

Choose a reason for hiding this comment

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

I think either you should put a retry for both fixability and issue summary inside run_automation, or you should check the same thing in every place before you call run_automation.

The former might be cleaner long term but up to you

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No I don't think putting fixability and issue summary inside run_automation is a good idea. That function should just be to trigger automation.

Ideally, I don't even want this re-try in run_automation. Even in the new flow, run_automation will never be called without issue_summary running first so we will always have fixability. run_automation will fail only if the call to that fixability endpoint fails which is true even today.

Copy link
Contributor Author

@Mihir-Mavalankar Mihir-Mavalankar Nov 18, 2025

Choose a reason for hiding this comment

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

I'm rethinking the last commit, because we will always check if issue_summary is present before running automation and run issue summary (and hence fixability) if it's not present.
If issue_summary ran -> fixability exists (high degree of certainty). So I don't think we need a re-try in run_automation.

Copy link
Member

Choose a reason for hiding this comment

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

sure if you do the retry before calling run_automation, that works too

@getsentry getsentry deleted a comment from codecov bot Nov 18, 2025
@Mihir-Mavalankar Mihir-Mavalankar changed the title feat(triage signals): Remove fixability from run_automation to _generate_summary feat(triage signals): Remove fixability from run_automation and put into _generate_summary Nov 18, 2025
Copy link
Member

@jennmueng jennmueng left a comment

Choose a reason for hiding this comment

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

after reviewing the diagram and looking at the threads this makes sense to me, although not fully in context with the discussions this seems like it wouldn't break the current flow.

With fixability score of 0.80, the stopping point should be OPEN_PR (not CODE_CHANGES)
because 0.80 >= 0.78 (SUPER_HIGH threshold of 0.76 + 0.02 buffer).
@Mihir-Mavalankar Mihir-Mavalankar merged commit 699b63a into master Nov 19, 2025
66 checks passed
@Mihir-Mavalankar Mihir-Mavalankar deleted the extract-fixability-v2 branch November 19, 2025 16:47
@Mihir-Mavalankar Mihir-Mavalankar added the Trigger: Revert Add to a merged PR to revert it (skips CI) label Nov 19, 2025
@getsentry-bot
Copy link
Contributor

PR reverted: 0f2707e

getsentry-bot added a commit that referenced this pull request Nov 19, 2025
…nd put into _generate_summary (#103485)"

This reverts commit 699b63a.

Co-authored-by: Mihir-Mavalankar <[email protected]>
Mihir-Mavalankar added a commit that referenced this pull request Nov 20, 2025
…ged] (#103676)

## PR Details
+ I had to revert by last fixability
[PR](#103485). I am going to
address it separately after this PR - made a ticket for that:
https://linear.app/getsentry/issue/AIML-1650/address-fixability-issue-in-the-new-automation-flow
  + Also mentioned in the TODO comment
+ This PR just creates the new automation flow for triage signals behind
a feature flag.
+ Reference diagram:
https://miro.com/app/board/uXjVJqn1-fQ=/?focusWidget=3458764648325594380
+ Also make `run_automation` a public method now since we directly use
in a task.
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 Trigger: Revert Add to a merged PR to revert it (skips CI)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants