Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: align fresh voice settings with Ollama default (#8415)
[._.]/ Adam Eivyc6bc48a58c39
diff --git a/data.reference/settings.json b/data.reference/settings.jsonindex 0cd6fc1b98..93d8b86982 100644--- a/data.reference/settings.json+++ b/data.reference/settings.json@@ -23,7 +23,7 @@}},"llm": {- "provider": "lmstudio",+ "provider": "ollama","model": "auto","systemPrompt": "You are the PortOS assistant. Your replies are spoken aloud — keep them short and use plain prose (no markdown or lists).","usePersonality": true,diff --git a/scripts/migrations/392-voice-llm-pin-lmstudio-default.test.js b/scripts/migrations/392-voice-llm-pin-lmstudio-default.test.jsindex f39914a2d6..f30bbdaedd 100644--- a/scripts/migrations/392-voice-llm-pin-lmstudio-default.test.js+++ b/scripts/migrations/392-voice-llm-pin-lmstudio-default.test.js@@ -1,9 +1,10 @@import { describe, it, expect, beforeEach, afterEach } from 'vitest';-import { mkdtempSync, rmSync, writeFileSync, readFileSync, mkdirSync, existsSync } from 'fs';+import { mkdtempSync, rmSync, writeFileSync, readFileSync, mkdirSync, existsSync, copyFileSync } from 'fs';import { tmpdir } from 'os';import { join } from 'path';import migration from './392-voice-llm-pin-lmstudio-default.js';+import retireKokoroTts from './376-retire-kokoro-tts.js';const writeJson = (path, value) => writeFileSync(path, JSON.stringify(value, null, 2) + '\n');const readJson = (path) => JSON.parse(readFileSync(path, 'utf-8'));@@ -55,6 +56,15 @@ describe('migration 392 — pin the outgoing voice LLM default', () => {expect(readJson(settingsPath).voice).toBeUndefined();});+ it('keeps the fresh settings seed on the current voice defaults through migrations 376 and 392', async () => {+ copyFileSync(new URL('../../data.reference/settings.json', import.meta.url), settingsPath);+ await retireKokoroTts.up({ rootDir });+ await migration.up({ rootDir });+ const settings = readJson(settingsPath);+ expect(settings.voice.llm.provider).toBe('ollama');+ expect(settings.voice.tts.engine).toBe('piper');+ });+it('is a no-op with no settings file', async () => {await expect(migration.up({ rootDir })).resolves.toBeUndefined();expect(existsSync(settingsPath)).toBe(false);diff --git a/server/services/voice/config.test.js b/server/services/voice/config.test.jsindex 72b39211bb..aed3f302b9 100644--- a/server/services/voice/config.test.js+++ b/server/services/voice/config.test.js@@ -1,4 +1,5 @@import { beforeEach, describe, expect, it, vi } from 'vitest';+import { readFile } from 'node:fs/promises';vi.mock('../settings.js', () => ({ getSettings: vi.fn(), updateSettings: vi.fn() }));const { getSettings, updateSettings } = await import('../settings.js');const { VOICE_DEFAULTS, getVoiceConfig, updateVoiceConfig, invalidateVoiceConfigCache } = await import('./config.js');@@ -25,6 +26,23 @@ describe('voice configuration defaults', () => {voice: 'warm-narrator',});});++ it('keeps every shipped voice setting aligned with its code default', async () => {+ const seed = JSON.parse(await readFile(new URL('../../../data.reference/settings.json', import.meta.url), 'utf8'));++ const assertSeedLeavesMatchDefaults = (defaults, values, path = 'voice') => {+ for (const [key, value] of Object.entries(values)) {+ const currentPath = `${path}.${key}`;+ if (value !== null && typeof value === 'object' && !Array.isArray(value)) {+ assertSeedLeavesMatchDefaults(defaults?.[key] || {}, value, currentPath);+ continue;+ }+ expect(defaults?.[key], `seed ${currentPath} must match VOICE_DEFAULTS`).toEqual(value);+ }+ };++ assertSeedLeavesMatchDefaults(VOICE_DEFAULTS, seed.voice);+ });});it('persists retirement acknowledgement without removing customized TTS settings', async () => {