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: mock PATHS.data in scaffold/agentTuiSpawning fileUtils mocks
[._.]/ Adam Eivybfa4f02f5c2f
diff --git a/server/routes/scaffold.test.js b/server/routes/scaffold.test.jsindex 15c59a034e..4f19e369ea 100644--- a/server/routes/scaffold.test.js+++ b/server/routes/scaffold.test.js@@ -6,9 +6,14 @@ import { request } from '../lib/testHelper.js';// --- Mock the filesystem + subprocess boundary so we can assert ZERO// mutations happen when a request fails validation (issue #2390). ---+// PATHS.data is required here too: scaffold.js pulls in lib/validation.js ->+// subscriptionSavings.js -> postStreak.js -> activeDays.js -> timezone.js ->+// services/settings.js, whose module-scope `join(PATHS.data, 'settings.json')`+// throws on load if this mock omits PATHS (#4211 added the activeDays.js edge).vi.mock('../lib/fileUtils.js', () => ({ensureDir: vi.fn().mockResolvedValue(undefined),- expandHome: (p) => p+ expandHome: (p) => p,+ PATHS: { data: '/mock/data' }}));vi.mock('fs/promises', () => ({diff --git a/server/services/agentTuiSpawning.test.js b/server/services/agentTuiSpawning.test.jsindex aeecdaccd5..ad03696672 100644--- a/server/services/agentTuiSpawning.test.js+++ b/server/services/agentTuiSpawning.test.js@@ -155,7 +155,14 @@ vi.mock('../lib/fileUtils.js', async (importOriginal) => ({// agentSentinel.parseSentinelPayload, etc.); only stub the I/O + PATHS....(await importOriginal()),tryReadFile: vi.fn().mockResolvedValue(null),- PATHS: { root: '/tmp/portos-root' }+ // `data` is required alongside `root`: this module pulls in taskTypeHooks.js+ // -> ... -> lib/validation.js -> subscriptionSavings.js -> postStreak.js ->+ // activeDays.js -> timezone.js -> services/settings.js, whose module-scope+ // `join(PATHS.data, 'settings.json')` throws on load without it (#4211+ // added the activeDays.js edge). The bare `PATHS: {...}` below fully+ // replaces the real object (it doesn't merge), so every member this graph+ // needs at import time has to be listed explicitly.+ PATHS: { root: '/tmp/portos-root', data: '/tmp/portos-root/data' }}));vi.mock('../lib/providerModels.js', async (importOriginal) => ({