👤 User Story
As the core processing layer, I need a comprehensive webhook handler for processing PagerDuty incident events with proper validation and error handling.
🎯 Rationale
Webhook Handler is the critical entry point for incident notifications.
✅ Acceptance Criteria
- Create
aira/core/webhook_handler.py with processing class
- Implement POST
/webhooks/pagerduty endpoint
- Define Pydantic models for payloads (
PagerDutyWebhookEvent, PagerDutyIncident)
- Implement HMAC-SHA256 signature validation using
X-PagerDuty-Signature
- Use
PAGERDUTY_WEBHOOK_SECRET config
- Map event types to internal format
- Request/response logging with correlation IDs (via shared utility)
- Add webhook processing metrics (success_count, error_count, processing_duration)
- Comprehensive unit & integration tests
📋 Metadata
Original Ticket: #38
Phase 1 MVP Tracking Issue
👤 User Story
As the core processing layer, I need a comprehensive webhook handler for processing PagerDuty incident events with proper validation and error handling.
🎯 Rationale
Webhook Handler is the critical entry point for incident notifications.
✅ Acceptance Criteria
aira/core/webhook_handler.pywith processing class/webhooks/pagerdutyendpointPagerDutyWebhookEvent,PagerDutyIncident)X-PagerDuty-SignaturePAGERDUTY_WEBHOOK_SECRETconfig📋 Metadata
Status: MVP
Category: Security
Week: Week 3
Complexity: Medium
Critical Path: Yes
Dependencies: AIRA-34, AIRA-31
Original Ticket: #38
Phase 1 MVP Tracking Issue