Skip to content

Commit 1b5add6

Browse files
trevor-eclaude
andcommitted
ref(night-shift): Revert helper extraction in get_automation_stopping_point
Inline the preference-reading logic back into get_automation_stopping_point to keep the diff minimal. Night shift reads the stopping point from the already bulk-loaded preferences dict so this helper is not needed. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 39e1d27 commit 1b5add6

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

src/sentry/seer/autofix/issue_summary.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -507,16 +507,13 @@ def get_automation_stopping_point(group: Group) -> AutofixStoppingPoint:
507507
fixability_score = get_and_update_group_fixability_score(group)
508508
fixability_stopping_point = _get_stopping_point_from_fixability(fixability_score)
509509

510-
user_preference = _get_user_stopping_point_preference(group)
511-
512-
return _apply_user_preference_upper_bound(fixability_stopping_point, user_preference)
513-
514-
515-
def _get_user_stopping_point_preference(group: Group) -> str | None:
516510
if features.has("organizations:seer-project-settings-read-from-sentry", group.organization):
517511
preference = read_preference_from_sentry_db(group.project)
518-
return preference.automated_run_stopping_point if preference else None
519-
return _fetch_user_preference(group.project.id)
512+
user_preference = preference.automated_run_stopping_point if preference else None
513+
else:
514+
user_preference = _fetch_user_preference(group.project.id)
515+
516+
return _apply_user_preference_upper_bound(fixability_stopping_point, user_preference)
520517

521518

522519
def _generate_summary(

0 commit comments

Comments
 (0)