From 233285fe120c7f99a397aa756cd40e84b5dcd44a Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Sat, 12 Sep 2026 13:01:49 -0700 Subject: [PATCH] test: retain radio schema and voice mutation checks after formatting --- scripts/qa-firstrun-mutations.mjs | 8 ++++---- src/radioMarkup.test.mjs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/qa-firstrun-mutations.mjs b/scripts/qa-firstrun-mutations.mjs index 7e6ec1c82..3d5f15ba5 100644 --- a/scripts/qa-firstrun-mutations.mjs +++ b/scripts/qa-firstrun-mutations.mjs @@ -13,8 +13,8 @@ * * Every touched file is restored on exit, including on failure. * - * NOTE: two mutations edit server/providers/openai/instructions.js, and a running dev server watches that - * file and restarts on every write. Writes are therefore content-guarded below + * NOTE: two mutations edit the server voice tools/instructions, and a running dev server watches those + * files and restarts on every write. Writes are therefore content-guarded below * so the file is touched exactly twice per mutation instead of on every * iteration — enough that a dev server survives, but expect it to restart. If * you are mid-QA on a live server, run this before or after, not during. @@ -460,8 +460,8 @@ const MUTATIONS = [ { defect: 'the instruction mapping is dropped, so voice cannot reach the modes', file: 'voiceInstructions', - from: " 'NAMED VIEWS are shorthand", - to: " // 'NAMED VIEWS are shorthand", + from: " 'NAMED VIEWS are shorthand", + to: " // 'NAMED VIEWS are shorthand", }, ]; diff --git a/src/radioMarkup.test.mjs b/src/radioMarkup.test.mjs index 0bae46d92..d360ec2f1 100644 --- a/src/radioMarkup.test.mjs +++ b/src/radioMarkup.test.mjs @@ -276,7 +276,7 @@ test('panel collapse is presentation-only and Radio exposes explicit voice playb assert.match(voice, /'radio-panel'/); assert.match(voice, /'radio'/); assert.match(voice, /name:\s*'control_radio'/); - assert.match(voice, /enum:\s*\['enable', 'disable', 'play', 'resume', 'pause', 'stop', 'next', 'previous', 'volume', 'select', 'status'\]/); + assert.deepEqual(realtimeTools().find(tool => tool.name === 'control_radio').parameters.properties.action.enum, ['enable', 'disable', 'play', 'resume', 'pause', 'stop', 'next', 'previous', 'volume', 'select', 'status']); const enableStart = ui.lastIndexOf('\n _initRadioPanel()'); const enableMethod = ui.slice(enableStart, ui.indexOf('\n _renderRadioState(state)', enableStart)); assert.doesNotMatch(enableMethod, /playSelectedRadio|togglePlayback\(\).*radio-enable/i);