From bb2179f3f26d74bed688186e25eecbacd5d0548a Mon Sep 17 00:00:00 2001 From: rUv Date: Thu, 7 Aug 2025 14:06:28 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=96=20Checkpoint:=20Edit=20/workspaces?= =?UTF-8?q?/claude-code-flow/benchmark/src/swarm=5Fbenchmark/swe=5Fbench/o?= =?UTF-8?q?fficial=5Fintegration.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- benchmark/.claude/checkpoints/task-1754575556.json | 1 + .../swe_bench/official_integration.py | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 benchmark/.claude/checkpoints/task-1754575556.json diff --git a/benchmark/.claude/checkpoints/task-1754575556.json b/benchmark/.claude/checkpoints/task-1754575556.json new file mode 100644 index 0000000000..1c2ea12b9b --- /dev/null +++ b/benchmark/.claude/checkpoints/task-1754575556.json @@ -0,0 +1 @@ +{"checkpoint": "task-20250807-140555", "task": "review the existing benchmark/src i think it already uses the correct npx commands ", "timestamp": "2025-08-07T14:05:56Z", "commit": "ad0b0d211b932ffd1fbd9f281cf8516f6422028d", "github_release": "true"} diff --git a/benchmark/src/swarm_benchmark/swe_bench/official_integration.py b/benchmark/src/swarm_benchmark/swe_bench/official_integration.py index 8f1b2278b4..b11812dbc4 100644 --- a/benchmark/src/swarm_benchmark/swe_bench/official_integration.py +++ b/benchmark/src/swarm_benchmark/swe_bench/official_integration.py @@ -112,18 +112,25 @@ Generate a git diff patch that fixes this issue. The patch should: Return ONLY the git diff patch in proper format.""" # Execute with Claude Flow using optimal configuration + # Escape the task prompt for shell + escaped_prompt = task_prompt.replace('"', '\\"').replace('\n', ' ') + # Use swarm or hive-mind based on complexity if self.config.mode == CoordinationMode.MESH: # Use hive-mind for complex mesh coordination - cmd = f"""npx claude-flow@alpha hive-mind spawn "{task_prompt}" --claude --non-interactive""" + cmd = f'npx claude-flow@alpha hive-mind spawn "{escaped_prompt}" --claude --non-interactive' else: - # Use swarm for other modes - cmd = f"""npx claude-flow@alpha swarm "{task_prompt}" --non-interactive --claude""" + # Use swarm for other modes + cmd = f'npx claude-flow@alpha swarm "{escaped_prompt}" --claude --non-interactive' # Add configuration options if self.config.max_agents: cmd += f" --agents {self.config.max_agents}" + # Add strategy for swarm + if self.config.mode != CoordinationMode.MESH: + cmd += f" --strategy {self.config.strategy.value.lower()}" + print(f" 📋 Executing: {cmd[:100]}...") # Run with timeout