appsignal-incident-fix
v1.0 activeClassify an AppSignal incident, optionally spawn a fix worktree and open a PR.
Start a new run
Owner
opensop-worker
SLA
—
Trigger
api
Tags
appsignalincident-managementfix
Inputs
incident
object · required
Full incident object from AppSignal
incident_id
string · required
incident_number
number · required
app_id
string · required
project
string · required
project_path
string · required
repo
string · required
exception_name
string · required
phase
enum · required
1
2
3
4
Outputs
decision
string
reason
string
gate_passed
boolean
Steps
-
1
Classify incident
classify-incidentjudgmentDecide whether to fix, skip, or defer this incident
Inputsincident_id ←process.inputs.incident_id incident_number ←process.inputs.incident_number exception_name ←process.inputs.exception_name incident ←process.inputs.incidentOutputsdecision (enum) reason (string) file (string) line (number)threshold: 0.8 escalation: manual -
2
Pre-dispatch gate
pre-dispatch-gateautomated if steps.classify-incident.outputs.decision == 'fix'Inputsincident_id ←process.inputs.incident_id incident_number ←process.inputs.incident_number project ←process.inputs.project repo ←process.inputs.repo phase ←process.inputs.phaseOutputsgate_passed (boolean) gate_reason (string) -
3
Create fix worktree
create-fix-worktreeautomated if steps.pre-dispatch-gate.outputs.gate_passed == trueInputsincident_id ←process.inputs.incident_id project_path ←process.inputs.project_pathOutputsworktree_path (string) branch_name (string) -
4
Run fix swarm
run-swarmautomated if steps.create-fix-worktree.outputs.worktree_path != nullInputsworktree_path ←steps.create-fix-worktree.outputs.worktree_path incident ←process.inputs.incident file ←steps.classify-incident.outputs.file line ←steps.classify-incident.outputs.lineOutputsswarm_exit_code (number) diff_summary (string) committed (boolean) -
5
Safety gate
safety-gateautomated if steps.run-swarm.outputs.committed == trueInputsworktree_path ←steps.create-fix-worktree.outputs.worktree_path project ←process.inputs.projectOutputsfiles_changed (number) additions (number) critical_path_hit (boolean) gate_passed (boolean) gate_reason (string) -
6
Push branch and create PR
push-and-create-prautomated if steps.safety-gate.outputs.gate_passed == true && process.inputs.phase >= '3'Inputsworktree_path ←steps.create-fix-worktree.outputs.worktree_path branch_name ←steps.create-fix-worktree.outputs.branch_name repo ←process.inputs.repo incident_number ←process.inputs.incident_number incident_id ←process.inputs.incident_id exception_name ←process.inputs.exception_name diff_summary ←steps.run-swarm.outputs.diff_summaryOutputspr_url (string) pr_number (number) -
7
Notify team
notify-teamnotificationInputsincident_number ←process.inputs.incident_number project ←process.inputs.project decision ←steps.classify-incident.outputs.decision reason ←steps.classify-incident.outputs.reasonOutputsnotified (boolean)
Raw definition
---
opensop: '0.1'
process:
name: appsignal-incident-fix
tags:
- appsignal
- incident-management
- fix
owner: opensop-worker
steps:
- id: classify-incident
name: Classify incident
type: judgment
inputs:
- from: process.inputs.incident_id
name: incident_id
- from: process.inputs.incident_number
name: incident_number
- from: process.inputs.exception_name
name: exception_name
- from: process.inputs.incident
name: incident
outputs:
- name: decision
type: enum
values:
- fix
- skip
- skip-duplicate
- defer
- name: reason
type: string
- name: file
type: string
- name: line
type: number
judgment:
escalation: manual
allow_agent: true
confidence_threshold: 0.8
require_human_review: false
description: Decide whether to fix, skip, or defer this incident
- id: pre-dispatch-gate
name: Pre-dispatch gate
type: automated
inputs:
- from: process.inputs.incident_id
name: incident_id
- from: process.inputs.incident_number
name: incident_number
- from: process.inputs.project
name: project
- from: process.inputs.repo
name: repo
- from: process.inputs.phase
name: phase
outputs:
- name: gate_passed
type: boolean
- name: gate_reason
type: string
condition: steps.classify-incident.outputs.decision == 'fix'
validation: lenient
- id: create-fix-worktree
name: Create fix worktree
type: automated
inputs:
- from: process.inputs.incident_id
name: incident_id
- from: process.inputs.project_path
name: project_path
outputs:
- name: worktree_path
type: string
- name: branch_name
type: string
condition: steps.pre-dispatch-gate.outputs.gate_passed == true
validation: lenient
- id: run-swarm
name: Run fix swarm
type: automated
inputs:
- from: steps.create-fix-worktree.outputs.worktree_path
name: worktree_path
- from: process.inputs.incident
name: incident
- from: steps.classify-incident.outputs.file
name: file
- from: steps.classify-incident.outputs.line
name: line
outputs:
- name: swarm_exit_code
type: number
- name: diff_summary
type: string
- name: committed
type: boolean
condition: steps.create-fix-worktree.outputs.worktree_path != null
validation: lenient
- id: safety-gate
name: Safety gate
type: automated
inputs:
- from: steps.create-fix-worktree.outputs.worktree_path
name: worktree_path
- from: process.inputs.project
name: project
outputs:
- name: files_changed
type: number
- name: additions
type: number
- name: critical_path_hit
type: boolean
- name: gate_passed
type: boolean
- name: gate_reason
type: string
condition: steps.run-swarm.outputs.committed == true
validation: lenient
- id: push-and-create-pr
name: Push branch and create PR
type: automated
inputs:
- from: steps.create-fix-worktree.outputs.worktree_path
name: worktree_path
- from: steps.create-fix-worktree.outputs.branch_name
name: branch_name
- from: process.inputs.repo
name: repo
- from: process.inputs.incident_number
name: incident_number
- from: process.inputs.incident_id
name: incident_id
- from: process.inputs.exception_name
name: exception_name
- from: steps.run-swarm.outputs.diff_summary
name: diff_summary
outputs:
- name: pr_url
type: string
- name: pr_number
type: number
condition: steps.safety-gate.outputs.gate_passed == true && process.inputs.phase
>= '3'
validation: lenient
- id: notify-team
name: Notify team
type: notification
inputs:
- from: process.inputs.incident_number
name: incident_number
- from: process.inputs.project
name: project
- from: steps.classify-incident.outputs.decision
name: decision
- from: steps.classify-incident.outputs.reason
name: reason
outputs:
- name: notified
type: boolean
inputs:
- name: incident
type: object
required: true
description: Full incident object from AppSignal
- name: incident_id
type: string
required: true
- name: incident_number
type: number
required: true
- name: app_id
type: string
required: true
- name: project
type: string
required: true
- name: project_path
type: string
required: true
- name: repo
type: string
required: true
- name: exception_name
type: string
required: true
- name: phase
type: enum
values:
- '1'
- '2'
- '3'
- '4'
required: true
outputs:
- from: steps.classify-incident.outputs.decision
name: decision
type: string
- from: steps.classify-incident.outputs.reason
name: reason
type: string
- from: steps.pre-dispatch-gate.outputs.gate_passed
name: gate_passed
type: boolean
trigger:
type: api
version: '1.0'
description: Classify an AppSignal incident, optionally spawn a fix worktree and
open a PR.