Route triage and audit automations to any comms destination#291
Merged
Conversation
Sentry triage, Dependabot triage, and the security/code-quality auditors can now report to Teams or Telegram, not just Slack. Core design: instead of teaching runners about adapters, the resolved destination is stamped onto the scan task's communication payload fields, so the surface-generic worker tools (send_chat_reply, post_to_channel) and the own-conversation posting restriction all apply unchanged. Slack destinations stay byte-identical (no stamping). - New destination module: resolveAutomationRuntimeDestination extends the db waterfall (own target -> Slack manager channel) with a primary-conversation tail for Slack-less deployments (most recently active Teams conversation, then the Telegram primary chat); the tail is skipped when Slack is connected so the "configure a manager channel" nudge survives. listConnectedCommunicationProviders gates deployment eligibility. Teams destinations resolve their Bot Framework serviceUrl from teamsInstallations at launch. - scheduled-triage-runner and merged-pr-audit-runner resolve destinations, stamp payload fields, and keep Slack-only side effects (debug posts, workspace timezone) guarded on an actual Slack token. - Scan prompts are surface-correct: channel tag, posting tool name, and surface wording parameterized per destination. - ci_failure_triage explicitly skips non-Slack destinations for now (its prompt and webhook announcements are still Slack-shaped). - Manual "Run now" and settings validation accept a resolved destination on any provider the automation's descriptor supports; registry declarations flip to slack/teams/telegram for the four generalized automations. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
No new code issues found. Both earlier notes are addressed in the latest changes. See task
Reviewed c9b3590 |
- Thread-feedback loaders take the destination surface (default slack) and the runners pass it, so Teams/Telegram feedback context flows as soon as those surfaces track automation threads. - Stale 'No active Slack installation' skip reason now reads 'No connected communication provider'. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 13, 2026
brunobergher
pushed a commit
that referenced
this pull request
Jul 14, 2026
* Route triage and audit automations to any comms destination Sentry triage, Dependabot triage, and the security/code-quality auditors can now report to Teams or Telegram, not just Slack. Core design: instead of teaching runners about adapters, the resolved destination is stamped onto the scan task's communication payload fields, so the surface-generic worker tools (send_chat_reply, post_to_channel) and the own-conversation posting restriction all apply unchanged. Slack destinations stay byte-identical (no stamping). - New destination module: resolveAutomationRuntimeDestination extends the db waterfall (own target -> Slack manager channel) with a primary-conversation tail for Slack-less deployments (most recently active Teams conversation, then the Telegram primary chat); the tail is skipped when Slack is connected so the "configure a manager channel" nudge survives. listConnectedCommunicationProviders gates deployment eligibility. Teams destinations resolve their Bot Framework serviceUrl from teamsInstallations at launch. - scheduled-triage-runner and merged-pr-audit-runner resolve destinations, stamp payload fields, and keep Slack-only side effects (debug posts, workspace timezone) guarded on an actual Slack token. - Scan prompts are surface-correct: channel tag, posting tool name, and surface wording parameterized per destination. - ci_failure_triage explicitly skips non-Slack destinations for now (its prompt and webhook announcements are still Slack-shaped). - Manual "Run now" and settings validation accept a resolved destination on any provider the automation's descriptor supports; registry declarations flip to slack/teams/telegram for the four generalized automations. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Address review: destination-surface feedback lookups, skip reason - Thread-feedback loaders take the destination surface (default slack) and the runners pass it, so Teams/Telegram feedback context flows as soon as those surfaces track automation threads. - Stale 'No active Slack installation' skip reason now reads 'No connected communication provider'. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
What
Sixth PR of the "automations on all comms channels" track (follows #280, #281, #284, #285, #289). This is the one where non-Slack destinations actually light up: Sentry triage, Dependabot triage, and the security/code-quality auditors can now report to Teams or Telegram.
Design
Rather than teaching every runner about communication adapters, the resolved destination is stamped onto the scan task's communication payload fields (
communicationProvider/ChannelId/ServiceUrl) at enqueue. Everything downstream then works unchanged: the worker converts those to envs, the surface-generic tools (send_chat_reply,post_to_channelfrom #285) register and dispatch correctly, and the own-conversation posting restriction naturally scopes the task to its destination. Slack destinations are deliberately unstamped — their scan tasks keep the existing arbitrary-channelpost_to_slack_channelflow byte-for-byte.packages/sdk/src/server/automations/destination.ts): extends the db-level waterfall (automation's own target → Slack manager channel) with a primary-conversation tail for Slack-less deployments — most recently active Teams conversation, then the Telegram primary chat. The tail is skipped when Slack is connected, so a Slack deployment that just hasn't picked a manager channel keeps its explicit nudge instead of surprising another surface. Teams destinations resolve their Bot FrameworkserviceUrlfromteamsInstallations(indexed lookup) at launch; unresolvable serviceUrl means no destination rather than a broken one.listConnectedCommunicationProviders, the piece deferred since Add generic communication adapter dispatch #281). Slack-only side effects (routing debug posts, workspace timezone) are guarded on an actual bot token.['slack','teams','telegram']for the four generalized automations.ci_failure_triageexplicitly skips non-Slack destinations with a clear reason — its prompt and webhook announcement path are still Slack-shaped; it generalizes in a follow-up along with announcer/manager-stats (which post directly via SlackNotifier with Block Kit and need message degradation, tracked as PR 6b).Testing
🤖 Generated with Claude Code