Skip to content

feat(seer): Add rca_source to supergroup queries with feature flag gating#112436

Merged
yuvmen merged 3 commits intomasterfrom
yuvmen/feat/supergroups-rca-source-flag
Apr 8, 2026
Merged

feat(seer): Add rca_source to supergroup queries with feature flag gating#112436
yuvmen merged 3 commits intomasterfrom
yuvmen/feat/supergroups-rca-source-flag

Conversation

@yuvmen
Copy link
Copy Markdown
Member

@yuvmen yuvmen commented Apr 7, 2026

Add rca_source parameter to supergroup query APIs so Seer knows which embedding space (explorer vs lightweight) to query from. The source is determined by the organizations:supergroups-lightweight-rca-clustering feature flag.

Also replaces the supergroups.lightweight-enabled-orgs sentry-option with this feature flag for both:

  • Write path: post_process task dispatch for lightweight RCA clustering
  • Read path: supergroup query endpoints (details + by-group)

This is consistent with how all other supergroup features are gated (via feature flags, not options).

Depends on #112229 (merged).

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 7, 2026
@yuvmen yuvmen marked this pull request as ready for review April 8, 2026 16:28
@yuvmen yuvmen requested review from a team as code owners April 8, 2026 16:28
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.
Comment on lines +374 to +375
EXPLORER = "explorer"
LIGHTWEIGHT = "lightweight"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
EXPLORER = "explorer"
LIGHTWEIGHT = "lightweight"
EXPLORER = "EXPLORER"
LIGHTWEIGHT = "LIGHTWEIGHT"

to be consistent with seer?


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):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

@yuvmen yuvmen merged commit d538b47 into master Apr 8, 2026
77 checks passed
@yuvmen yuvmen deleted the yuvmen/feat/supergroups-rca-source-flag branch April 8, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants