Skip to content

fix(conversation): upsert streaming tool calls (AIO-30)#484

Merged
TCP404 merged 1 commit into
mainfrom
boii/fix/aio-30
Jun 18, 2026
Merged

fix(conversation): upsert streaming tool calls (AIO-30)#484
TCP404 merged 1 commit into
mainfrom
boii/fix/aio-30

Conversation

@TCP404

@TCP404 TCP404 commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

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

  • Added a repository-level message upsert for messages.id conflicts.
  • Implemented SQLite INSERT ... ON CONFLICT(id) DO UPDATE with JSON merge semantics.
  • Preserved terminal finish / error status when late work events arrive.
  • Routed ACP and aionrs tool-call persistence through the upsert path.
  • Added regression coverage for out-of-order ACP and aionrs tool-call events.

Verification

  • cargo test -p aionui-db
  • cargo test -p aionui-conversation
  • cargo clippy -p aionui-db -- -D warnings
  • cargo clippy -p aionui-conversation -- -D warnings

- 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
@TCP404 TCP404 merged commit a0b3737 into main Jun 18, 2026
6 checks passed
@TCP404 TCP404 deleted the boii/fix/aio-30 branch June 18, 2026 03:07
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>
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.

1 participant