From 589a74f4a8175331ff3bb670a8c6d50dfe5a7649 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 5 Apr 2026 19:59:16 +0000 Subject: [PATCH] Fix review comments: remove empty string concat, fix variable scoping in BFCL evaluate Agent-Logs-Url: https://github.com/HarnessLab/claw-code-agent/sessions/6890e3d0-3058-4b1f-b7e5-27171c079c62 Co-authored-by: abdoelsayed2016 <27821589+abdoelsayed2016@users.noreply.github.com> --- benchmarks/suites/bfcl.py | 5 +++-- benchmarks/suites/mbpp.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/benchmarks/suites/bfcl.py b/benchmarks/suites/bfcl.py index b65d791..9df321f 100644 --- a/benchmarks/suites/bfcl.py +++ b/benchmarks/suites/bfcl.py @@ -320,6 +320,7 @@ class BFCLBenchmark(BenchmarkSuite): problem_id=pid, passed=False, error="solution.py not found" ) + output = "" test_harness = os.path.join(workspace, "test_harness.py") if os.path.exists(test_harness): code, output = self._run_shell( @@ -335,6 +336,6 @@ class BFCLBenchmark(BenchmarkSuite): return BenchmarkResult( problem_id=pid, passed=passed, - actual=output[:500] if "output" in dir() else "", - error="" if passed else (output[:500] if "output" in dir() else "function call not found"), + actual=output[:500], + error="" if passed else (output[:500] if output else "function call not found"), ) diff --git a/benchmarks/suites/mbpp.py b/benchmarks/suites/mbpp.py index 5eeecc6..755fd2b 100644 --- a/benchmarks/suites/mbpp.py +++ b/benchmarks/suites/mbpp.py @@ -90,7 +90,7 @@ _BUILTIN_PROBLEMS: list[dict[str, Any]] = [ "code": 'import re\ndef find_char_long(text):\n return (re.findall(r"\\b\\w{4,}\\b", text))', "test_list": [ 'assert find_char_long(\'Please move back to stream\') == [\'Please\', \'move\', \'back\', \'stream\']', - 'assert find_char_long(\'Joveacvber gfnbb vcdf\') == [\'Jove\', \'acvber\', \'gfnbb\', \'vcdf\']' + "", + 'assert find_char_long(\'Joveacvber gfnbb vcdf\') == [\'Jove\', \'acvber\', \'gfnbb\', \'vcdf\']', 'assert find_char_long(\'Davvede aridge\') == [\'Davvede\', \'aridge\']', ], },