From 7a3b9102ec87fd39ee9205f2b1fb60b4c052662d Mon Sep 17 00:00:00 2001 From: rUv Date: Thu, 7 Aug 2025 15:00:09 +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/1754578794.json | 1 + benchmark/.claude/checkpoints/1754578796.json | 1 + .../swe_bench/official_integration.py | 29 +++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 benchmark/.claude/checkpoints/1754578794.json create mode 100644 benchmark/.claude/checkpoints/1754578796.json diff --git a/benchmark/.claude/checkpoints/1754578794.json b/benchmark/.claude/checkpoints/1754578794.json new file mode 100644 index 0000000000..2edd0e7c67 --- /dev/null +++ b/benchmark/.claude/checkpoints/1754578794.json @@ -0,0 +1 @@ +{"branch": "checkpoint/pre-edit-20250807-145954", "file": "/workspaces/claude-code-flow/benchmark/src/swarm_benchmark/swe_bench/official_integration.py", "timestamp": "2025-08-07T14:59:54Z", "type": "pre-edit", "original_branch": "swe-bench"} diff --git a/benchmark/.claude/checkpoints/1754578796.json b/benchmark/.claude/checkpoints/1754578796.json new file mode 100644 index 0000000000..f8f3f814d7 --- /dev/null +++ b/benchmark/.claude/checkpoints/1754578796.json @@ -0,0 +1 @@ +{"tag": "checkpoint-20250807-145956", "file": "/workspaces/claude-code-flow/benchmark/src/swarm_benchmark/swe_bench/official_integration.py", "timestamp": "2025-08-07T14:59:56Z", "type": "post-edit", "branch": "swe-bench", "diff_summary": " .claude-flow/metrics/system-metrics.json | 48 ++++++++++++++++++++++ astropy_fix | 0 benchmark/.claude-flow/metrics/performance.json | 2 +- benchmark/.claude-flow/metrics/task-metrics.json | 6 +-- benchmark/.claude/checkpoints/1754578783.json | 1 + benchmark/.claude/checkpoints/1754578785.json | 1 + .../swe_bench/official_integration.py | 4 ++ 7 files changed, 58 insertions(+), 4 deletions(-) "} diff --git a/benchmark/src/swarm_benchmark/swe_bench/official_integration.py b/benchmark/src/swarm_benchmark/swe_bench/official_integration.py index e389702a3f..a268245241 100644 --- a/benchmark/src/swarm_benchmark/swe_bench/official_integration.py +++ b/benchmark/src/swarm_benchmark/swe_bench/official_integration.py @@ -304,6 +304,35 @@ Return ONLY the git diff patch in proper format.""" print(f" ⚠️ No patch found in content") return result + + def _find_generated_patch_files(self, instance_id: str) -> str: + """Look for generated patch files in the working directory.""" + import glob + + # Look for patch files that might have been created + potential_patterns = [ + f"*{instance_id}*.patch", + f"*{instance_id}*.diff", + "*.patch", + "*.diff", + f"astropy_fix/*.patch", # Check the cloned repo directory + f"astropy_fix/*.diff" + ] + + for pattern in potential_patterns: + files = glob.glob(pattern) + if files: + # Read the first matching file + try: + with open(files[0], 'r') as f: + content = f.read() + if 'diff' in content or '---' in content or '+++' in content: + print(f" ✅ Found patch file: {files[0]}") + return content + except Exception as e: + print(f" ⚠️ Error reading patch file {files[0]}: {e}") + + return "" async def run_evaluation( self,