fix(webhooks): stop dropping pre-deployment verification response on shared paths#5579
fix(webhooks): stop dropping pre-deployment verification response on shared paths#5579waleedlatif1 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview
Tests cover processor outcomes ( Reviewed by Cursor Bugbot for commit f95c224. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f95c224. Configure here.
|
|
||
| if (dispatchResult.outcome === 'verified') { | ||
| return dispatchResult.response | ||
| } |
There was a problem hiding this comment.
Verified return skips queued sibling
Medium Severity
On a shared path, when an earlier webhook already produced a queued success response, a later webhook with outcome verified still short-circuits the loop and returns the URL-verification body. The caller may get a verification 200 even though another webhook on the path already accepted the delivery.
Reviewed by Cursor Bugbot for commit f95c224. Configure here.
Greptile SummaryThis PR updates webhook verification handling for shared trigger paths. The main changes are:
Confidence Score: 4/5The shared-path webhook route can acknowledge an event while skipping later matching webhooks.
apps/sim/app/api/webhooks/trigger/[path]/route.ts Important Files Changed
Reviews (1): Last reviewed commit: "fix(webhooks): stop dropping pre-deploym..." | Re-trigger Greptile |
| if (dispatchResult.outcome === 'verified') { | ||
| return dispatchResult.response | ||
| } |
There was a problem hiding this comment.
Shared Path Events Are Skipped
When a block-missing webhook on a shared path belongs to a provider with pending verification enabled, this branch returns 200 before later webhooks on the same path are checked. Since the new verified outcome is based on provider registration rather than a matched verification probe, a real event during that block-missing state can be acknowledged and the remaining shared-path deliveries are never dispatched.


Summary
dispatchResolvedWebhookTarget's block-missing case now reports a distinctverifiedoutcome for the pre-deployment URL-verification response, instead of the route inferring it from response internalsverifiedresponse immediately, even when the path is shared by multiple webhooks - previously it was silently dropped viacontinue, which could surface a 500 instead of the 200 a provider needs to accept the trigger URLdispatchResolvedWebhookTargetoutcomes (verified vs. 404) and a route-level regression test for the shared-path caseType of Change
Testing
bun vitest run lib/webhooks/processor.test.ts app/api/webhooks/trigger/[path]/route.test.ts- 33 passedbunx tsc --noEmit- cleanbun run check:api-validation- passedChecklist