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
address review: kokoro import failure resets loadedKey, drop dead missedExamples branches, timeout on tailscale status exec
Adam Eivyffc0d39cf5e2
diff --git a/server/routes/instances.js b/server/routes/instances.jsindex 024827f538..9acd32bb70 100644--- a/server/routes/instances.js+++ b/server/routes/instances.js@@ -92,7 +92,7 @@ router.get('/sync-status', asyncHandler(async (req, res) => {router.get('/tailnet-suffix', asyncHandler(async (req, res) => {const bin = findTailscale();if (!bin) return res.json({ suffix: null, reason: 'tailscale-not-installed' });- const { stdout } = await execFileAsync(bin, ['status', '--json']).catch(() => ({ stdout: null }));+ const { stdout } = await execFileAsync(bin, ['status', '--json'], { timeout: 5000 }).catch(() => ({ stdout: null }));if (!stdout) return res.json({ suffix: null, reason: 'tailscale-not-running' });// Guard against non-JSON output (warnings, partial reads, etc.) so we never 500 the endpoint.const status = safeJsonParse(stdout);diff --git a/server/services/meatspacePostLlm.js b/server/services/meatspacePostLlm.jsindex f393a1c98f..311b51fdd9 100644--- a/server/services/meatspacePostLlm.js+++ b/server/services/meatspacePostLlm.js@@ -562,16 +562,10 @@ function scoreLocalCompoundChain(drillData, userResponses) {const fb = valid.length >= target? `${valid.length} valid compounds — great job!`: `${valid.length} valid compound${valid.length !== 1 ? 's' : ''} (target: ${target})`;- // Show examples the user didn't find — match against either full compound or- // the half (with root stripped from front or back).- const missedExamples = (challenge.examples || []).filter(ex => {- const exNorm = norm(ex);- if (coveredFull.has(exNorm)) return false;- // Also match if user typed just the half that pairs with the example.- if (exNorm.startsWith(root) && coveredFull.has(exNorm)) return false;- if (exNorm.endsWith(root) && coveredFull.has(exNorm)) return false;- return true;- });+ // Show examples the user didn't find. `coveredFull` already contains the+ // user's valid compounds plus `root+half`/`half+root` pairings, so a single+ // membership check covers both full-compound and half-word inputs.+ const missedExamples = (challenge.examples || []).filter(ex => !coveredFull.has(norm(ex)));return { score, feedback: fb, validCount: valid.length, invalidItems: invalid, missedExamples };});const overallScore = averageScore(scores);diff --git a/server/services/voice/tts-kokoro.js b/server/services/voice/tts-kokoro.jsindex a713bfb7ff..4cd29a0f24 100644--- a/server/services/voice/tts-kokoro.js+++ b/server/services/voice/tts-kokoro.js@@ -14,7 +14,13 @@ const ensureModel = async ({ modelId, dtype }) => {if (modelPromise && loadedKey === key) return modelPromise;loadedKey = key;loaded = false;- const { KokoroTTS } = await import('kokoro-js');+ let KokoroTTS;+ try {+ ({ KokoroTTS } = await import('kokoro-js'));+ } catch (err) {+ loadedKey = null;+ throw err;+ }console.log(`🗣 kokoro: loading ${modelId} (dtype=${dtype})`);const started = Date.now();// Capture the in-flight promise so the then/catch handlers only mutate