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

🔖 Checkpoint: Edit /workspaces/claude-code-flow/benchmark/src/swarm_benchmark/optimization/engine.py

rUv6215f7a6958b
diff --git a/benchmark/.claude/checkpoints/1754447953.json b/benchmark/.claude/checkpoints/1754447953.json
new file mode 100644
index 0000000000..3f26d75068
--- /dev/null
+++ b/benchmark/.claude/checkpoints/1754447953.json
@@ -0,0 +1 @@
+{"branch": "checkpoint/pre-edit-20250806-023913", "file": "/workspaces/claude-code-flow/benchmark/tests/test_cli.py", "timestamp": "2025-08-06T02:39:13Z", "type": "pre-edit", "original_branch": "alpha-88"}
diff --git a/benchmark/.claude/checkpoints/1754447955.json b/benchmark/.claude/checkpoints/1754447955.json
new file mode 100644
index 0000000000..ec55e30495
--- /dev/null
+++ b/benchmark/.claude/checkpoints/1754447955.json
@@ -0,0 +1 @@
+{"tag": "checkpoint-20250806-023915", "file": "/workspaces/claude-code-flow/benchmark/tests/test_cli.py", "timestamp": "2025-08-06T02:39:15Z", "type": "post-edit", "branch": "alpha-88", "diff_summary": " .claude-flow/metrics/system-metrics.json | 108 ++++++++++ benchmark/.claude-flow/metrics/performance.json | 2 +- benchmark/.claude-flow/metrics/task-metrics.json | 6 +- benchmark/.claude/checkpoints/1754447933.json | 1 + benchmark/.claude/checkpoints/1754447935.json | 1 + .../optimized_benchmark_engine.cpython-312.pyc | Bin 15770 -> 15428 bytes benchmark/tests/test_cli.py | 238 +++++++++++++++++++++ claude-flow-wiki | 0 8 files changed, 352 insertions(+), 4 deletions(-) "}
diff --git a/benchmark/src/swarm_benchmark/optimization/engine.py b/benchmark/src/swarm_benchmark/optimization/engine.py
index aa160eb966..0162276185 100644
--- a/benchmark/src/swarm_benchmark/optimization/engine.py
+++ b/benchmark/src/swarm_benchmark/optimization/engine.py
@@ -380,8 +380,15 @@ class AsyncFileManager:
# Write file asynchronously
json_str = json.dumps(data, indent=2 if pretty else None, default=str)
- async with aiofiles.open(file_path, 'w') as f:
- await f.write(json_str)
+ if AIOFILES_AVAILABLE and aiofiles:
+ async with aiofiles.open(file_path, 'w') as f:
+ await f.write(json_str)
+ else:
+ # Fallback to synchronous write
+ with open(file_path, 'w') as f:
+ f.write(json_str)
+ # Simulate async behavior
+ await asyncio.sleep(0.001)
except Exception as e:
print(f"Error writing JSON to {file_path}: {e}")