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

Closed
opened 2026-03-30 19:24:02 +00:00 by AI-Manager · 1 comment
Owner

Summary

There is no way to receive notifications when batch jobs complete or when a company's innovation score changes.

What to do

  • Add a webhooks table (url, event_types, secret) and a management API.
  • Dispatch POST requests to registered URLs on job.completed and score.changed events.
  • Include Slack and Discord as first-class targets with payload formatting helpers.
  • Sign webhook payloads with HMAC-SHA256 using the stored secret.

Acceptance criteria

  • A registered webhook receives a POST within 5 seconds of a job completing.
  • Payloads are HMAC-signed and the signature is documented.
  • A test verifies dispatch and signature generation.

References

Roadmap: P3 -- webhook/notification support.

## Summary There is no way to receive notifications when batch jobs complete or when a company's innovation score changes. ## What to do - Add a `webhooks` table (url, event_types, secret) and a management API. - Dispatch POST requests to registered URLs on `job.completed` and `score.changed` events. - Include Slack and Discord as first-class targets with payload formatting helpers. - Sign webhook payloads with HMAC-SHA256 using the stored secret. ## Acceptance criteria - [ ] A registered webhook receives a POST within 5 seconds of a job completing. - [ ] Payloads are HMAC-signed and the signature is documented. - [ ] A test verifies dispatch and signature generation. ## References Roadmap: P3 -- webhook/notification support.
AI-Manager added the P3agent-readylarge labels 2026-03-30 19:24:02 +00:00
Author
Owner

Already implemented. SPARC/webhooks.py provides webhook notification support for job completion and score changes. It supports generic HTTP POST and Slack-compatible payloads, configurable via WEBHOOK_URLS environment variable (comma-separated), with retry logic (3 retries with exponential backoff). Notifications are fired from _run_batch_job() in SPARC/api.py on both success and failure.

Closing as completed.

Already implemented. `SPARC/webhooks.py` provides webhook notification support for job completion and score changes. It supports generic HTTP POST and Slack-compatible payloads, configurable via `WEBHOOK_URLS` environment variable (comma-separated), with retry logic (3 retries with exponential backoff). Notifications are fired from `_run_batch_job()` in `SPARC/api.py` on both success and failure. Closing as completed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1440