webhook-queue-repair

Diagnose stuck jobs, failed webhooks, and poison queue rows across backend worker surfaces.

Updated Sep 24, 2025
One-click install
npx skills add https://github.com/chriso789/pitch-1 --skill webhook-queue-repair-chriso789
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: webhook-queue-repair
Source: https://github.com/chriso789/pitch-1/tree/main/.agents/skills/webhook-queue-repair
Command: npx skills add https://github.com/chriso789/pitch-1 --skill webhook-queue-repair-chriso789

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Backend queues and webhook pipelines silently accumulate stuck processing rows, failed deliveries, duplicate provider events, and poison jobs that retry forever. This Skill audits every queue and webhook surface through eight deterministic gates and produces a review-only repair report instead of blindly retrying production jobs. ## Core Features & Use Cases - Eight-gate queue audit: Inventories queue tables, edge functions, and pg_cron jobs, then classifies stuck processing rows, old pending jobs, failed webhook deliveries, duplicate provider event IDs, poison jobs, provider outage patterns, and rows missing tenant_id. - Safety-first repair proposals: Generates review-only SQL migrations ordered as dedupe indexes, quarantine tables, poison-job moves, stuck-row reaping, backoff fixes, and cron repairs, with hard refusals on bulk retries, deletes, and tenant-less row replays. - Use Case: A Telnyx webhook consumer shows duplicate event IDs and an AI invoice queue has rows stuck in processing for hours. Run this Skill to get a full report with redacted samples, root-cause diagnosis, and an idempotent repair migration plan awaiting approval. ## Quick Start Ask the assistant to audit all queue and webhook tables for stuck jobs, failed deliveries, and duplicate event IDs and produce a repair report.

Frequently Asked Questions about webhook-queue-repair

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find and fix stuck processing jobs in a queue table?▼

Stuck processing jobs are rows with status 'processing' and updated_at older than 15 minutes with no heartbeat. The Skill recommends requeuing them to pending without incrementing attempts, but only when the consumer is idempotent; otherwise they are quarantined.

How do I handle duplicate webhook event IDs from providers?▼

Duplicate provider event IDs are counted per webhook table. Duplicates with identical payload hashes indicate a missing unique index, fixed with CREATE UNIQUE INDEX CONCURRENTLY on provider and event_id; differing payloads mean the provider is replaying and the consumer must dedupe by event ID.

When should failed webhooks be retried versus quarantined?▼

Retries depend on the failure bucket: 5xx provider responses and timeouts are retryable with capped exponential backoff, while signature failures and 4xx responses are never auto-retried. Rows missing tenant_id are always quarantined and never retried.

Why does the audit refuse to bulk-retry all failed jobs?▼

Bulk retrying without classification amplifies outages because poison jobs will fail again and consume worker capacity. The Skill classifies each failure first, moves poison jobs to dead-letter tables, and only retries rows whose consumers dedupe by provider event ID.

Can this detect a provider outage like Telnyx or QBO being down?▼

Yes. It computes failure rates per provider over 1h, 6h, and 24h windows and flags a suspected outage when the 1h failure rate exceeds 30 percent with more than 10 attempts. It then recommends pausing that provider's queue and surfacing the decision for approval.