fix: gate conversation sync on store flag to prevent data leak when store=false#5305
Open
jaideepr97 wants to merge 7 commits intollamastack:mainfrom
Open
fix: gate conversation sync on store flag to prevent data leak when store=false#5305jaideepr97 wants to merge 7 commits intollamastack:mainfrom
jaideepr97 wants to merge 7 commits intollamastack:mainfrom
Conversation
…tore=false When a user passes store=false with a conversation ID, the response object was correctly not persisted but conversation messages were still written to the database. This adds `and store` to the terminal-event condition so conversation syncing respects the store flag. This fix was generated by Claude. Closes llamastack#5304 Signed-off-by: Jaideep Rao <jrao@redhat.com> Made-with: Cursor
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.
This patch was generated by Claude.
Summary
store=falseignoring conversation sync: when a user passesstore=falsewith aconversationID, the response object was correctly not persisted but conversation messages were still written to the database via_sync_response_to_conversationandstore_conversation_messages. This addsand storeto the terminal-event condition gate so conversation syncing respects thestoreflag.store=falsenon-streaming,store=truenon-streaming (positive case), andstore=falsestreaming modes with conversation IDs.Closes #5304
Test plan
test_openai_responses_conversations.py::TestStoreFalseConversationLeak(3 tests)GET /v1/conversations/{id}/itemsreturns empty afterstore=falseresponse