refactor(integrations): add Slack setup spec for shared apply_setup flow#1
Draft
Drv4ever wants to merge 1 commit into
Draft
refactor(integrations): add Slack setup spec for shared apply_setup flow#1Drv4ever wants to merge 1 commit into
Drv4ever wants to merge 1 commit into
Conversation
…low (draft — blocked on Tracer-Cloud#4170) Add integrations/slack/setup.py with a declarative SLACK_SETUP_SPEC adapted to the IntegrationSetupSpec API from PR Tracer-Cloud#4170 (muddlebee). Consolidate the Slack verifier docstring to document it as the single source of truth for credential validation. This PR is blocked on Tracer-Cloud#4170 which introduces integrations/setup_flow.py. Once Tracer-Cloud#4170 lands, follow-up changes will migrate _setup_slack() in integrations/cli.py and _configure_slack() in chat_notifications.py onto apply_setup(SLACK_SETUP_SPEC, ...). AI-usage disclosure: Code was written and reviewed with AI assistance (opencode).
13 tasks
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
Add
integrations/slack/setup.pywith a declarativeSLACK_SETUP_SPECadapted to theIntegrationSetupSpecAPI from #4170.Consolidate the Slack verifier docstring to document it as the single source of truth for
credential validation.
Blocked on
This PR is blocked on #4170, which
introduces
integrations/setup_flow.py. Once Tracer-Cloud#4170 lands, follow-up changes will migrate_setup_slack()inintegrations/cli.pyand_configure_slack()insurfaces/cli/wizard/configurators/chat_notifications.pyontoapply_setup(SLACK_SETUP_SPEC, ...).What's included now
integrations/slack/setup.pySLACK_SETUP_SPECwith 4 optional fields (webhook_url,bot_token,app_token,signing_secret),verify=verify_slackintegrations/slack/verifier.pyField requirements
All 4 fields are
required=Falsebecause of Slack's either/or constraint (webhook ORSocket Mode tokens). The verifier enforces:
webhook_urlvalidated OR (bot_token+app_token) validated. No single field is universally load-bearing.