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 plan, refactor, tests. A worker dispatches job types through a switch statement with repeated logging and timing code. Refactor the dispatch table and common instrumentation.
{
"metrics": {
"intent": {
"checks": [
{
"contains": [
"switch statement"
]
},
{
"contains": [
"dispatch table"
]
},
{
"contains": [
"instrumentation"
]
}
]
},
"visible": {
"checks": [
{
"contains": [
"job types"
]
},
{
"contains": [
"logging"
]
},
{
"contains": [
"timing"
]
}
]
},
"hidden": {
"checks": [
{
"contains": [
"unknown job"
]
},
{
"contains": [
"same handlers"
]
},
{
"contains": [
"tests"
]
}
]
}
}
}temperature
0
max_tokens
500
timeout (s)
120
type
scored
file
refactor-worker-job-dispatch.json