improvement(forking): make webhook url mapping clear - #6272
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryCursor Bugbot is generating a summary for commit e290b7c. Configure here. |
Greptile SummaryThe PR makes webhook URL behavior explicit during workspace synchronization and adds resource-level acknowledgment for references deleted from the source.
Confidence Score: 5/5The PR appears safe to merge. The provider compatibility fix prevents cross-provider URL adoption, and the resource-level Drop UI now matches the server’s resource-scoped clearing behavior; no blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/ee/workspace-forking/lib/promote/trigger-urls.ts | Plans and validates provider-compatible webhook path preservation, adoption, and retirement reporting. |
| apps/sim/ee/workspace-forking/lib/copy/deploy-bridge.ts | Loads active public target webhook paths and their providers while excluding polling and internal endpoints. |
| apps/sim/ee/workspace-forking/lib/promote/promote.ts | Integrates transactional drop verification and webhook path resolution into fork promotion. |
| apps/sim/ee/workspace-forking/lib/promote/cleared-refs.ts | Verifies deleted-resource acknowledgments and applies them only to matching source-deleted references. |
| apps/sim/ee/workspace-forking/components/fork-sync/use-fork-sync.ts | Manages resource-level drop decisions and webhook adoption overrides for preview and promotion. |
| apps/sim/ee/workspace-forking/components/fork-sync/fork-sync-view.tsx | Displays webhook URL mappings and accurately communicates the field-wide scope of resource drops. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
Preview[Build fork preview] --> Read[Read active target webhook paths]
Read --> Plan[Build trigger URL plan]
Plan --> Match{Same workflow and provider?}
Match -->|Yes| Choice[Preserve or adopt retiring path]
Match -->|No| Retire[Report retiring URL]
Choice --> Promote[Submit promotion choices]
Retire --> Promote
Promote --> Rebuild[Rebuild and validate plan in transaction]
Rebuild --> Copy[Copy workflows with resolved trigger paths]
Copy --> Deploy[Deploy target workflows]
Deploy --> Result[Report dropped references and retired URLs]
Reviews (2): Last reviewed commit: "fix(forking): honour drops before the un..." | Re-trigger Greptile
…n URL adoption Review round 1 on #6272. - Drop was inert for required references: `postCopyUnmappedRequired` gates before the cleared-ref gate that honours acknowledgments, so a source-deleted reference on a required field still failed with "map all required ... first". Verified drops are now resolved once (`verifyForkDropAcknowledgments`) and subtracted from both gates. Verification is not optional: an unmapped reference of a non-blocking kind (credential, env-var) never re-blocks downstream, so subtracting raw acknowledgments would let a crafted payload skip the required gate. - URL adoption now requires provider equality. A count-only 1:1 pairing could hand a GitHub URL to an arriving Slack trigger, keeping the endpoint alive while every request failed signature verification - and reporting the URL as preserved. - `resolveTriggerId` moved from `lib/webhooks/deploy.ts` to `@/triggers/webhook-url` so the deploy path and the fork's provider check share one resolution. - Trigger URL warnings render the full public URL in the heads-up section and name the URL in the overwrite confirm, where identical workflow names were ambiguous. - The Drop control renders once per resource and states how many fields it covers; the remapper clears by reference, so a per-row control implied a choice the write path cannot honour. - Export clears `workflow-selector`: nothing on the import path remaps workflow ids (`import-export.ts` re-creates each workflow under a fresh id), so a preserved reference dangled - bundle or not. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 57f5565. Configure here.
Summary
Make Webhook URL mappings clearly mappable / regen-able.
Type of Change
Testing
Tested manually
Checklist