feat(events): thread idempotencyKey through the event envelope - #23
Merged
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Completes the exactly-once story started in the vortex fix (vortex-worker #56 / vortex-api #81). The worker now dedups on
idempotencyKey ?? id, but events emitted through@omnidotdev/providersnever carried an idempotencyKey, so every producer using this package fell back to dedup-by-id— a fresh UUID per emit, so at-least-once retries double-processed downstream.idempotencyKey?: stringtoEventInput(documented: unique per logical event, distinct fromcorrelationIdwhich is shared across related events).iggy.ts) and the HTTP POST body (http.ts), the two paths that reach Vortex. vortex-api's/eventsendpoint already accepts the field.Additive and backward-compatible: the field is optional, so existing producers are unchanged and pick up dedup only when they choose to set it.
Testing
idempotencyKeywhen set, omits it when unset).Note
Consumers repin
@omnidotdev/providersto adopt the field; no immediate fleet repin is required since the behavior is opt-in.🤖 Generated with Claude Code