From 1810ee58669a5cb6082976073b6ea29a5774adab Mon Sep 17 00:00:00 2001 From: Steve Konves Date: Thu, 6 Aug 2026 14:18:19 -0700 Subject: [PATCH 1/2] Revert "ref(seer): remove issue summary from post process temp (#121426)" This reverts commit 5bca0c8a3be9c63afedfeb94bd280c465be2224a. Put kick_off_seer_automation back in GROUP_CATEGORY_POST_PROCESS_PIPELINE and in GENERIC_POST_PROCESS_PIPELINE. Remove the five xfail marks that the original commit added to the post-process tests. --- src/sentry/tasks/post_process.py | 2 ++ tests/sentry/tasks/test_post_process.py | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/sentry/tasks/post_process.py b/src/sentry/tasks/post_process.py index 681962bd83ce..01a6e919be13 100644 --- a/src/sentry/tasks/post_process.py +++ b/src/sentry/tasks/post_process.py @@ -1643,6 +1643,7 @@ def process_siem_security_logging(job: PostProcessJob) -> None: process_commits, handle_owner_assignment, handle_auto_assignment, + kick_off_seer_automation, kick_off_lightweight_rca_cluster, process_workflow_engine, process_resource_change_bounds, @@ -1671,6 +1672,7 @@ def process_siem_security_logging(job: PostProcessJob) -> None: GENERIC_POST_PROCESS_PIPELINE: list[Callable[[PostProcessJob], None]] = [ process_snoozes, process_inbox_adds, + kick_off_seer_automation, process_workflow_engine, process_resource_change_bounds, process_data_forwarding, diff --git a/tests/sentry/tasks/test_post_process.py b/tests/sentry/tasks/test_post_process.py index e0803c1253b2..a9d0071d5a57 100644 --- a/tests/sentry/tasks/test_post_process.py +++ b/tests/sentry/tasks/test_post_process.py @@ -2935,7 +2935,6 @@ def test_step_is_skipped_by_fully_specified_condition( class KickOffSeerAutomationTestMixin(BasePostProcessGroupMixin): - @pytest.mark.xfail(reason="Seer automation was removed from the post-process pipeline") @patch("sentry.tasks.seer.autofix.generate_summary_and_run_automation.delay") @with_feature("organizations:gen-ai-features") def test_kick_off_seer_automation_with_features(self, mock_generate_summary_and_run_automation): @@ -3020,7 +3019,6 @@ def test_kick_off_seer_automation_skips_existing_fixability_score( mock_generate_summary_and_run_automation.assert_not_called() - @pytest.mark.xfail(reason="Seer automation was removed from the post-process pipeline") @patch("sentry.tasks.seer.autofix.generate_summary_and_run_automation.delay") @with_feature("organizations:gen-ai-features") def test_kick_off_seer_automation_runs_with_missing_fixability_score( @@ -3078,7 +3076,6 @@ def test_kick_off_seer_automation_skips_with_existing_fixability_score( mock_generate_summary_and_run_automation.assert_not_called() - @pytest.mark.xfail(reason="Seer automation was removed from the post-process pipeline") @patch("sentry.seer.autofix.utils.is_seer_scanner_rate_limited") @patch("sentry.quotas.backend.check_seer_quota") @patch("sentry.tasks.seer.autofix.generate_summary_and_run_automation.delay") @@ -3152,7 +3149,6 @@ def test_rate_limit_only_checked_after_all_other_checks_pass( mock_is_rate_limited.assert_not_called() mock_generate_summary_and_run_automation.assert_not_called() - @pytest.mark.xfail(reason="Seer automation was removed from the post-process pipeline") @patch("sentry.tasks.seer.autofix.generate_summary_and_run_automation.delay") @with_feature("organizations:gen-ai-features") def test_kick_off_seer_automation_skips_when_lock_held( @@ -3409,7 +3405,6 @@ class PostProcessGroupErrorTest( PipelineKillswitchTestMixin, CheckIfFlagsSentTestMixin, ): - @pytest.mark.xfail(reason="Seer automation was removed from the post-process pipeline") @patch("sentry.seer.autofix.utils.is_seer_seat_based_tier_enabled", return_value=True) @patch("sentry.tasks.seer.autofix.generate_issue_summary_only.delay") @with_feature({"organizations:gen-ai-features": True}) From 7e90c3c0f930f88229aa81567a1d97197eb641be Mon Sep 17 00:00:00 2001 From: Steve Konves Date: Fri, 7 Aug 2026 13:43:00 -0700 Subject: [PATCH 2/2] ref(seer): Gate post-process Seer work on the rollout rate only #121481 added seer.post-process-issue-summary.rollout-rate. That gate runs before the billing-tier check, so it covers every tier. The older seer.post-process-issue-summary-killswitch.enabled option only covered seat-based organizations. Remove the killswitch check. The rollout rate is now the single control for Seer work in post-process. Keep the option registration. The option can hold a value in the database or in sentry-options-automator. An unregistered option with a stored value becomes an unknown option. A later PR can remove the registration after the stored value is clear. The rollout rate defaults to 0.0, so kick_off_seer_automation returns early in tests. Twelve tests now set the rate to 1.0. This includes the tests that assert_not_called. Without the override, the rollout gate stops the task before the condition under test applies, and the test passes for the wrong reason. Delete test_seat_based_org_killswitch_prevents_summary. The check that it covered no longer exists. --- src/sentry/tasks/post_process.py | 3 --- tests/sentry/tasks/test_post_process.py | 21 ++++++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/sentry/tasks/post_process.py b/src/sentry/tasks/post_process.py index 01a6e919be13..a329a4216ca1 100644 --- a/src/sentry/tasks/post_process.py +++ b/src/sentry/tasks/post_process.py @@ -1569,9 +1569,6 @@ def kick_off_seer_automation(job: PostProcessJob) -> None: return if is_seer_seat_based_tier_enabled(group.organization): - # Guards to prevent thundering herd on issue summary generation. - if options.get("seer.post-process-issue-summary-killswitch.enabled"): - return if group.seer_fixability_score is not None: return # Issues created in last 5 minutes only. This can be removed once this is live past 1 week. diff --git a/tests/sentry/tasks/test_post_process.py b/tests/sentry/tasks/test_post_process.py index a9d0071d5a57..e87599e6193f 100644 --- a/tests/sentry/tasks/test_post_process.py +++ b/tests/sentry/tasks/test_post_process.py @@ -2937,6 +2937,7 @@ def test_step_is_skipped_by_fully_specified_condition( class KickOffSeerAutomationTestMixin(BasePostProcessGroupMixin): @patch("sentry.tasks.seer.autofix.generate_summary_and_run_automation.delay") @with_feature("organizations:gen-ai-features") + @override_options({"seer.post-process-issue-summary.rollout-rate": 1.0}) def test_kick_off_seer_automation_with_features(self, mock_generate_summary_and_run_automation): self.project.update_option("sentry:seer_scanner_automation", True) event = self.create_event( @@ -2956,6 +2957,7 @@ def test_kick_off_seer_automation_with_features(self, mock_generate_summary_and_ ) @patch("sentry.tasks.seer.autofix.generate_summary_and_run_automation.delay") + @override_options({"seer.post-process-issue-summary.rollout-rate": 1.0}) def test_kick_off_seer_automation_without_org_feature( self, mock_generate_summary_and_run_automation ): @@ -2975,6 +2977,7 @@ def test_kick_off_seer_automation_without_org_feature( @patch("sentry.tasks.seer.autofix.generate_summary_and_run_automation.delay") @with_feature("organizations:gen-ai-features") + @override_options({"seer.post-process-issue-summary.rollout-rate": 1.0}) def test_kick_off_seer_automation_without_scanner_on( self, mock_generate_summary_and_run_automation ): @@ -2996,6 +2999,7 @@ def test_kick_off_seer_automation_without_scanner_on( @patch("sentry.tasks.seer.autofix.generate_summary_and_run_automation.delay") @with_feature("organizations:gen-ai-features") + @override_options({"seer.post-process-issue-summary.rollout-rate": 1.0}) def test_kick_off_seer_automation_skips_existing_fixability_score( self, mock_generate_summary_and_run_automation ): @@ -3021,6 +3025,7 @@ def test_kick_off_seer_automation_skips_existing_fixability_score( @patch("sentry.tasks.seer.autofix.generate_summary_and_run_automation.delay") @with_feature("organizations:gen-ai-features") + @override_options({"seer.post-process-issue-summary.rollout-rate": 1.0}) def test_kick_off_seer_automation_runs_with_missing_fixability_score( self, mock_generate_summary_and_run_automation ): @@ -3047,6 +3052,7 @@ def test_kick_off_seer_automation_runs_with_missing_fixability_score( @patch("sentry.tasks.seer.autofix.generate_summary_and_run_automation.delay") @with_feature("organizations:gen-ai-features") + @override_options({"seer.post-process-issue-summary.rollout-rate": 1.0}) def test_kick_off_seer_automation_skips_with_existing_fixability_score( self, mock_generate_summary_and_run_automation ): @@ -3080,6 +3086,7 @@ def test_kick_off_seer_automation_skips_with_existing_fixability_score( @patch("sentry.quotas.backend.check_seer_quota") @patch("sentry.tasks.seer.autofix.generate_summary_and_run_automation.delay") @with_feature("organizations:gen-ai-features") + @override_options({"seer.post-process-issue-summary.rollout-rate": 1.0}) def test_rate_limit_only_checked_after_all_other_checks_pass( self, mock_generate_summary_and_run_automation, @@ -3151,6 +3158,7 @@ def test_rate_limit_only_checked_after_all_other_checks_pass( @patch("sentry.tasks.seer.autofix.generate_summary_and_run_automation.delay") @with_feature("organizations:gen-ai-features") + @override_options({"seer.post-process-issue-summary.rollout-rate": 1.0}) def test_kick_off_seer_automation_skips_when_lock_held( self, mock_generate_summary_and_run_automation ): @@ -3200,6 +3208,7 @@ def test_kick_off_seer_automation_skips_when_lock_held( @patch("sentry.tasks.seer.autofix.generate_summary_and_run_automation.delay") @with_feature("organizations:gen-ai-features") + @override_options({"seer.post-process-issue-summary.rollout-rate": 1.0}) def test_kick_off_seer_automation_with_hide_ai_features_enabled( self, mock_generate_summary_and_run_automation ): @@ -3286,15 +3295,6 @@ def _seat_based_post_process(self, **group_overrides): ) return event - @patch("sentry.tasks.seer.autofix.generate_issue_summary_only.delay") - @with_feature({"organizations:gen-ai-features": True}) - @override_options({"seer.post-process-issue-summary-killswitch.enabled": True}) - def test_seat_based_org_killswitch_prevents_summary( - self, mock_generate_summary_only, mock_seat_based_tier - ): - self._seat_based_post_process() - mock_generate_summary_only.assert_not_called() - @patch("sentry.tasks.seer.autofix.generate_issue_summary_only.delay") @with_feature({"organizations:gen-ai-features": True}) @override_options({"seer.post-process-issue-summary.rollout-rate": 0.0}) @@ -3309,6 +3309,7 @@ def test_seat_based_org_rollout_skips_tier_check( @patch("sentry.tasks.seer.autofix.generate_issue_summary_only.delay") @with_feature({"organizations:gen-ai-features": True}) + @override_options({"seer.post-process-issue-summary.rollout-rate": 1.0}) def test_seat_based_org_skips_old_issues( self, mock_generate_summary_only, mock_seat_based_tier ): @@ -3317,6 +3318,7 @@ def test_seat_based_org_skips_old_issues( @patch("sentry.tasks.seer.autofix.generate_issue_summary_only.delay") @with_feature({"organizations:gen-ai-features": True}) + @override_options({"seer.post-process-issue-summary.rollout-rate": 1.0}) def test_seat_based_org_skips_when_fixability_exists( self, mock_generate_summary_only, mock_seat_based_tier ): @@ -3408,6 +3410,7 @@ class PostProcessGroupErrorTest( @patch("sentry.seer.autofix.utils.is_seer_seat_based_tier_enabled", return_value=True) @patch("sentry.tasks.seer.autofix.generate_issue_summary_only.delay") @with_feature({"organizations:gen-ai-features": True}) + @override_options({"seer.post-process-issue-summary.rollout-rate": 1.0}) def test_seat_based_org_generates_summary_for_new_issues( self, mock_generate_summary_only, mock_seat_based_tier ):