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(analyze): isolate cached graph fixtures by unique directory

Rudy Celekli62265fa4cee5
diff --git a/v3/@claude-flow/cli/__tests__/ruvector/graph-analyzer.test.ts b/v3/@claude-flow/cli/__tests__/ruvector/graph-analyzer.test.ts
index bb71b09ed2..1405fb34a8 100644
--- a/v3/@claude-flow/cli/__tests__/ruvector/graph-analyzer.test.ts
+++ b/v3/@claude-flow/cli/__tests__/ruvector/graph-analyzer.test.ts
@@ -24,7 +24,7 @@ import {
type CircularDependency,
type GraphAnalysisResult,
} from '../../src/ruvector/graph-analyzer.js';
-import { mkdir, writeFile, rm } from 'fs/promises';
+import { mkdir, mkdtemp, writeFile, rm } from 'fs/promises';
import { spawnSync } from 'child_process';
import { createRequire } from 'module';
import { join } from 'path';
@@ -41,8 +41,9 @@ describe('Graph Analyzer', () => {
let testDir: string;
beforeEach(async () => {
- testDir = join(tmpdir(), `graph-test-${Date.now()}`);
- await mkdir(testDir, { recursive: true });
+ // Graphs are cached by path. Date.now() can repeat for adjacent tests,
+ // causing a fixture to receive the preceding test's cached graph.
+ testDir = await mkdtemp(join(tmpdir(), 'graph-test-'));
});
afterEach(async () => {