-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Bug description
ResponseStore.put() evicts old rows from the responses table, and ResponseStore.delete() removes a response row, but neither path clears conversations rows that still point to those deleted response IDs. This leaves stale conversation mappings behind.
Concrete repro
POST /v1/responseswithconversation="chat-a"→ storesresp_1- Evict or delete
resp_1 get_conversation("chat-a")still returnsresp_1- The next
/v1/responsescall withconversation="chat-a"fails with 404 Previous response not found
Expected behavior
After a response is evicted or deleted, any conversation mappings referencing that response should also be cleaned up. Reusing the conversation name should start a fresh conversation, not 404.
Affected file
gateway/platforms/api_server.py — ResponseStore class
Fix
Fixed in #2605:
ResponseStore.put()now collects evicted response IDs and deletes theirconversationsrows before removing theresponsesrowsResponseStore.delete()now also deletesconversationsrows whereresponse_idmatches- Added 3 regression tests covering delete, eviction, and handler-level reuse
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels