Conversation
84e9f33 to
5c20a7c
Compare
ff3b563 to
ff5f777
Compare
ff5f777 to
bbf7496
Compare
tests/sentry/notifications/platform/slack/renderers/test_seer.py
Outdated
Show resolved
Hide resolved
6d73b5f to
2d4edc2
Compare
2d4edc2 to
d99bc19
Compare
d99bc19 to
695913c
Compare
695913c to
3ff435b
Compare
…runs When a user clicks an autofix button, check if a run already exists for the group. If one is still processing, update the Slack message to reflect the current state instead of starting a duplicate run. Also distinguish completed vs in-progress stages in the UI and always show the issue link button. Refs ISWF-2090 Co-Authored-By: Claude <noreply@anthropic.com>
…lean Refactor the existing autofix state check to return the actual step dict rather than a has_complete_stage boolean. This simplifies the logic and prevents re-runs over Slack which cause confusing UX when messages can't be reliably edited. Also update completed text to indicate the stage has "already" been completed. Co-Authored-By: Claude <noreply@anthropic.com>
Also match root_cause_analysis_processing and solution_processing step keys when checking existing autofix state, and treat them as incomplete stages. Use None as the next() default to match the dict | None return type annotation. Co-Authored-By: Claude <noreply@anthropic.com>
ef2b28c to
d4636b2
Compare
Christinarlong
approved these changes
Feb 13, 2026
Contributor
Christinarlong
left a comment
There was a problem hiding this comment.
code makes sense, cursor comments look valid too
Comment on lines
+130
to
+162
| try: | ||
| existing_state = get_autofix_state( | ||
| group_id=group.id, organization_id=group.organization.id | ||
| ) | ||
| except Exception as e: | ||
| with SeerOperatorEventLifecycleMetric( | ||
| interaction_type=SeerOperatorInteractionType.ENTRYPOINT_ON_TRIGGER_AUTOFIX_ERROR, | ||
| entrypoint_key=self.entrypoint.key, | ||
| ).capture(): | ||
| self.entrypoint.on_trigger_autofix_error( | ||
| error="Encountered an error while talking to Seer" | ||
| ) | ||
| lifecycle.record_failure(failure_reason=e) | ||
| return | ||
| if existing_state: | ||
| stopping_point_step = get_stopping_point_status(stopping_point, existing_state) | ||
| lifecycle.add_extras( | ||
| { | ||
| "existing_run_id": str(existing_state.run_id), | ||
| "existing_run_status": str(existing_state.status), | ||
| } | ||
| ) | ||
| # For now, we don't support re-runs over slack -- it causes a confusing UX without | ||
| # reliably being able to edit messages. | ||
| if stopping_point_step: | ||
| with SeerOperatorEventLifecycleMetric( | ||
| interaction_type=SeerOperatorInteractionType.ENTRYPOINT_ON_TRIGGER_AUTOFIX_ALREADY_EXISTS, | ||
| entrypoint_key=self.entrypoint.key, | ||
| ).capture(): | ||
| self.entrypoint.on_trigger_autofix_already_exists( | ||
| state=existing_state, step_state=stopping_point_step | ||
| ) | ||
| return |
Contributor
There was a problem hiding this comment.
Dang I wonder if this could be some pipeline or someway to better separate out the state shifting nature.
Member
Author
There was a problem hiding this comment.
when it was 2 states (error, success) it felt okay, now we have 3, and i imagine it will only grow, so I'm actually very open to restructuring 💯 i would need to think it through some more though, maybe for the next milestone
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.
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.
Editing the messages has caused some issues, and we cannot set the 'is being automated' state with confidence since seer makes its own determination to change outgoing messages.
Instead, we'll just attach the green button if autofix is available and they have the feature, then if a run is in progress, let the user know. Will look into editing messages in a follow up, but this feels like a better UX.