Skip to content

Commit fecf783

Browse files
authored
feat: enable ai sre detect make on-call
feat: enable ai sre detect make on-call
2 parents e60105b + 4195e59 commit fecf783

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

ROADMAP.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ see [GitHub Project](https://github.com/orgs/VersusControl/projects/2).
135135
([`src/migration/migration-v1.4.0.md`](src/migration/migration-v1.4.0.md)).
136136

137137
## Planned (v1.4.1 release scope)
138-
- [ ] **Team & member management** — define teams and members through a
138+
- [x] **Team & member management** — define teams and members through a
139139
new admin UI + REST API (gated by `X-Gateway-Secret`) and assign them
140140
to incidents. Members have a name, an editable alias (auto-derived
141141
from the name in the UI), and a meta block of per-channel identifiers
@@ -145,6 +145,8 @@ see [GitHub Project](https://github.com/orgs/VersusControl/projects/2).
145145
(new `teams` + `members` blobs). Incident records gain optional
146146
`assigned_team_id` and `assigned_member_ids` fields. No automatic
147147
routing yet — that lands in a later phase.
148+
149+
## Planned (v1.4.2 release scope)
148150
- [ ] **Reliability & load testing** — graceful degradation on log-source
149151
outages, AI timeouts, and high log volume.
150152

pkg/services/agent.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,17 @@ func CreateIncidentFromFinding(f *core.AIFinding, r core.AgentResult, source, se
6363
"Status": "firing",
6464
}
6565

66-
return CreateIncident("", &content)
66+
// Escalate to on-call for high/critical severity findings when
67+
// on-call is configured. Lower severities skip on-call even if it
68+
// is globally enabled — agent medium/low findings are informational
69+
// and should not page operators.
70+
params := map[string]string{}
71+
switch f.Severity {
72+
case "critical", "high":
73+
params["oncall_enable"] = "true"
74+
default:
75+
params["oncall_enable"] = "false"
76+
}
77+
78+
return CreateIncident("", &content, &params)
6779
}

0 commit comments

Comments
 (0)