From 2f16c7a8a0bba2cf68225ef81312e3c095731414 Mon Sep 17 00:00:00 2001 From: Tony Xiao Date: Fri, 27 Mar 2026 14:28:45 -0400 Subject: [PATCH 1/3] chore(autofix): Remove unneeded seat based seer check This check already exists on the frontend, no need to check it twice. This also lets us use to for non seat based seer plans. --- .../seer/endpoints/group_autofix_setup_check.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/sentry/seer/endpoints/group_autofix_setup_check.py b/src/sentry/seer/endpoints/group_autofix_setup_check.py index 569f0a323b2d04..c54e313341c800 100644 --- a/src/sentry/seer/endpoints/group_autofix_setup_check.py +++ b/src/sentry/seer/endpoints/group_autofix_setup_check.py @@ -23,7 +23,6 @@ from sentry.seer.autofix.utils import ( get_autofix_repos_from_project_code_mappings, has_project_connected_repos, - is_seer_seat_based_tier_enabled, ) from sentry.seer.constants import SEER_SUPPORTED_SCM_PROVIDERS from sentry.seer.models import SeerApiError @@ -151,11 +150,9 @@ def get(self, request: Request, group: Group) -> Response: org_id=org.id, data_category=DataCategory.SEER_AUTOFIX ) - seer_seat_based_tier_enabled = is_seer_seat_based_tier_enabled(org) - seer_repos_linked = False # Check if org has github integration and is on seat-based tier. - if integration_check is None and seer_seat_based_tier_enabled: + if integration_check is None: try: # Check if project has repos linked in Seer. # Skip cache to ensure latest data from Seer API. @@ -168,12 +165,11 @@ def get(self, request: Request, group: Group) -> Response: autofix_enabled = False autofix_automation_tuning = group.project.get_option("sentry:autofix_automation_tuning") - if seer_seat_based_tier_enabled: - if ( - autofix_automation_tuning - and autofix_automation_tuning != AutofixAutomationTuningSettings.OFF - ): - autofix_enabled = True + if ( + autofix_automation_tuning + and autofix_automation_tuning != AutofixAutomationTuningSettings.OFF + ): + autofix_enabled = True return Response( { From 148e16d1bd11957b99f56747842877787d9557ec Mon Sep 17 00:00:00 2001 From: Tony Xiao Date: Fri, 27 Mar 2026 15:15:53 -0400 Subject: [PATCH 2/3] fix tests --- .../sentry/seer/endpoints/test_group_autofix_setup_check.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/sentry/seer/endpoints/test_group_autofix_setup_check.py b/tests/sentry/seer/endpoints/test_group_autofix_setup_check.py index 817525e5d716ae..49d6b5273a47e0 100644 --- a/tests/sentry/seer/endpoints/test_group_autofix_setup_check.py +++ b/tests/sentry/seer/endpoints/test_group_autofix_setup_check.py @@ -281,7 +281,11 @@ def test_autofix_automation_tuning_non_seat_based(self) -> None: response = self.client.get(url, format="json") assert response.status_code == 200 - assert response.data["autofixEnabled"] is False + if setting is None or setting == AutofixAutomationTuningSettings.OFF: + expected = False + else: + expected = True + assert response.data["autofixEnabled"] is expected def test_autofix_automation_tuning_off(self) -> None: self._set_seat_based_tier_cache(True) From cd7086b1c2f75dadaa378762b4040d9b9f94e497 Mon Sep 17 00:00:00 2001 From: Tony Xiao Date: Fri, 27 Mar 2026 15:17:11 -0400 Subject: [PATCH 3/3] fix tests --- tests/sentry/seer/endpoints/test_group_autofix_setup_check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sentry/seer/endpoints/test_group_autofix_setup_check.py b/tests/sentry/seer/endpoints/test_group_autofix_setup_check.py index 49d6b5273a47e0..efb542dbd4c500 100644 --- a/tests/sentry/seer/endpoints/test_group_autofix_setup_check.py +++ b/tests/sentry/seer/endpoints/test_group_autofix_setup_check.py @@ -274,7 +274,7 @@ def test_seer_repos_linked_is_false_when_feature_disabled(self) -> None: def test_autofix_automation_tuning_non_seat_based(self) -> None: self.login_as(user=self.user) - for setting in [None] + list(AutofixAutomationTuningSettings): + for setting in [None, *list(AutofixAutomationTuningSettings)]: self.project.update_option("sentry:autofix_automation_tuning", setting) group = self.create_group() url = f"/api/0/organizations/{self.organization.slug}/issues/{group.id}/autofix/setup/"