Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

test(mcp): model missing filesystem reads as ENOENT

Rudy Celekli751cd32ab1b9
diff --git a/v3/@claude-flow/cli/__tests__/mcp-tools-deep.test.ts b/v3/@claude-flow/cli/__tests__/mcp-tools-deep.test.ts
index 6077bfeef0..81db380186 100644
--- a/v3/@claude-flow/cli/__tests__/mcp-tools-deep.test.ts
+++ b/v3/@claude-flow/cli/__tests__/mcp-tools-deep.test.ts
@@ -24,7 +24,12 @@ vi.mock('node:fs', () => {
let nextDescriptor = 3;
return {
existsSync: vi.fn((p: string) => memStore.has(p)),
- readFileSync: vi.fn((p: string) => memStore.get(p) || '{}'),
+ readFileSync: vi.fn((p: string) => {
+ if (!memStore.has(p)) {
+ throw Object.assign(new Error(`ENOENT: no such file or directory, open '${p}'`), { code: 'ENOENT' });
+ }
+ return memStore.get(p)!;
+ }),
writeFileSync: vi.fn((p: string, d: string) => memStore.set(p, d)),
renameSync: vi.fn((from: string, to: string) => {
memStore.set(to, memStore.get(from) || '');
@@ -57,7 +62,12 @@ vi.mock('fs', () => {
let nextDescriptor = 3;
return {
existsSync: vi.fn((p: string) => memStore.has(p)),
- readFileSync: vi.fn((p: string) => memStore.get(p) || '{}'),
+ readFileSync: vi.fn((p: string) => {
+ if (!memStore.has(p)) {
+ throw Object.assign(new Error(`ENOENT: no such file or directory, open '${p}'`), { code: 'ENOENT' });
+ }
+ return memStore.get(p)!;
+ }),
writeFileSync: vi.fn((p: string, d: string) => memStore.set(p, d)),
renameSync: vi.fn((from: string, to: string) => {
memStore.set(to, memStore.get(from) || '');