Skip to content

fix: workflow step — mitigated+firing → executing, approval gate priority - #1

Merged
sdOps merged 2 commits into
mainfrom
fix/workflow-step-mitigated-approval-priority
Jun 17, 2026
Merged

sdOps merged 2 commits into
mainfrom
fix/workflow-step-mitigated-approval-priority

Conversation

@sdOps

@sdOps sdOps commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes two bugs in computeWorkflowStep that caused 2 test failures on main.

Bugs

  1. Mitigated + firing alerts returned "verifying" instead of "executing"

    • When an incident is mitigated but firing alerts still remain, metrics haven't settled yet (cooldown period). The agent should still be "executing", not "verifying".
    • If all alerts had resolved, we'd have hit the firingAlerts.length === 0 → "resolved" check earlier — so "verifying" for mitigated was effectively dead code given the current call pattern.
  2. Approved confirmation check ran after mitigated check

    • An incident that was both mitigated and had an approved confirmation returned "verifying" instead of "executing". The approval gate must take priority so the agent proceeds with the approved action.

Fix

  • Moved the approved confirmation check before the mitigated check.
  • Changed mitigated + firing alerts to return "executing" (cooldown semantics).

Test results

All 16 workflow-step tests pass. (The typebox error in approval-gate.test.ts is pre-existing on main, unrelated to this change.)

 16 pass
 0 fail

sdOps added 2 commits June 16, 2026 22:03
…re mitigated check

Two bugs in computeWorkflowStep:

1. When incident is mitigated but firing alerts remain, the function
   returned 'verifying' instead of 'executing'. With firing alerts still
   present, metrics haven't settled yet — the agent should still be
   executing (cooldown period), not verifying.

2. The approved confirmation check ran after the mitigated check, so
   an incident that was both mitigated and had an approved confirmation
   returned 'verifying' instead of 'executing'. Approval gate must take
   priority so the agent proceeds with the approved action.

Fixes the two failing tests:
- incident mitigated + firing alerts → executing
- approved confirmation takes priority over mitigated status
- Update actions/checkout from v4 to v5 in CI workflow
- Add 'depends: [install]' to mise test task so dependencies are installed before running tests
@sdOps
sdOps merged commit 36fec73 into main Jun 17, 2026
2 checks passed
@sdOps
sdOps deleted the fix/workflow-step-mitigated-approval-priority branch June 17, 2026 02:17
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