Skip to content

feat(events): thread idempotencyKey through the event envelope - #23

Merged
coopbri merged 1 commit into
masterfrom
feat/event-idempotency-key
Aug 31, 2026
Merged

feat(events): thread idempotencyKey through the event envelope#23
coopbri merged 1 commit into
masterfrom
feat/event-idempotency-key

Conversation

@coopbri

@coopbri coopbri commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

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/providers never 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.

  • Added optional idempotencyKey?: string to EventInput (documented: unique per logical event, distinct from correlationId which is shared across related events).
  • Included it in the Iggy envelope (iggy.ts) and the HTTP POST body (http.ts), the two paths that reach Vortex. vortex-api's /events endpoint 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

  • tsc / biome clean; 33 events tests pass (2 new: the POST body forwards idempotencyKey when set, omits it when unset).

Note

Consumers repin @omnidotdev/providers to adopt the field; no immediate fleet repin is required since the behavior is opt-in.

🤖 Generated with Claude Code

@coopbri
coopbri merged commit 50382df into master Aug 31, 2026
3 of 4 checks passed
@coopbri
coopbri deleted the feat/event-idempotency-key branch August 31, 2026 20:11
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant