cleanup(slack): Seer Explorer Slack integration improvements#111432
Draft
alexsohn1126 wants to merge 309 commits intomasterfrom
Draft
cleanup(slack): Seer Explorer Slack integration improvements#111432alexsohn1126 wants to merge 309 commits intomasterfrom
alexsohn1126 wants to merge 309 commits intomasterfrom
Conversation
…ebhook-endpoint' into alexsohn/iswf-2019-create-slackmentionhandler-for-parsing-atmentions
…ng-atmentions' into alexsohn/iswf-2021-add-explorer-support-to-slackentrypoint
…int' into alexsohn/iswf-2022-add-trigger-explorer-method-to-seeroperator
…perator' into alexsohn/iswf-2023-add-taskbroker-task-for-processing-slack-explorer-mentions
Replace raw string halt reasons with a StrEnum for type safety and consistency with ProcessMentionHaltReason in tasks.py. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mpletion-hook-payloads' into alexsohn/iswf-2025-add-explorer-notification-data-and-slack-renderer
…lack-renderer' into alexsohn/iswf-2018-handle-app-mention-events-in-slack-webhook-endpoint
…ebhook-endpoint' into alexsohn/iswf-2019-create-slackmentionhandler-for-parsing-atmentions
…ng-atmentions' into alexsohn/iswf-2021-add-explorer-support-to-slackentrypoint
…int' into alexsohn/iswf-2022-add-trigger-explorer-method-to-seeroperator
…perator' into alexsohn/iswf-2023-add-taskbroker-task-for-processing-slack-explorer-mentions
Make the example_data summary less specific to match the fallback text used in the Slack renderer. This is only used for debug previews. Co-Authored-By: Claude Opus 4.6 <noreply@example.com>
…lack-renderer' into alexsohn/iswf-2018-handle-app-mention-events-in-slack-webhook-endpoint
…ebhook-endpoint' into alexsohn/iswf-2019-create-slackmentionhandler-for-parsing-atmentions
…ng-atmentions' into alexsohn/iswf-2021-add-explorer-support-to-slackentrypoint
…int' into alexsohn/iswf-2022-add-trigger-explorer-method-to-seeroperator
…perator' into alexsohn/iswf-2023-add-taskbroker-task-for-processing-slack-explorer-mentions
The on_app_mention handler fetches orgs via get_organization_by_id which returns orgs regardless of visibility status. Add a check to bail out early when the org is not active (e.g. pending deletion or deletion in progress). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ebhook-endpoint' into alexsohn/iswf-2019-create-slackmentionhandler-for-parsing-atmentions
…ng-atmentions' into alexsohn/iswf-2021-add-explorer-support-to-slackentrypoint
…int' into alexsohn/iswf-2022-add-trigger-explorer-method-to-seeroperator
…perator' into alexsohn/iswf-2023-add-taskbroker-task-for-processing-slack-explorer-mentions
…ack renderer Move Explorer error notification types to this branch (iswf-2025) to colocate with the other Explorer notification types rather than having them introduced in iswf-2021. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lack-renderer' into alexsohn/iswf-2018-handle-app-mention-events-in-slack-webhook-endpoint
…ebhook-endpoint' into alexsohn/iswf-2019-create-slackmentionhandler-for-parsing-atmentions
…ng-atmentions' into alexsohn/iswf-2021-add-explorer-support-to-slackentrypoint
…int' into alexsohn/iswf-2022-add-trigger-explorer-method-to-seeroperator
…perator' into alexsohn/iswf-2023-add-taskbroker-task-for-processing-slack-explorer-mentions # Conflicts: # src/sentry/integrations/slack/webhooks/event.py
…thod-to-seeroperator
Replace the silent exception swallow with a logger.exception call when assistant_threads_setStatus fails, providing integration_id, channel_id, and thread_ts for debugging. Co-Authored-By: Claude Opus 4.6 <noreply@example.com>
… task Switch from record_halt to record_failure for conditions that indicate genuine failures (org not found, no explorer access, setup errors, unlinked identity) so they are properly surfaced for debugging. Also move the record call before the link identity prompt send. Co-Authored-By: Claude Opus 4.6 <noreply@example.com>
Add slack_request.user_id to the existing event data validation check so missing user IDs halt early instead of passing an empty string to the async task, which would incorrectly prompt identity linking. Rename MISSING_CHANNEL_OR_TEXT to MISSING_EVENT_DATA to reflect the broader scope of the check. Co-Authored-By: Claude Opus 4.6 <noreply@example.com>
Rename ProcessMentionHaltReason to ProcessMentionFailureReason and switch assert_halt_metric to assert_failure_metric in tests so they match the record_failure calls in the task code. Co-Authored-By: Claude Opus 4.6 <noreply@example.com>
…perator' into alexsohn/iswf-2023-add-taskbroker-task-for-processing-slack-explorer-mentions
…lack-explorer-mentions' into alexsohn/seer-explorer-slack-integration-cleanup
The return is intentional: run_id is globally unique in Seer, so only one entrypoint will ever have a cache entry per run. An org mismatch is anomalous and should abort the entire method. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ontinue" This reverts commit 7244a00.
…lack-explorer-mentions' into alexsohn/seer-explorer-slack-integration-cleanup
Replace SlackPromptLinkMessageBuilder with a SlackRenderable built from slack_sdk block objects, matching the interface expected by send_threaded_ephemeral_message. Extract the renderable construction into _build_link_identity_renderable for reuse and testability. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace SlackPromptLinkMessageBuilder with a SlackRenderable built from slack_sdk block objects, matching the interface expected by send_threaded_ephemeral_message. Extract the renderable construction into _build_link_identity_renderable for reuse and testability. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The custom message parameter is no longer needed since the link identity prompt now uses SlackRenderable directly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The custom message parameter is no longer needed since the link identity prompt now uses SlackRenderable directly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move the ephemeral link-identity prompt to fire before clearing the thread status indicator. Remove the thread_ts parameter from _send_link_identity_prompt so the prompt is sent as a top-level ephemeral message rather than threaded. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lack-explorer-mentions' into alexsohn/seer-explorer-slack-integration-cleanup
… context Instead of relying solely on the plain `text` field, thread context parsing now prefers Block Kit `blocks` and extracts links with URLs, user mentions, channel refs, emojis, and broadcasts. Falls back to `text` when blocks are absent or empty.
…mention context Pass ts and thread_ts separately from the webhook handler so the task knows whether the mention was top-level or in a thread. The ephemeral identity-linking prompt now appears in the thread when mentioned in a thread, or at the channel level for top-level mentions.
…lack-explorer-mentions' into alexsohn/seer-explorer-slack-integration-cleanup
Base automatically changed from
alexsohn/iswf-2023-add-taskbroker-task-for-processing-slack-explorer-mentions
to
master
March 31, 2026 17:58
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.
Summary
SeerExplorerResponseinstead ofSeerExplorerError) - pointed out in previous PRon_app_mentionto createSlackIntegrationearly and use its cachedorganizationproperty, eliminating a redundantget_organization_by_idRPC call (as pointed out by @GabeVillalobos 🙏)