Test fixture
Code transformation while preserving behavior and intent.
The model receives the prompt (and optional system message). The run uses scorer rubric_json_metrics with the JSON configuration below. Pass/fail and partial credit are determined entirely by that scorer against the model output; no human grading.
Return JSON only with keys refactor, rationale, tests. Refactor nested Node-style callbacks into async/await while preserving error-first behavior and cleanup ordering.
{
"metrics": {
"visible": {
"checks": [
{
"contains": [
"async/await"
]
},
{
"contains": [
"callbacks"
]
},
{
"contains": [
"error-first"
]
}
]
},
"hidden": {
"checks": [
{
"contains": [
"cleanup ordering"
]
},
{
"contains": [
"nested"
]
},
{
"contains": [
"preserve"
]
}
]
},
"intent": {
"checks": [
{
"contains": [
"modernization"
]
},
{
"contains": [
"control flow"
]
},
{
"contains": [
"legacy"
]
}
]
}
}
}temperature
0
max_tokens
460
timeout (s)
120
type
scored
file
refactor-legacy-callbacks-async.json