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 active_ids_04(users):
out = []
for user in users:
if user.get('active') == True:
out.append(user['id'])
return out
{
"expected_contains": [
"for user in users",
"user.get('active')",
"out.append"
]
}temperature
0
max_tokens
320
timeout (s)
120
type
scored
file
refactoring_hard_04.json