Skip to content

ref(seer): Remove organizations:gen-ai-features feature flag - #125163

Open
NicoHinderling wants to merge 3 commits into
ref/migrate-gen-ai-features-call-sitesfrom
ref/remove-gen-ai-features-flag
Open

NicoHinderling wants to merge 3 commits into
ref/migrate-gen-ai-features-call-sitesfrom
ref/remove-gen-ai-features-flag

Conversation

@NicoHinderling

Copy link
Copy Markdown
Contributor

Deletes the flag. has_seer_access and areAiFeaturesAllowed now reduce to "not self-hosted and not hideAiFeatures", the four remaining two-step sites check is_seer_available() directly, the bulk task feature lists drop the flag, the org settings form gates its AI toggle on the self-hosted signal, and the registration in temporary.py goes away. The now-unused actor parameter on the two helpers is removed along with its twelve callers, and the explorer index eligibility block collapses to a single expression.

Fixtures follow one rule: every place that enabled the flag now pins SaaS mode, and every test that proved denial without the flag now runs as self-hosted, or hides AI features at the org level where the assertion is about org access. Frontend specs drop the flag and use ConfigStore.isSelfHosted for the hidden cases. One autofix utils test only passed because the flag masked a stale premise: replay rage click issues are a FRONTEND category and are eligible, so that assertion is gone. The not_eligible.gen_ai_feature_disabled reason literal is kept as is because it is a metrics tag and an API field; renaming it is a separate, telemetry-aware change.

Ordering matters for what comes after this. The flagpole entry must be deleted only once this PR is deployed everywhere, since removing it first would turn Seer off for every SaaS org. Local dev no longer needs the flag but does need SENTRY_MODE = SentryMode.SAAS in sentry.conf.py, which bare sentry init --dev does not set; getsentry's settings already do. New single-tenant cells get Seer by default rather than by being named in a flagpole segment.

@github-actions github-actions Bot added Scope: Frontend Automatically applied to PRs that change frontend components Scope: Backend Automatically applied to PRs that change backend components labels Sep 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

@NicoHinderling
NicoHinderling marked this pull request as ready for review September 22, 2026 02:41
@NicoHinderling
NicoHinderling requested review from a team as code owners September 22, 2026 02:41
@NicoHinderling
NicoHinderling force-pushed the ref/migrate-gen-ai-features-call-sites branch from 4ec49fc to 738f341 Compare September 22, 2026 02:47
@NicoHinderling
NicoHinderling requested review from a team as code owners September 22, 2026 02:47
@NicoHinderling
NicoHinderling force-pushed the ref/migrate-gen-ai-features-call-sites branch from 738f341 to e36ada2 Compare September 22, 2026 03:05
@NicoHinderling
NicoHinderling force-pushed the ref/remove-gen-ai-features-flag branch from 0bd67f5 to eee8b4d Compare September 22, 2026 03:05
@sentry

sentry Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
0 0 0 0 518 0 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

The flag was on for every SaaS and single-tenant cell and off only on
self-hosted, where no flagpole config exists. With has_seer_access and
areAiFeaturesAllowed now checking is_self_hosted directly, the flag no
longer carries information. Remove the registration, the remaining
two-step checks in autofix, issue summary, and the trace explorer AI
endpoints, the bulk task feature lists, and the settings form gate.

Self-hosted denials now say so instead of reporting a missing flag.
The flagpole entry must be deleted only after this is deployed
everywhere, since deleting it first would turn Seer off for all SaaS
orgs.
Sentry tests run in self-hosted mode by default, so every test that
enabled the flag now pins SENTRY_SELF_HOSTED=False, and tests that
proved denial without the flag now run as self-hosted or hide AI
features at the org level. The seer workflows endpoint tests neutralize
the endpoint rate limiter, which the middleware skips on self-hosted
but enforces once the class runs in SaaS mode. One autofix utils test
only passed because the flag masked a stale premise: replay rage
click issues are a FRONTEND category and are eligible.
Remove the flag from every spec fixture and convert the tests that
asserted hidden AI surfaces without the flag to self-hosted cases via
ConfigStore.isSelfHosted. The group details spec now mocks the autofix
and Seer onboarding endpoints its default org reaches once AI features
are allowed without a flag.

This branch was successfully deployed

1 active deployment
Preview — e18965ee Deployed Sep 22, 2026 by vercel[bot]
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 Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant