🔖 Checkpoint: Edit /workspaces/claude-code-flow/benchmark/src/swarm_benchmark/swe_bench/official_integration.py

This commit is contained in:
rUv committed 2025-08-07 14:59:45 +00:00
1 parent ed83e6dbbe
commit 71f3908580
3 files changed
+10 -16

No files matched your search

@@ -0,0 +1 @@
{"branch": "checkpoint/pre-edit-20250807-145928", "file": "/workspaces/claude-code-flow/benchmark/src/swarm_benchmark/swe_bench/official_integration.py", "timestamp": "2025-08-07T14:59:28Z", "type": "pre-edit", "original_branch": "swe-bench"}
@@ -0,0 +1 @@
{"tag": "checkpoint-20250807-145930", "file": "/workspaces/claude-code-flow/benchmark/src/swarm_benchmark/swe_bench/official_integration.py", "timestamp": "2025-08-07T14:59:30Z", "type": "post-edit", "branch": "swe-bench", "diff_summary": " .claude-flow/metrics/system-metrics.json | 36 ++++++++++++++++++++++ astropy_fix | 0 benchmark/.claude-flow/metrics/performance.json | 2 +- benchmark/.claude-flow/metrics/task-metrics.json | 6 ++-- benchmark/.claude/checkpoints/1754578758.json | 1 + benchmark/.claude/checkpoints/1754578760.json | 1 + .../swe_bench/official_integration.py | 1 + 7 files changed, 43 insertions(+), 4 deletions(-) "}
@@ -113,24 +113,16 @@ 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
# Create a comprehensive prompt with claude-flow context
simple_prompt = (
f"You are running in claude-flow hive-mind mode with {self.config.max_agents} workers. "
f"Your task is to fix GitHub issue {instance_id} in repository {repo}. "
f"Base commit: {base_commit}. "
f"Problem description: {problem[:300]}... "
f"REQUIREMENTS: "
f"1. Analyze the bug and identify the root cause "
f"2. Create a fix that resolves the issue "
f"3. Output ONLY a valid git diff patch to stdout "
f"4. The patch must apply cleanly to the base commit "
f"5. Include the patch between ```diff and ``` markers "
f"Generate the git diff patch now."
# Build prompt using the prompt builder
prompt_config = SWEBenchPromptConfig(
mode="hive-mind",
max_agents=self.config.max_agents,
include_validation=False,
output_format="patch"
)
# Remove problematic characters
simple_prompt = simple_prompt.replace('"', "'").replace('\n', ' ').replace('\r', ' ')
simple_prompt = ' '.join(simple_prompt.split()) # Normalize whitespace
prompt_builder = SWEBenchPromptBuilder(prompt_config)
simple_prompt = prompt_builder.build_prompt(instance)
# Build command as array for subprocess (avoids shell escaping issues)
# Use local claude-flow executable