Skip to content

fix(seer-slack): Skip subscription-gated access check in control silo#113716

Merged
leeandher merged 3 commits intomasterfrom
leanderrodrigues/iswf-2494-investigate
Apr 22, 2026
Merged

fix(seer-slack): Skip subscription-gated access check in control silo#113716
leeandher merged 3 commits intomasterfrom
leanderrodrigues/iswf-2494-investigate

Conversation

@leeandher
Copy link
Copy Markdown
Member

@leeandher leeandher commented Apr 22, 2026

Parser's _filter_organizations_for_seer_event runs resolve_seer_organization from control silo, but SlackExplorerEntrypoint.has_access depends on Flagpole rules that gate on subscription_* context — and getsentry's FlagpoleFeatureHandler intentionally skips the subscription fetch in control silo, so every resolution was halting with NO_VALID_ORGANIZATION and DMing users "Check Settings". :(

Split has_access into has_feature_flag (Slack flag only) for the control-silo parser pass and the full subscription-gated has_access for the cell handler, which reruns resolution after routing.

Refs ISWF-2494

leeandher and others added 2 commits April 22, 2026 14:00
resolve_seer_organization is called from the control-silo parser in
_filter_organizations_for_seer_event. Its SlackExplorerEntrypoint.has_access
check runs features.batch_has for seer-explorer / autofix-on-explorer, whose
Flagpole rules gate on subscription_* context. getsentry's
FlagpoleFeatureHandler intentionally skips the subscription fetch in control
silo for latency reasons (getsentry 958790ccea), so those rules evaluated
False for every OrganizationIntegration in the loop, halting all Seer Slack
events with NO_VALID_ORGANIZATION and surfacing "Check Settings" DMs to
users who previously had working Seer interactions.

Split has_access into has_feature_flag (Slack feature flag only) and the
full subscription-gated has_access. The parser's control-silo pass uses
the cheaper has_feature_flag; the cell handler reruns the full has_access
after routing, where subscription context is available.

Add debug logging on every skip reason inside the loop so future
regressions can be diagnosed from logs rather than guesswork.

Refs ISWF-2494
Co-Authored-By: Claude <noreply@anthropic.com>
…string

Promote the per-skip logs in resolve_seer_organization from debug to info
so they ship to log aggregation and can diagnose future resolution
regressions without a code change. Serialize `silo_mode` via `.value` so
the enum is rendered as a plain string in structured logs rather than an
enum repr that may not serialize cleanly through every handler.

Rewrite the has_access docstring to name the real constraint: must not
be called from control silo, because getsentry's FlagpoleFeatureHandler
skips subscription context there and any subscription-gated Flagpole
rule evaluates False. Point callers to has_feature_flag for the
control-silo path.

Refs ISWF-2494
Co-Authored-By: Claude <noreply@anthropic.com>
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Apr 22, 2026

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 22, 2026
@leeandher leeandher marked this pull request as ready for review April 22, 2026 18:46
@leeandher leeandher requested review from a team as code owners April 22, 2026 18:46
@leeandher leeandher enabled auto-merge (squash) April 22, 2026 22:00
@leeandher leeandher merged commit 64d8a74 into master Apr 22, 2026
56 checks passed
@leeandher leeandher deleted the leanderrodrigues/iswf-2494-investigate branch April 22, 2026 22:04
leeandher added a commit that referenced this pull request Apr 23, 2026
A revert-revert of #113473, but
with the debug changes + silo caveats for feature flag checking. This
one shouldn't cause issues, but even though tests pass this is really
difficult to check, so we're relying on the log changes from
#113716 to validate before
merging.

I added the new kwargs for the task from
#113599 + changed error_reason
to halt_reason here to avoid some merge conflicts in my next PR.

---------

Co-authored-by: Claude <noreply@anthropic.com>
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