Skip to content

feat(escalation): auto-remediation action steps (webhook runbooks) - #40

Merged
ClaraVnk merged 1 commit into
mainfrom
feat/auto-remediation
Jun 30, 2026
Merged

feat(escalation): auto-remediation action steps (webhook runbooks)#40
ClaraVnk merged 1 commit into
mainfrom
feat/auto-remediation

Conversation

@ClaraVnk

Copy link
Copy Markdown
Contributor

Context

Phase 4 β€” auto-remediation as an escalation action (on top of the escalation engine).

Changes

  • EscalationStep.action_command (nullable): a step with a command becomes an
    auto-remediation action β€” on fire it POSTs event: "remediation" (command +
    problem context) to its webhook channel for an external runbook. The server
    never runs commands itself.
  • Webhook-only: validated on create (REST + web β†’ 422) and defensively skipped at
    fire time if mis-targeted (logged); the once-only step mechanism still applies.
  • Web form: optional per-step "action command" field; the policy list marks
    remediation steps (βš™).

Tests

Remediation event + payload, non-webhook skip at fire time (step still advances), API
rejection. Full suite 208 passed; ruff + mypy(strict) green; reversible migration.

An escalation step can now carry an `action_command`, turning it into an
auto-remediation action: when it fires it POSTs a structured remediation intent
(the command + problem context, `event: "remediation"`) to its webhook channel for
an external runbook to act on. The server never executes commands itself.

- EscalationStep.action_command (nullable); EscalationAlertEvent carries it and its
  payload switches to a remediation shape with the command.
- Remediation steps must target a WEBHOOK channel β€” validated on create (REST + web,
  422) and defensively skipped at fire time (logged) if mis-targeted. The once-only
  step mechanism still applies.
- Web form gains an optional per-step "action command" field; the policy list marks
  remediation steps.

Tests: remediation event + payload, non-webhook skip at fire time (step still
advances), and the API rejection. Full suite 208 passed; ruff + mypy(strict) green;
reversible migration.
@ClaraVnk
ClaraVnk merged commit 84b6f16 into main Jun 30, 2026
4 checks passed
@ClaraVnk
ClaraVnk deleted the feat/auto-remediation branch June 30, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant