Skip to content

[Chat][Doctrine] Replace row-accumulation in DoctrineDbalMessageStore#1987

Open
Tiriel wants to merge 2 commits intosymfony:mainfrom
Tiriel:feat/dbal-message-store-rework
Open

[Chat][Doctrine] Replace row-accumulation in DoctrineDbalMessageStore#1987
Tiriel wants to merge 2 commits intosymfony:mainfrom
Tiriel:feat/dbal-message-store-rework

Conversation

@Tiriel
Copy link
Copy Markdown
Contributor

@Tiriel Tiriel commented Apr 23, 2026

Q A
Bug fix? no
New feature? no
Docs? no
Issues None
License MIT

Replace row-accumulation with single-row upsert in DoctrineDbalMessageStore.
Until now, DoctrineDbalMessage was accumulating messages in new rows. Each row contained all the previous messages plus the new ones, leading to exponential growth of context, warped message history, and profiler exhaustion.
This aims to address this problem and align the message store's design with the other stores'.

@carsonbot carsonbot added Status: Needs Review Chat Issues & PRs about the AI Chat component labels Apr 23, 2026
@Tiriel
Copy link
Copy Markdown
Contributor Author

Tiriel commented Apr 23, 2026

Note: Schema changed because id column is no longer needed as a single row get updated each time. But if the BC Break is too violent, this part can easily be reverted

@Tiriel
Copy link
Copy Markdown
Contributor Author

Tiriel commented Apr 23, 2026

The Fabpot fail seems to be a false positive, it flags hasTable as a typo for hashtable. Maybe something to add to an exclusion list?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Chat Issues & PRs about the AI Chat component Status: Needs Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants