Spaces:
Sleeping
Sleeping
gary-boon
Claude
commited on
Commit
·
1d23728
1
Parent(s):
4444ae2
Fix SWE-bench service to return full problem statements
Browse files- Return complete problem_statement instead of truncating at 500 chars
- Enables frontend to display full multi-line issue descriptions
- Fixes issue where problems were showing as one-liners
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
backend/swe_bench_service.py
CHANGED
|
@@ -163,7 +163,7 @@ class SWEBenchService:
|
|
| 163 |
'repo': t.repo,
|
| 164 |
'category': t.category,
|
| 165 |
'difficulty': t.difficulty,
|
| 166 |
-
'problem_statement': t.problem_statement
|
| 167 |
'created_at': t.created_at,
|
| 168 |
'has_patch': t.patch is not None,
|
| 169 |
'has_tests': t.test_patch is not None,
|
|
@@ -190,6 +190,7 @@ class SWEBenchService:
|
|
| 190 |
'version': task.version,
|
| 191 |
'patch_preview': task.patch[:1000] if task.patch else None,
|
| 192 |
'test_preview': task.test_patch[:1000] if task.test_patch else None,
|
|
|
|
| 193 |
'fail_to_pass': task.FAIL_TO_PASS,
|
| 194 |
'pass_to_pass': task.PASS_TO_PASS,
|
| 195 |
'patch_size': len(task.patch.split('\n')) if task.patch else 0,
|
|
|
|
| 163 |
'repo': t.repo,
|
| 164 |
'category': t.category,
|
| 165 |
'difficulty': t.difficulty,
|
| 166 |
+
'problem_statement': t.problem_statement, # Return full problem statement
|
| 167 |
'created_at': t.created_at,
|
| 168 |
'has_patch': t.patch is not None,
|
| 169 |
'has_tests': t.test_patch is not None,
|
|
|
|
| 190 |
'version': task.version,
|
| 191 |
'patch_preview': task.patch[:1000] if task.patch else None,
|
| 192 |
'test_preview': task.test_patch[:1000] if task.test_patch else None,
|
| 193 |
+
'gold_patch': task.patch, # Include full gold patch
|
| 194 |
'fail_to_pass': task.FAIL_TO_PASS,
|
| 195 |
'pass_to_pass': task.PASS_TO_PASS,
|
| 196 |
'patch_size': len(task.patch.split('\n')) if task.patch else 0,
|