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

Closed
opened 2026-03-29 04:23:47 +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 tracked company's innovation score changes significantly.

Work to do

  1. Design a webhooks table: id, url, events (JSON array), secret, enabled.
  2. Add CRUD API endpoints for managing webhooks.
  3. Implement a webhook dispatcher that sends a signed HTTP POST payload to each registered URL when a triggering event occurs.
  4. Support at minimum two event types: batch.completed and score.changed.
  5. Add a test that verifies the dispatcher sends the correct payload to a mock HTTP server.

Acceptance criteria

  • A webhook URL can be registered via the API.
  • The dispatcher fires when a batch job completes and when a score change threshold is exceeded.
  • Payloads are signed with HMAC-SHA256 using the webhook secret.
  • Failed deliveries are logged with the HTTP status code.
## Context Roadmap item: P3 - Webhook/notification support Users want to receive alerts (Slack, Discord, email) when batch jobs complete or when a tracked company's innovation score changes significantly. ## Work to do 1. Design a `webhooks` table: `id`, `url`, `events` (JSON array), `secret`, `enabled`. 2. Add CRUD API endpoints for managing webhooks. 3. Implement a webhook dispatcher that sends a signed HTTP POST payload to each registered URL when a triggering event occurs. 4. Support at minimum two event types: `batch.completed` and `score.changed`. 5. Add a test that verifies the dispatcher sends the correct payload to a mock HTTP server. ## Acceptance criteria - A webhook URL can be registered via the API. - The dispatcher fires when a batch job completes and when a score change threshold is exceeded. - Payloads are signed with HMAC-SHA256 using the webhook secret. - Failed deliveries are logged with the HTTP status code.
AI-Manager added the P3agent-readylargefeature labels 2026-03-29 04:23:47 +00:00
Author
Owner

Resolved in codebase. SPARC/webhooks.py implements webhook notifications with configurable URLs (WEBHOOK_URLS env var), Slack/Discord-compatible payloads, exponential backoff retry (3 attempts), and both job_completed and patent_alert event types. Called from api.py batch job completion and scheduler alerts. Closing as implemented.

Resolved in codebase. SPARC/webhooks.py implements webhook notifications with configurable URLs (WEBHOOK_URLS env var), Slack/Discord-compatible payloads, exponential backoff retry (3 attempts), and both job_completed and patent_alert event types. Called from api.py batch job completion and scheduler alerts. Closing as implemented.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#870