Skip to content

fix(voice): reset user turn tracker on clear_user_turn#5857

Merged
longcw merged 1 commit into
mainfrom
longc/fix-clear-user-turn-tracker
May 27, 2026
Merged

fix(voice): reset user turn tracker on clear_user_turn#5857
longcw merged 1 commit into
mainfrom
longc/fix-clear-user-turn-tracker

Conversation

@longcw
Copy link
Copy Markdown
Contributor

@longcw longcw commented May 27, 2026

Summary

clear_user_turn() resets every per-turn state field except _turn_tracker, so word count, transcript, and started_at carry over from a discarded turn into the next one. With user_turn_limit configured, a push-to-talk cancel followed by a new turn can trip max_words or max_duration prematurely.

Fixes #5851.

clear_user_turn() resets every per-turn state field except _turn_tracker,
so word count, transcript, and started_at carry over from a discarded turn
into the next one. With user_turn_limit configured, a push-to-talk cancel
followed by a new turn can trip max_words or max_duration prematurely
(duration in particular compares against the canceled turn's start time).

Fixes #5851.
@chenghao-mou chenghao-mou requested a review from a team May 27, 2026 01:27
Copy link
Copy Markdown
Contributor

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

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 potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

Copy link
Copy Markdown
Member

@davidzhao davidzhao left a comment

Choose a reason for hiding this comment

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

lg!

@longcw longcw merged commit f9b68de into main May 27, 2026
26 checks passed
@longcw longcw deleted the longc/fix-clear-user-turn-tracker branch May 27, 2026 06:08
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.

[Detail Bug] Voice: Canceling a push-to-talk turn causes user turn limits to carry over to the next turn

2 participants