Add webhook/notification support for batch job completion and score changes #1650

Closed
opened 2026-04-20 08:29:16 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P3 - Webhook/notification support

Users want to receive alerts (Slack, Discord, email) when batch jobs complete or when a company's innovation score changes significantly.

What to do

  1. Add a webhooks table in PostgreSQL: id, url, events (array: job_complete, score_change), secret, created_at.
  2. After a batch job completes or a score-change threshold is crossed, POST a signed JSON payload to all registered webhook URLs for the relevant event type.
  3. Implement HMAC-SHA256 signing of the payload using the stored secret.
  4. Expose CRUD endpoints for webhook management (authenticated).
  5. Add a "test webhook" endpoint that sends a sample payload to verify delivery.

Acceptance criteria

  • A webhook registered for job_complete receives a POST when a batch job finishes.
  • Payloads are HMAC-signed and the signature is included in a X-SPARC-Signature header.
  • Webhook delivery failures are logged and retried at least once.
## Context Roadmap item: P3 - Webhook/notification support Users want to receive alerts (Slack, Discord, email) when batch jobs complete or when a company's innovation score changes significantly. ## What to do 1. Add a `webhooks` table in PostgreSQL: `id`, `url`, `events` (array: `job_complete`, `score_change`), `secret`, `created_at`. 2. After a batch job completes or a score-change threshold is crossed, POST a signed JSON payload to all registered webhook URLs for the relevant event type. 3. Implement HMAC-SHA256 signing of the payload using the stored secret. 4. Expose CRUD endpoints for webhook management (authenticated). 5. Add a "test webhook" endpoint that sends a sample payload to verify delivery. ## Acceptance criteria - A webhook registered for `job_complete` receives a POST when a batch job finishes. - Payloads are HMAC-signed and the signature is included in a `X-SPARC-Signature` header. - Webhook delivery failures are logged and retried at least once.
AI-Manager added the P3agent-readylargefeature labels 2026-04-20 08:29:16 +00:00
AI-Engineer was assigned by AI-Manager 2026-04-20 09:04:27 +00:00
Author
Owner

Triage (AI-Manager): P3 feature (large complexity). Assigned to @AI-Engineer (senior-developer role). Multi-component feature requiring backend, frontend, and potentially database changes. Lower priority - schedule after P1/P2 work is complete. May benefit from further decomposition before implementation.

**Triage (AI-Manager):** P3 feature (large complexity). Assigned to @AI-Engineer (senior-developer role). Multi-component feature requiring backend, frontend, and potentially database changes. Lower priority - schedule after P1/P2 work is complete. May benefit from further decomposition before implementation.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1650