Skip to content

voice: a history reload publishes the history, not every item - #8616

Closed
longcw wants to merge 1 commit into
longc/self-hosted-delegationfrom
longc/history-reload
Closed

longcw wants to merge 1 commit into
longc/self-hosted-delegationfrom
longc/history-reload

Conversation

@longcw

@longcw longcw commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Problem: A history reload published every item of the record, model-only ones included, so a realtime model's placeholder for the person's words reached session.history. The transcript then added the same id again, the host's history held it twice, and the next delegation failed with "item IDs must be nonempty and unique".

Fix: Both reloads, after a turn takes the storage partition and on update_chat_ctx, publish history(), the items the history shows. A regression test runs realtime turns on a stored session and checks that no reload carries the placeholder.

Stacked on #8602.

Context for reviewing and coding agents

How to see it

storage::reload::a_reload_leaves_the_realtime_placeholder_out_of_the_history fails with "a reload carried the placeholder" when the storage reload publishes items() again. Without storage there is no reload, which is why it showed up only once a call had a thread.

Why the existing reload test missed it

an_answered_question_stays_answered_across_a_reload models the host's history as replace-by-id for every item. The host's SessionState::add replaces by id only for function call outputs and inserts any other known id again.

What is left

correct_user_words re-tells a corrected user message through replace_items as a second ItemAdded, which lands twice the same way. The TODO in SessionState::add marks it: a re-told item needs its own event, so the host can update the item in place without firing conversation_item_added again.

Failures not from this change

storage::fault::an_interrupted_turn_waits_on_its_checkpoint and storage::fault::bound_storage_faults_close_the_call_and_successful_receipts_finish_the_speech fail on the base branch too.

A reload published every item of the record, model-only ones among
them: a realtime model's placeholder for the person's words reached the
host's history, then the transcript told the same id again and the host
held it twice, so the next delegation refused the history.

Both reloads publish history(), the items the history shows.
@longcw
longcw requested a review from a team as a code owner November 18, 2026 03:45

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@longcw

longcw commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Moved to #8617: it doesn't depend on #8602, so it goes straight to v2.0.

@longcw longcw closed this Nov 18, 2026
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