Commit Graph

2 Commits

Author SHA1 Message Date
Garfield
d7c55cb82b test(notifications): full coverage for Slack alert module
23 tests covering sendSlackAlert (graceful degradation, Block Kit payload,
HTTP errors, network failures, fallback text) and notifyNewPilotRequest
(test submission filtering, source/IP header resolution, fire-and-forget
error containment).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 19:24:53 -04:00
Garfield
1742a2f599 feat(notifications): Slack alerts for new pilot requests
- Add src/notifications/slack.ts — Slack webhook integration with rich blocks
- Add src/notifications/index.ts — dispatcher with test-submission filtering
- Wire notifyNewPilotRequest() into POST /api/pilot-request (fire-and-forget)
- Filter out test submissions (@example.com, E2E, Smoke Test, QA Test, Browser Test)
- Skip alert gracefully when SLACK_PILOT_WEBHOOK_URL is not set
- Update .gitignore to exclude .playwright-mcp/ artifacts
2026-05-14 18:22:52 -04:00