Harden webhook processing and visibility - #45
Conversation
Adds webhook delivery idempotency for pipeline creation by storing `webhook_delivery_id` and enforcing one pipeline per (delivery, workflow), preventing duplicate runs/checks on retries. Webhook processing now fans out correctly to all workspace connections of the same GitHub repo, records per-workspace timeline events, and exposes deployment-wide webhook signature rejection health in API/UI (new sync KPI and empty-timeline remediation state). Also raises webhook body/rate limits to match real GitHub payload behavior and adds a runbook for diagnosing 401 webhook rejections.
✅ Deploy Preview for overup-app ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (21)
📝 WalkthroughWalkthroughWebhook handling now fans out across connected repositories, prevents duplicate workflow pipelines per delivery, tracks signature failures, exposes webhook health, and presents rejection diagnostics in the repository UI. Webhook body limits, rate limits, URL validation, and operational documentation were also updated. ChangesWebhook reliability
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant GitHub
participant WebhookEndpoint
participant WebhookAuthStats
participant RepositoryHealth
participant RepositoryUI
GitHub->>WebhookEndpoint: Send signed webhook
WebhookEndpoint->>WebhookAuthStats: Record rejection cause when verification fails
RepositoryHealth->>WebhookAuthStats: Snapshot rejection metrics
RepositoryUI->>RepositoryHealth: Load repository health
RepositoryHealth-->>RepositoryUI: Return webhook-auth status
sequenceDiagram
participant WebhookProcessor
participant RepositoryLookup
participant PipelineRun
participant PipelineStore
participant CheckRuns
WebhookProcessor->>RepositoryLookup: Find all connected repositories
RepositoryLookup-->>WebhookProcessor: Return ordered repository connections
WebhookProcessor->>PipelineRun: Create workflow pipeline with delivery ID
PipelineRun->>PipelineStore: Insert or retrieve idempotent pipeline
PipelineStore-->>PipelineRun: Return pipeline and newly_created
PipelineRun->>CheckRuns: Create check run only when newly_created
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
There was a problem hiding this comment.
This PR successfully implements webhook delivery idempotency and multi-workspace fan-out processing with strong architectural design. The implementation includes proper security controls (constant-time HMAC verification, input sanitization), comprehensive test coverage, and effective race condition handling through database constraints. The webhook signature rejection tracking provides valuable observability for diagnosing misconfigurations. The code is production-ready with no blocking defects identified.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
Adds webhook delivery idempotency for pipeline creation by storing
webhook_delivery_idand enforcing one pipeline per (delivery, workflow), preventing duplicate runs/checks on retries. Webhook processing now fans out correctly to all workspace connections of the same GitHub repo, records per-workspace timeline events, and exposes deployment-wide webhook signature rejection health in API/UI (new sync KPI and empty-timeline remediation state). Also raises webhook body/rate limits to match real GitHub payload behavior and adds a runbook for diagnosing 401 webhook rejections.Summary by CodeRabbit
New Features
Bug Fixes
Documentation