1818 _fetch_user_preference ,
1919 _get_event ,
2020 _get_stopping_point_from_fixability ,
21- _run_automation ,
2221 get_issue_summary ,
22+ run_automation ,
2323)
2424from sentry .seer .autofix .utils import AutofixStoppingPoint
2525from sentry .seer .models import SummarizeIssueResponse , SummarizeIssueScores
@@ -611,7 +611,7 @@ def test_get_issue_summary_with_web_vitals_issue(
611611 mock_trigger_autofix_task .assert_called_once ()
612612
613613 @patch ("sentry.seer.autofix.issue_summary.get_seer_org_acknowledgement" )
614- @patch ("sentry.seer.autofix.issue_summary._run_automation " )
614+ @patch ("sentry.seer.autofix.issue_summary.run_automation " )
615615 @patch ("sentry.seer.autofix.issue_summary._get_trace_tree_for_event" )
616616 @patch ("sentry.seer.autofix.issue_summary._call_seer" )
617617 @patch ("sentry.seer.autofix.issue_summary._get_event" )
@@ -623,7 +623,7 @@ def test_get_issue_summary_continues_when_automation_fails(
623623 mock_run_automation ,
624624 mock_get_acknowledgement ,
625625 ):
626- """Test that issue summary is still returned when _run_automation throws an exception."""
626+ """Test that issue summary is still returned when run_automation throws an exception."""
627627 mock_get_acknowledgement .return_value = True
628628
629629 # Set up event and seer response
@@ -641,7 +641,7 @@ def test_get_issue_summary_continues_when_automation_fails(
641641 )
642642 mock_call_seer .return_value = mock_summary
643643
644- # Make _run_automation raise an exception
644+ # Make run_automation raise an exception
645645 mock_run_automation .side_effect = Exception ("Automation failed" )
646646
647647 # Call get_issue_summary and verify it still returns successfully
@@ -652,7 +652,7 @@ def test_get_issue_summary_continues_when_automation_fails(
652652 expected_response ["event_id" ] = event .event_id
653653 assert summary_data == convert_dict_key_case (expected_response , snake_to_camel_case )
654654
655- # Verify _run_automation was called and failed
655+ # Verify run_automation was called and failed
656656 mock_run_automation .assert_called_once ()
657657 mock_call_seer .assert_called_once ()
658658
@@ -681,7 +681,7 @@ def test_get_issue_summary_handles_trace_tree_errors(
681681 possible_cause = "cause" ,
682682 ),
683683 ) as mock_call_seer ,
684- patch ("sentry.seer.autofix.issue_summary._run_automation " ),
684+ patch ("sentry.seer.autofix.issue_summary.run_automation " ),
685685 patch (
686686 "sentry.seer.autofix.issue_summary.get_seer_org_acknowledgement" ,
687687 return_value = True ,
@@ -693,7 +693,7 @@ def test_get_issue_summary_handles_trace_tree_errors(
693693 mock_call_seer .assert_called_once_with (self .group , serialized_event , None )
694694
695695 @patch ("sentry.seer.autofix.issue_summary.get_seer_org_acknowledgement" )
696- @patch ("sentry.seer.autofix.issue_summary._run_automation " )
696+ @patch ("sentry.seer.autofix.issue_summary.run_automation " )
697697 @patch ("sentry.seer.autofix.issue_summary._get_trace_tree_for_event" )
698698 @patch ("sentry.seer.autofix.issue_summary._call_seer" )
699699 @patch ("sentry.seer.autofix.issue_summary._get_event" )
@@ -705,7 +705,7 @@ def test_get_issue_summary_with_should_run_automation_false(
705705 mock_run_automation ,
706706 mock_get_acknowledgement ,
707707 ):
708- """Test that should_run_automation=False prevents _run_automation from being called."""
708+ """Test that should_run_automation=False prevents run_automation from being called."""
709709 mock_get_acknowledgement .return_value = True
710710 event = Mock (
711711 event_id = "test_event_id" ,
@@ -743,7 +743,7 @@ def test_get_issue_summary_with_should_run_automation_false(
743743 mock_call_seer .assert_called_once_with (self .group , serialized_event , {"trace" : "tree" })
744744 mock_get_acknowledgement .assert_called_once_with (self .group .organization )
745745
746- # Verify that _run_automation was NOT called
746+ # Verify that run_automation was NOT called
747747 mock_run_automation .assert_not_called ()
748748
749749 # Check if the cache was set correctly
@@ -798,7 +798,7 @@ def test_high_fixability_code_changes(
798798 possible_cause = "c" ,
799799 scores = SummarizeIssueScores (fixability_score = 0.70 ),
800800 )
801- _run_automation (self .group , self .user , self .event , SeerAutomationSource .ALERT )
801+ run_automation (self .group , self .user , self .event , SeerAutomationSource .ALERT )
802802 mock_trigger .assert_called_once ()
803803 assert mock_trigger .call_args [1 ]["stopping_point" ] == AutofixStoppingPoint .CODE_CHANGES
804804
@@ -822,7 +822,7 @@ def test_medium_fixability_solution(
822822 possible_cause = "c" ,
823823 scores = SummarizeIssueScores (fixability_score = 0.50 ),
824824 )
825- _run_automation (self .group , self .user , self .event , SeerAutomationSource .ALERT )
825+ run_automation (self .group , self .user , self .event , SeerAutomationSource .ALERT )
826826 mock_trigger .assert_called_once ()
827827 assert mock_trigger .call_args [1 ]["stopping_point" ] == AutofixStoppingPoint .ROOT_CAUSE
828828
@@ -848,7 +848,7 @@ def test_without_feature_flag(self, mock_gen, mock_budget, mock_state, mock_rate
848848 with self .feature (
849849 {"organizations:gen-ai-features" : True , "projects:triage-signals-v0" : False }
850850 ):
851- _run_automation (self .group , self .user , self .event , SeerAutomationSource .ALERT )
851+ run_automation (self .group , self .user , self .event , SeerAutomationSource .ALERT )
852852
853853 mock_trigger .assert_called_once ()
854854 assert mock_trigger .call_args [1 ]["stopping_point" ] is None
@@ -1001,7 +1001,7 @@ def test_user_preference_limits_high_fixability(
10011001 )
10021002 mock_fetch .return_value = "solution"
10031003
1004- _run_automation (self .group , self .user , self .event , SeerAutomationSource .ALERT )
1004+ run_automation (self .group , self .user , self .event , SeerAutomationSource .ALERT )
10051005
10061006 mock_trigger .assert_called_once ()
10071007 # Should be limited to SOLUTION by user preference
@@ -1031,7 +1031,7 @@ def test_fixability_limits_permissive_user_preference(
10311031 )
10321032 mock_fetch .return_value = "open_pr"
10331033
1034- _run_automation (self .group , self .user , self .event , SeerAutomationSource .ALERT )
1034+ run_automation (self .group , self .user , self .event , SeerAutomationSource .ALERT )
10351035
10361036 mock_trigger .assert_called_once ()
10371037 # Should use ROOT_CAUSE from fixability, not OPEN_PR from user
@@ -1061,7 +1061,7 @@ def test_no_user_preference_uses_fixability_only(
10611061 )
10621062 mock_fetch .return_value = None
10631063
1064- _run_automation (self .group , self .user , self .event , SeerAutomationSource .ALERT )
1064+ run_automation (self .group , self .user , self .event , SeerAutomationSource .ALERT )
10651065
10661066 mock_trigger .assert_called_once ()
10671067 # Should use OPEN_PR from fixability
0 commit comments