Repository navigation
Make create session idempotent - #1539
Conversation
8d139b6 to
4101588
Compare
|
Reviewed the idempotent-create behavior. Note the current diff here is just the 1. Concurrent creates still fail rather than converge.
The Suggest either an upsert ( 2. The equality gate compares server-merged config, so it can 409 a semantically identical session.
Two cases that matter for scale out: workers running different builds, where a newly added field with a default makes Comparing a normalized subset, or only the fields the caller actually specified, would be more robust than 3. Naming (this PR's diff).
🤖 Written by Claude Code (Opus 5) on behalf of @edwinyyyu. |
Purpose of the change
Make the session creation to be idempotent
Description
To support scale out, it is possible that multiple workers create the same session simultaneously. This PR makes session creation idempotent.
Fixes/Closes
Fixes #(issue number)
Type of change
[Please delete options that are not relevant.]
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
[Please delete options that are not relevant.]
Test Results: [Attach logs, screenshots, or relevant output]
Checklist
[Please delete options that are not relevant.]
Maintainer Checklist
Screenshots/Gifs
[If applicable, add screenshots or GIFs that show the changes in action. This is especially helpful for API responses. Otherwise, delete this section or type "N/A".]
Further comments
[Add any other relevant information here, such as potential side effects, future considerations, or any specific questions for the reviewer. Otherwise, type "None".]