Incident response runbook#93
Merged
elizabetheonoja-art merged 2 commits intoJul 18, 2026
Merged
Conversation
…agerduty Add PagerDuty incident runbook automation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Provide an automated incident-response layer that evaluates service and contract health snapshots locally and escalates actionable incidents to PagerDuty using the Events API v2.
Keep the critical-path evaluator synchronous and local to preserve the P99 sub-100ms evaluation target while allowing PagerDuty network I/O after rule matches.
Description
Add meter-simulator/src/incident-runbook.js implementing PagerDutyClient and IncidentRunbookAutomation with deterministic evaluate() rules and deduplication suppression via shouldSuppress().
Add Jest tests in meter-simulator/tests/incident-runbook.test.js that cover rule detection, suppression behavior, and Events API payload formation.
Add documentation docs/INCIDENT_RUNBOOK_AUTOMATION.md describing architecture, built-in rules, PagerDuty configuration, deployment guidance, and security notes.
Add an incident-runbook npm script to meter-simulator/package.json and update .gitignore to ignore node_modules/ to reduce noise from JS deps.
Testing
Ran npm test -- --runInBand incident-runbook.test.js, and all tests passed (3 passed).
Ran npm run lint -- --quiet, which reported a missing ESLint configuration for the meter-simulator package (linting blocked by configuration absence).
Closes #87