Skip to content

fix: use crypto.randomUUID() for trigger conversationId#13

Open
jeffklassen wants to merge 1 commit intoghostwright:mainfrom
jeffklassen:fix/trigger-conversation-id-collision
Open

fix: use crypto.randomUUID() for trigger conversationId#13
jeffklassen wants to merge 1 commit intoghostwright:mainfrom
jeffklassen:fix/trigger-conversation-id-collision

Conversation

@jeffklassen
Copy link
Copy Markdown
Contributor

Summary

  • Replace Date.now() with crypto.randomUUID() for trigger endpoint conversationId generation
  • Date.now() has millisecond precision and can collide when concurrent requests arrive in the same tick, causing session conflicts in the runtime

Test plan

  • All 822 tests pass
  • Lint clean
  • Verify conversationId uniqueness: fire two concurrent POST /trigger requests and confirm distinct conversation IDs in the response

Date.now() has millisecond precision and can collide when multiple
trigger requests arrive simultaneously, causing session conflicts.

Replace with crypto.randomUUID() for guaranteed uniqueness.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant