Fix duplicate Intercom call-location notes - #9
Open
EdgeClaws wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[edge-call-location call_id=…]receipt into each internal call-location note/meon every cold invocationWhy
Intercom waits five seconds for a webhook response and retries once after one minute. The existing cold path could make three sequential Intercom requests before returning
200, then unconditionally created another note on the retry because it ignored both the notification ID and call ID.Documentation: https://developers.intercom.com/docs/webhooks/webhook-notifications
Verification
3.12.14(the DigitalOcean runtime)174 passedproject.ymlparse + manifest regressiongit diff --checkThe regression matrix includes the exact first-delivery → one-minute-retry sequence, ambiguous write committed with response loss, attribute failure followed by retry, missing receipt, malformed receipt readback, different call IDs, invalid IDs, and proof that the two first-delivery writes execute in parallel.
Deployment boundary
intercom/webhookinto the isolated staging namespace firstintercom-article-drafts/uploadand every other deployed action remain outside this deploy scopeThis fixes Intercom's documented delayed redelivery and ambiguous-write paths without adding a datastore. It does not claim atomic exactly-once behavior for two genuinely simultaneous first-attempt deliveries landing in separate function containers; that would require an external conditional-write/lock service.