Mark server-live sidecar passes as live mode and cover the stream heartbeat with a test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas WintherandClaude Opus 5.5 committed 2026-10-29 21:37:01 +01:00
1 parent dc64bb8198
commit afce794cbf
5 files changed
+41 -8

No files matched your search

+3 -2
View File
@@ -111,7 +111,7 @@ function sessionData(overrides: Partial<LiveSessionData> = {}): LiveSessionData
}
describe("createLiveWebSocket", () => {
test("a committed segment writes the exact PCM bytes and passes model/language/task through", async () => {
test("a committed segment writes the exact PCM bytes and passes model/language/task/mode through", async () => {
const tempDir = await makeTempDir();
const sidecar = fakeSidecar();
const handler = createLiveWebSocket({ sidecar });
@@ -123,7 +123,8 @@ describe("createLiveWebSocket", () => {
await waitFor(() => sidecar.requests.length > 0);
expect(sidecar.requests[0]).toEqual(
expect.objectContaining({ model: "base", language: "da", task: "translate" }),
// Live passes are short: sequential decoding, no batching/VAD (D-WS5a).
expect.objectContaining({ model: "base", language: "da", task: "translate", mode: "live" }),
);
// The bytes written to the temp file are exactly the committed segment's
// samples — not, e.g., a whole shared buffer (see the byteOffset/byteLength fix).