test(xai): tolerate missing VAD truncate acknowledgment (#163529)

Co-authored-by: roboclaw-bot <309084314+roboclaw-bot@users.noreply.github.com>
Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com>
This commit is contained in:
RoboClaw 2026-10-02 05:59:35 -07:00 • committed by GitHub
parent 5e68ddca11
commit 6e63f2812a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -617,9 +617,11 @@ describeLive("xai plugin live", () => {
"server-VAD audio barge-in",
() => {
const serverBargeInEvents = new Set(serverEvents.slice(bargeInServerEventStart));
// xAI does not consistently echo `conversation.item.truncated`; the
// outbound truncate plus cleared playback and continued response prove
// the user-visible interruption contract without depending on that ack.
return (
serverBargeInEvents.has("input_audio_buffer.speech_started") &&
serverBargeInEvents.has("conversation.item.truncated") &&
clientEvents.slice(bargeInClientEventStart).includes("conversation.item.truncate") &&
clearAudioReasons.includes("barge-in")
);