Skip to content

FIX: prompt_normalizer.send_prompt_async attempts to save duplicate message pieces to memory#1656

Open
behnam-o wants to merge 19 commits intomicrosoft:mainfrom
behnam-o:users/behnam/prompt-normalizer-bug
Open

FIX: prompt_normalizer.send_prompt_async attempts to save duplicate message pieces to memory#1656
behnam-o wants to merge 19 commits intomicrosoft:mainfrom
behnam-o:users/behnam/prompt-normalizer-bug

Conversation

@behnam-o
Copy link
Copy Markdown
Contributor

@behnam-o behnam-o commented Apr 24, 2026

A regression introduced #1515 , where requests are [attempted to be] written to memory twice, which causes

IntegrityError: UNIQUE constraint failed: PromptMemoryEntries.id

When this line is hit.

The request is already added to memory a few lines above.

A few integration tests are failing because of this (most notably the tests***notebooks ones)

@behnam-o behnam-o marked this pull request as ready for review April 24, 2026 23:43
@behnam-o behnam-o changed the title FIX: send_prompt_async to return empty response instead of request for write-only targets FIX: prmopt_normalizer.send_prompt_async attempts to save duplicate message pieces to memory Apr 24, 2026
Copy link
Copy Markdown
Contributor

@jsong468 jsong468 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems logical to me! maybe add a unit test to test this

@romanlutz romanlutz changed the title FIX: prmopt_normalizer.send_prompt_async attempts to save duplicate message pieces to memory FIX: prompt_normalizer.send_prompt_async attempts to save duplicate message pieces to memory Apr 25, 2026
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.

3 participants