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
test: drive messageSync selector reads through the strict reader mock (#12463)
[._.]/ Adam Eivy0190efd08347
diff --git a/server/services/messageSync.test.js b/server/services/messageSync.test.jsindex 75a3f0958b..8e0a066e47 100644--- a/server/services/messageSync.test.js+++ b/server/services/messageSync.test.js@@ -8,8 +8,17 @@ vi.mock('fs/promises', () => ({unlink: vi.fn()}));-vi.mock('../lib/fileUtils.js', () => ({- tryReadFile: vi.fn(),+vi.mock('../lib/fileUtils.js', () => {+ const tryReadFile = vi.fn();+ return {+ tryReadFile,+ // Strict JSON reads (selectors) are driven from the same bytes mock.+ readJSONFileStrict: async (path, fallback) => {+ const raw = await tryReadFile(path);+ if (raw == null) return { ok: true, value: fallback };+ try { return { ok: true, value: JSON.parse(raw) }; } catch { return { ok: false, value: fallback }; }+ },+ unreadableStoreError: (path) => new Error(`Unreadable JSON file: ${path}`),atomicWrite: vi.fn().mockResolvedValue(undefined),ensureDir: vi.fn(),PATHS: { messages: '/mock/data/messages' },