Skip to content

fix: stabilize realtime playback transitions and transcript scrolling - #332

Merged
torbys merged 7 commits into
1024XEngineer:devfrom
torbys:fix/realtime-playback-race
Aug 28, 2026
Merged

fix: stabilize realtime playback transitions and transcript scrolling#332
torbys merged 7 commits into
1024XEngineer:devfrom
torbys:fix/realtime-playback-race

Conversation

@torbys

@torbys torbys commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • prevent stale playback chunks and command feedback from being misclassified during runtime transitions
  • preserve transcript scrolling beneath the voice stage
  • document the assistant playback race investigation and remediation direction

Fixes #329

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown

Go coverage

Scope Current Baseline Delta
packages/contracts 89.6% 89.6% +0.0%
services/api 64.0% 64.0% +0.0%
services/realtime-audio 82.5% 82.6% -0.1%
Total 74.0% 74.0% +0.0%

Base branch: dev · Commit: 08cd0f7 · Test workflow run

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed the playback lifecycle, mode-switch cleanup, command interruption classification, and voice-stage hit testing. The focused realtime packages and race-enabled playback/pipeline/runtime tests pass. One remaining concurrency issue is called out inline: the new availability wait does not reserve the physical track, so independently started outputs can still race after the wait and lose their first chunk.

Comment thread services/realtime-audio/playback/service.go
@jinyu918

Copy link
Copy Markdown
Contributor

IGTM

@jinyu918 jinyu918 linked an issue Aug 28, 2026 that may be closed by this pull request
Comment thread services/realtime-audio/runtime/mode.go
Comment thread services/realtime-audio/pipeline/phrase_playback.go

@Gwen317 Gwen317 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.

The targeted playback-owner fix addresses the original mode-switch interruption race, but one P1 remains: phrase playback cleanup still clears the whole scheduler queue after the mode commit. A new-mode Turn admitted in that interval is marked superseded and its audio is dropped. Please fence cleanup to pre-switch work or serialize phrase admission with the transition.

All current GitHub checks are green, but I am not approving until this race is fixed.

Comment thread services/realtime-audio/pipeline/phrase_playback.go

@Gwen317 Gwen317 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.

已确认此前的问题均已处理:playback reservation 竞态、模式切换后的 owner 定向中断、切换后新 phrase 任务保留,以及主动取消任务不再被错误重试。最新 realtime race tests 和 GitHub CI 均通过,approve。

@torbys
torbys merged commit 9b79845 into 1024XEngineer:dev Aug 28, 2026
13 checks passed
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.

bug:语音播放状态与模式切换问题

3 participants