$.secrets.slack
Published workflows
Loading workflows…
Published workflows
Loading workflows…
Public workflow
A reusable OutcomeCI workflow.
Version 1 · Published
When a new error is reported to Sentry, this workflow decides whether it's actionable, triages its severity and likely root cause, and if both the issue and source repo can be clearly identified, opens pull requests to fix it.
You need to provide:
Slack and GitHub authentication credentials
A Slack channel where triage notifications should be posted
A Sentry webhook configured to send errors to this workflow's trigger endpoint
The workflow runs on incoming Sentry events, so no manual triggering is required.
A Slack notification is always posted summarizing the issue (severity, title, suspected root cause, and Sentry link). If the issue is actionable and the repository is identified, you can discuss and refine the proposed fix plan in a Slack thread; once agreed, the workflow creates a feature branch in the identified repository, makes the minimal code change, adds tests if applicable, and opens a pull request per affected repo with full context and merge order. If the issue lacks sufficient evidence or the repo cannot be identified, only the notification is posted and no fix is attempted. All pull requests remain as drafts if the implementation reveals the plan was unsafe or incomplete, leaving final review and merge decisions to your team.
apiVersion: outcomeci.workflow/v1
name: sentry-triage-fix
trigger: webhook
secrets:
slack: vault:publication/setup_value_1
github: vault:publication/setup_value_2
apis:
slack:
uses: slack
auth: secrets.slack
github:
uses: github
auth: secrets.github
reasoning:
default:
runner: claude
triage-model:
model: anthropic/claude-sonnet-5-5
steps:
- triage:
using: triage-model
reason: triage.md
from: trigger
returns:
decision: enum[actionable, insufficient_evidence, ignore]
severity: enum[critical, high, medium, low]
title: string
summary: string
sentry_url: string
repo_hint: string
repo_status: enum[identified, unknown]
missing_evidence: string
suspect_frames:
- string
proposed_plan:
summary: null
steps:
- string
route: enum[discuss, notify_only]
- notify:
reason: notify.md
with:
- triage.decision
- triage.route
- triage.title
- triage.severity
- triage.summary
- triage.sentry_url
- triage.repo_hint
- triage.missing_evidence
- triage.suspect_frames
- triage.proposed_plan
can:
- slack.post:
channel: setup_value_3
returns:
posted: bool
- discuss:
when: triage.route == "discuss"
converse: slack.thread(notify.calls.slack.post)
with: triage.proposed_plan
until: converged
max_turns: 12
timeout: 1d
returns:
- plan
- status
- fix:
when: discuss.status == "converged"
reason: fix.md
with:
- triage.title
- triage.summary
- triage.sentry_url
- triage.repo_hint
- triage.suspect_frames
- discuss.plan
can:
- github.read
- github.write
policy: 'Write only to repositories the PAT already has access to, and only to
those the agreed plan requires, at most 3 per run. In each, never push to or
modify the default branch; work on a new branch named sentry-fix/<short-slug>
(same slug in every repo). The only allowed outcomes are commits on those branches
and one pull request per repo. No merges, no force-pushes, no repo settings
changes, no edits to CI config, secrets, or workflow files.
'
returns:
prs:
- repo: string
pr_url: string
branch: string
merge_order: string
deviations_from_plan: string
- report:
when: discuss.status == "converged"
reason: Reply in the triage thread listing every PR (repo, link, branch) in merge
order, plus any deviations from the agreed plan, in a few short lines. If no
PR was opened, say why.
with:
- fix.prs
- fix.merge_order
- fix.deviations_from_plan
can:
- slack.thread:
channel: setup_value_3
returns:
posted: bool
$.secrets.slack
$.secrets.github
$.steps[1].notify.can[0]["slack.post"].channel
$.steps[4].report.can[0]["slack.thread"].channel
$.files[".outcomeci/instructions/notify.md"]