Test fixture
Code transformation while preserving behavior and intent.
The model receives the prompt (and optional system message). The run uses scorer contains_any with the JSON configuration below. Pass/fail and partial credit are determined entirely by that scorer against the model output; no human grading.
Refactor without changing behavior. Return only Python code.
def filter_orders_07(orders):
out = []
for o in orders:
if o is not None:
if o.get('status') == 'paid':
if o.get('total', 0) > 0:
out.append(o)
return out
{
"expected_contains": [
"if not o",
"continue",
"out.append(o)"
]
}temperature
0
max_tokens
320
timeout (s)
120
type
scored
file
refactoring_hard_07.json