feat(seer): Add rca_source to supergroup queries with feature flag gating#112436
Merged
feat(seer): Add rca_source to supergroup queries with feature flag gating#112436
Conversation
Add RCASource enum and rca_source field to supergroup query requests so Seer knows which embedding space to query. The source is determined by the organizations:supergroups-lightweight-rca-clustering feature flag. Replace the supergroups.lightweight-enabled-orgs sentry-option with the feature flag for both the write path (post_process task dispatch) and read path (supergroup query endpoints), consistent with how all other supergroup features are gated.
cvxluo
approved these changes
Apr 8, 2026
src/sentry/seer/signed_seer_api.py
Outdated
Comment on lines
+374
to
+375
| EXPLORER = "explorer" | ||
| LIGHTWEIGHT = "lightweight" |
Contributor
There was a problem hiding this comment.
Suggested change
| EXPLORER = "explorer" | |
| LIGHTWEIGHT = "lightweight" | |
| EXPLORER = "EXPLORER" | |
| LIGHTWEIGHT = "LIGHTWEIGHT" |
to be consistent with seer?
src/sentry/tasks/post_process.py
Outdated
|
|
||
| enabled_orgs: list[int] = options.get("supergroups.lightweight-enabled-orgs") | ||
| if group.organization.id not in enabled_orgs: | ||
| if not features.has("organizations:supergroups-lightweight-rca-clustering", group.organization): |
Contributor
There was a problem hiding this comment.
it might be helpful to decouple the ingest flag with the API response flag — it was helpful for the current version of explorer RCAs, since we could turn on embedding ingestion before changing what someone sees in the UI
Member
Author
There was a problem hiding this comment.
oh right that makes sense, ill decouple
…flags - Write: organizations:supergroups-lightweight-rca-clustering-write (controls post_process task dispatch for generating embeddings) - Read: organizations:supergroups-lightweight-rca-clustering-read (controls which rca_source supergroup query endpoints use) Allows enabling write ahead of read to accumulate embeddings before switching what users see.
2347515 to
b0ab7ad
Compare
Contributor
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 b0ab7ad. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Add
rca_sourceparameter to supergroup query APIs so Seer knows which embedding space (explorer vs lightweight) to query from. The source is determined by theorganizations:supergroups-lightweight-rca-clusteringfeature flag.Also replaces the
supergroups.lightweight-enabled-orgssentry-option with this feature flag for both:This is consistent with how all other supergroup features are gated (via feature flags, not options).
Depends on #112229 (merged).