Repository navigation
fix(voice-call): keep late caller transcripts ahead of replies - #191602
Merged
Merged
Conversation
Carry observed turn starts into the transcript append owner so late caller finals retain dialogue order. Preserve repeated phrases and existing playback and persistence behavior. Co-authored-by: Marcin Nowrot <[email protected]>
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
roboclaw-bot
marked this pull request as ready for review
November 3, 2026 01:57
roboclaw-bot
enabled auto-merge (squash)
November 3, 2026 02:02
Collaborator
Author
|
Merged via squash auto-merge.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 3, 2026
…law#191602) Fixes realtime voice-call transcripts recording a late-finalized caller turn after its assistant reply. Carry observed turn starts into the existing transcript-append owner and retain repeated utterances. Supersedes openclaw#159143, thanks @mnowrot. Related: openclaw#159138 The 65-line regression allocation covers real carrier WebSocket ingress through persisted SQLite dialogue order, including partial-text and speech-start paths and repeated caller phrases. Both cases failed on main; 132 focused tests and touched-file lint/format pass remotely. Independent Codex autoreview P0-P2 was scoped-clean. Co-authored-by: Marcin Nowrot <[email protected]>
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.
Supersedes #159143, thanks @mnowrot.
Related: #159138
What Problem This Solves
Fixes realtime voice-call transcripts showing an assistant reply before the caller turn when speech recognition finalizes the caller late.
User Impact
Saved call dialogue and subsequent agent consultations retain the caller/reply order, including repeated caller phrases. Existing transcripts are unchanged; a provider with no speech-start event or partial text still uses the first available transcript timestamp.
Why This Change Was Made
Capture each speaker's observed turn start and pass it to the existing transcript-append owner, which orders entries by timestamp. Equal timestamps retain arrival order. Timestamp tracking resets on finalization, rejected caller finals, and provider continuity reset. This is only the core ordering repair; it does not add the original PR's cumulative-transcript ledger.
The change builds on #191584, #191537, and #191498. The pr-simplify pass retained only the timestamp path and owner ordering. Production growth is 13 lines for turn timestamps and owner ordering; there is no dead ordering implementation to remove. The regression adds 65 lines in an existing store integration suite, with a matching test-line allocation for carrier ingress through real SQLite persistence.
Evidence
abeffef677121a92e8ea70274e18385a2d2a7ff9, storing each reply before its caller. The cases also preserve two distinct “Yes.” turns.manager.async-store.test.ts,manager/events.test.ts,manager/outbound.test.ts, andwebhook/realtime-handler.test.ts. This includes the existing greeting, echo, and continuity-reset coverage. Touched-file lint reported zero warnings/errors, and touched-file formatting passed.gh pr view/gh pr diffand was never checked out or executed. Only the independently implemented replacement was executed, on the remote Testbox. No paid phone/provider call was made.