Skip to content

[stable34] Handle multiple messages for one taskId - #714

Merged
julien-nc merged 2 commits into
stable34from
backport/712/stable34
Oct 23, 2026
Merged

julien-nc merged 2 commits into
stable34from
backport/712/stable34

Conversation

@julien-nc

Copy link
Copy Markdown
Member

Manual backport of #712

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

Concurrent task processing executors could run the same chat generation
task twice, storing the assistant message twice with the same ocp_task_id.
Polling check_generation then threw MultipleObjectsReturnedException,
leaving the user without a response until regenerating.

Make the message insertion idempotent in ChattyLLMTaskListener and make
getMessageByTaskId tolerant of duplicate rows.

Assisted-by: OpenCode:GLM-5.3-Flash
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Cover the listener storing the assistant message only once when a task
was dispatched twice, and that title tasks are untouched.

Assisted-by: OpenCode:GLM-5.3-Flash
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc
julien-nc force-pushed the backport/712/stable34 branch from 09da509 to 3330a87 Compare October 23, 2026 09:00
@julien-nc
julien-nc merged commit 3174a8a into stable34 Oct 23, 2026
17 checks passed
@julien-nc
julien-nc deleted the backport/712/stable34 branch October 23, 2026 09:03
@julien-nc julien-nc mentioned this pull request Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant