ref(night-shift): Use seer-project-settings helpers for project eligibility#112936
Conversation
d01fd09 to
e704614
Compare
Backend Test FailuresFailures on
|
e704614 to
8b8fe1d
Compare
8b8fe1d to
a226560
Compare
Backend Test FailuresFailures on
|
a226560 to
99c5a91
Compare
99c5a91 to
b0f533f
Compare
Backend Test FailuresFailures on
|
b0f533f to
cade023
Compare
cade023 to
63d1544
Compare
There was a problem hiding this comment.
Helper looks good, thanks for writing this!
Only one nit, which is adding the tuning to SeerProjectPreference--Seer will drop the field when it gets included in writes, and the write preference helpers to Sentry DB won't write it either. Mind adding a clarifying comment to the write helpers? Or alternatively could just return tuples
63d1544 to
e8ff7ac
Compare
Thanks! It seems like Let me know if you think that is not right! If you think I'll land this for now because it's blocking other work on autofix - but very happy to change it if needed! |
…bility Replace direct SeerProjectRepository queries in _get_eligible_projects with bulk_read_preferences_from_sentry_db / bulk_get_project_preferences behind the seer-project-settings-read-from-sentry feature flag, matching the pattern used in context_engine_index and autofix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Agent transcript: https://claudescope.sentry.dev/share/TusCoPLrgCYHLxdSUeDTGIDPYU1f6BITAaO7rK6QDl0
e8ff7ac to
784f60f
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 784f60f. Configure here.
| "sentry:seer_automation_handoff_target", | ||
| "sentry:seer_automation_handoff_integration_id", | ||
| "sentry:seer_automation_handoff_auto_create_pr", | ||
| "sentry:autofix_automation_tuning", |
There was a problem hiding this comment.
New preference key breaks fallback repo resolution for autofix
Medium Severity
Adding "sentry:autofix_automation_tuning" to SEER_PROJECT_PREFERENCE_OPTION_KEYS changes the has_configured_options check in read_preference_from_sentry_db. A project with only autofix_automation_tuning explicitly set (e.g., via project settings UI) but no Seer repos now returns a SeerProjectPreference with repositories=[] instead of None. Downstream in _resolve_project_preference in autofix.py, the if preference: truthiness check on the model instance passes, skipping the fallback path that populates repos from code mappings. This causes autofix to run with an empty repo list for those projects.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 784f60f. Configure here.


Add a unified `bulk_read_preferences()` helper in `autofix/utils.py` that
returns `dict[int, SeerProjectPreference | None]` regardless of whether
preferences are read from Sentry DB or the Seer API. The helper checks the
`seer-project-settings-read-from-sentry` feature flag internally so callers
don't need to duplicate that branching logic.
Use the new helper in the night-shift cron's `_get_eligible_projects`,
replacing the direct `SeerProjectRepository` query. The
`autofix_automation_tuning != OFF` filter is preserved on top of the
preference check.