Skip to content

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

fix(test): give pipeline route test the CoS path keys Series Autopilot needs

[._.]/ Adam Eivy8ce8e0d5a60d
diff --git a/server/routes/pipeline.test.js b/server/routes/pipeline.test.js
index a870a146f4..0aa79be294 100644
--- a/server/routes/pipeline.test.js
+++ b/server/routes/pipeline.test.js
@@ -8,8 +8,14 @@ const fileStore = new Map();
vi.mock('../lib/fileUtils.js', () => ({
tryReadFile: vi.fn().mockResolvedValue(null),
- PATHS: { data: '/mock/data' },
+ // Series Autopilot gates on the cos autonomy domain, so the pipeline route
+ // graph now transitively imports `services/cosState.js`, which computes
+ // `join(PATHS.cos, …)` at module load. The mock must therefore carry the
+ // CoS/reports/scripts/root path keys it reads, not just `data`.
+ PATHS: { data: '/mock/data', cos: '/mock/cos', reports: '/mock/reports', scripts: '/mock/scripts', root: '/mock/root' },
ensureDir: vi.fn().mockResolvedValue(undefined),
+ ensureDirs: vi.fn().mockResolvedValue(undefined),
+ safeJSONParse: vi.fn((s, fallback) => { try { return JSON.parse(s); } catch { return fallback; } }),
atomicWrite: vi.fn(async (path, data) => { fileStore.set(path, data); }),
readJSONFile: vi.fn(async (path, fallback) => (fileStore.has(path) ? fileStore.get(path) : fallback)),
}));