Skip to content

Reconcile the iLert operator alert stream - #565

Open
morgaesis wants to merge 7 commits into
mainfrom
codex/ilert-webhook-reconcile
Open

Reconcile the iLert operator alert stream#565
morgaesis wants to merge 7 commits into
mainfrom
codex/ilert-webhook-reconcile

Conversation

@morgaesis

Copy link
Copy Markdown
Contributor

Operator alert monitoring no longer depends on a renewable local login to configure iLert. The manual production-monitor canary uses the existing GitHub OIDC identity to reconcile one fail-closed webhook action, verifies successful create and resolve deliveries through iLert action history, and always cleans up its unique alert; routine production failures retain their existing alert lifecycle.

@postil-dev postil-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error 1 blocking finding open
1 finding posted inline

info 1 suppressed
  • Manual alert tests no longer trigger notifications at .github/workflows/production-monitor.yml:452: below the configured confidence threshold; severity error, confidence 0.04. The notification job now runs only when the smoke job fails, so manual runs with test_alert=true skip the external alert. Preserve the operator-requested test-alert branch and its delivery verification.

Review details

Comment thread scripts/reconcile-ilert-alert-stream.ts Outdated
throw new Error("iLert returned invalid action history during the canary");
}
const deliveries = actions
.filter((item) => object(item)?.alertActionId === options.actionId)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error Alert-action history matching rejects numeric IDs
error · confidence 0.64 · kind: risk

The canary compares a string action ID with the potentially numeric alertActionId returned by the history API using strict equality, filtering out valid deliveries. Normalize both identifiers before comparison.

@postil-dev postil-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error 1 blocking finding open
1 finding posted inline

info 3 suppressed
  • Allow the manual canary to run when smoke fails at .github/workflows/production-monitor.yml:540: cites a line the named construct does not sit on; severity warn, confidence 0.94. Because this job needs smoke and its condition is not wrapped in always(), GitHub Actions skips the job when smoke fails or is cancelled, even when inputs.test_alert is true. This regresses the prior manual test-alert path, which could validate delivery during monitor failures. Remove the dependency or use an always-evaluated condition that explicitly permits the manual canary to run.
  • Preserve external alerts for manual test runs at .github/workflows/production-monitor.yml:598: cites a line the named construct does not sit on; severity warn, confidence 0.98. This condition removed the inputs.test_alert == true branch, so a manually requested test run no longer reaches the external alert action even when the test is intended to verify alert delivery. Retain the test-alert condition or otherwise route test runs to the alert action without affecting production failure handling.
  • Restore test-alert notification delivery at .github/workflows/production-monitor.yml:598: below the configured confidence threshold; severity error, confidence 0.04. The notification job no longer runs for operator-requested test alerts, so successful smoke and recovery checks cannot exercise the external alert path. Restore the test-alert condition or invoke an equivalent explicit alert action.

Review details

name: Resolve external alert
needs: smoke
if: ${{ needs.smoke.result == 'success' && inputs.test_alert != true }}
if: ${{ needs.smoke.result == 'success' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error Prevent test runs from resolving production alerts
error · confidence 0.88 · kind: risk

The resolve job now runs for successful test-alert workflows, allowing an operator test to resolve the production external alert. Restore the test-alert exclusion or otherwise prevent test runs from resolving production alerts.

@postil-dev postil-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error 1 blocking finding open
1 finding posted inline

Before the next push

Run postil review --staged.

Review details

require-delivery: ${{ needs.release-recovery.result == 'failure' || needs.release-recovery.result == 'cancelled' }}

resolve-release-recovery:
name: Resolve release recovery alert

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This finding refers to line 670, outside the changed lines.

error Test-alert runs skip alert resolution
error · confidence 0.64 · kind: risk

The resolve job is skipped when inputs.test_alert is true, leaving the canary alert active after a successful smoke run. Permit resolution for test-alert runs or add equivalent guaranteed cleanup.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The canary does not use the generic resolve job; verifyIlertAlertStreamCanary sends RESOLVE, verifies the additional successful webhook delivery, and retries cleanup from finally if setup succeeded but the normal resolve was not sent. The workflow names that ownership explicitly, while resolve handles only the stable postil-production-monitor key.

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