fix(conversation): upsert streaming tool calls (AIO-30)#484
Merged
Conversation
- Persist ACP and aionrs tool-call events through an atomic message upsert - Merge JSON content on duplicate message IDs while preserving terminal status - Cover out-of-order ACP and aionrs tool-call event persistence
piorpua
pushed a commit
that referenced
this pull request
Jun 18, 2026
🤖 I have created a release *beep* *boop* --- ## [0.1.32](v0.1.31...v0.1.32) (2026-06-18) ### Features * **team:** centralize team MCP prompt governance ([#490](#490)) ([5485a95](5485a95)) ### Bug Fixes * **acp:** recover dead ACP connections ([#487](#487)) ([8264873](8264873)) * **conversation:** upsert streaming tool calls (AIO-30) ([#484](#484)) ([a0b3737](a0b3737)) ### Documentation * **skills:** add cross-platform notes so Windows users translate shell examples ([#489](#489)) ([e03b030](e03b030)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.
Multica issue: AIO-30
Root Cause
Streaming tool-call persistence used separate read/update/insert branches. Concurrent or out-of-order events for the same message ID could either hit a duplicate primary key error or lose fields when an update arrived before the initial insert.
Changes
messages.idconflicts.INSERT ... ON CONFLICT(id) DO UPDATEwith JSON merge semantics.finish/errorstatus when lateworkevents arrive.Verification
cargo test -p aionui-dbcargo test -p aionui-conversationcargo clippy -p aionui-db -- -D warningscargo clippy -p aionui-conversation -- -D warnings