Test fixture
Bug fixes, edge conditions, and minimal patch accuracy.
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 diagnosis, fix, tests. Event handlers created in a loop all read the final index, failing tests that click individual buttons. Diagnose and fix the closure capture bug.
{
"metrics": {
"repro": {
"checks": [
{
"contains": [
"final index"
]
},
{
"contains": [
"click"
]
},
{
"contains": [
"all handlers"
]
},
{
"contains": [
"loop"
]
}
]
},
"hidden": {
"checks": [
{
"contains": [
"let"
]
},
{
"contains": [
"capture"
]
},
{
"contains": [
"per iteration"
]
}
]
},
"diagnose": {
"checks": [
{
"contains": [
"closure"
]
},
{
"contains": [
"var"
]
},
{
"contains": [
"handler"
]
}
]
}
}
}temperature
0
max_tokens
420
timeout (s)
120
type
scored
file
debug-closure-loop-v2.json