Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/sentry/features/temporary.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,6 @@ def register_temporary_features(manager: FeatureManager) -> None:
manager.add("projects:relay-upload-endpoint", ProjectFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
# Enable supergroup RCA embedding generation from autofix explorer runs
manager.add("projects:supergroup-embeddings-explorer", ProjectFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
# Enable lightweight Explorer RCA runs for supergroup quality evaluation
manager.add("projects:supergroup-lightweight-rca", ProjectFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
# Enable lightweight RCA clustering write path (generate embeddings on new issues)
manager.add("organizations:supergroups-lightweight-rca-clustering-write", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
# Enable lightweight RCA clustering read path (query lightweight embeddings in supergroup APIs)
Expand Down
8 changes: 0 additions & 8 deletions src/sentry/seer/autofix/issue_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
make_signed_seer_api_request,
make_summarize_issue_request,
)
from sentry.seer.supergroups.explorer_lightweight_rca import trigger_explorer_lightweight_rca
from sentry.services import eventstore
from sentry.services.eventstore.models import Event, GroupEvent
from sentry.tasks.base import instrumented_task
Expand Down Expand Up @@ -226,13 +225,6 @@ def _trigger_autofix_task(
run_id=None,
stopping_point=stopping_point,
)
try:
trigger_explorer_lightweight_rca(group)
except Exception:
logger.exception(
"explorer_lightweight_rca.trigger_error_in_trigger_autofix_task",
extra={"group_id": group_id},
)
else:
response = trigger_autofix(
group=group,
Expand Down
103 changes: 0 additions & 103 deletions src/sentry/seer/supergroups/explorer_lightweight_rca.py

This file was deleted.

80 changes: 0 additions & 80 deletions tests/sentry/seer/autofix/test_issue_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
_fetch_user_preference,
_get_event,
_get_stopping_point_from_fixability,
_trigger_autofix_task,
get_and_update_group_fixability_score,
get_automation_stopping_point,
get_issue_summary,
Expand Down Expand Up @@ -947,85 +946,6 @@ def test_skips_when_autofix_in_progress(
mock_trigger.assert_not_called()


@with_feature(
{
"organizations:gen-ai-features": True,
"organizations:seer-explorer": True,
"organizations:autofix-on-explorer": True,
}
)
class TestTriggerAutofixTaskLightweightRca(APITestCase, SnubaTestCase):
def setUp(self) -> None:
super().setUp()
self.group = self.create_group()
event_data = load_data("python")
self.event = self.store_event(data=event_data, project_id=self.project.id)

@patch("sentry.seer.autofix.issue_summary.trigger_explorer_lightweight_rca")
@patch("sentry.seer.autofix.issue_summary.trigger_autofix_explorer", return_value=42)
def test_lightweight_rca_called_on_explorer_path(
self,
mock_explorer,
mock_explorer_lightweight_rca,
):
"""trigger_explorer_lightweight_rca is called when the explorer path is taken"""
_trigger_autofix_task(
group_id=self.group.id,
event_id=self.event.event_id,
user_id=None,
auto_run_source="post_process",
)

mock_explorer.assert_called_once()
mock_explorer_lightweight_rca.assert_called_once_with(self.group)

@patch("sentry.seer.autofix.issue_summary.trigger_explorer_lightweight_rca")
@patch(
"sentry.seer.autofix.issue_summary.trigger_autofix", return_value=Mock(data={"run_id": 42})
)
def test_lightweight_rca_not_called_on_legacy_path(
self,
mock_autofix,
mock_explorer_lightweight_rca,
):
"""trigger_explorer_lightweight_rca is NOT called on the legacy autofix path"""
with self.feature(
{
"organizations:seer-explorer": False,
"organizations:autofix-on-explorer": False,
}
):
_trigger_autofix_task(
group_id=self.group.id,
event_id=self.event.event_id,
user_id=None,
auto_run_source="post_process",
)

mock_autofix.assert_called_once()
mock_explorer_lightweight_rca.assert_not_called()

@patch("sentry.seer.autofix.issue_summary.trigger_explorer_lightweight_rca")
@patch("sentry.seer.autofix.issue_summary.trigger_autofix_explorer", return_value=42)
def test_lightweight_rca_failure_does_not_block_explorer(
self,
mock_explorer,
mock_explorer_lightweight_rca,
):
"""Failure in trigger_explorer_lightweight_rca doesn't prevent the explorer autofix from completing"""
mock_explorer_lightweight_rca.side_effect = Exception("lightweight RCA failed")

_trigger_autofix_task(
group_id=self.group.id,
event_id=self.event.event_id,
user_id=None,
auto_run_source="post_process",
)

mock_explorer.assert_called_once()
mock_explorer_lightweight_rca.assert_called_once_with(self.group)


class TestFetchUserPreference:
@patch("sentry.seer.autofix.issue_summary.make_get_project_preference_request")
def test_fetch_user_preference_success(self, mock_request):
Expand Down
64 changes: 0 additions & 64 deletions tests/sentry/seer/supergroups/test_explorer_lightweight_rca.py

This file was deleted.

Loading