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. A helper function assigns to a variable without let, const, or var; the variable becomes an implicit global and its value persists across separate function calls, corrupting subsequent results. Identify the missing declaration and fix it.
{
"metrics": {
"repro": {
"checks": [
{
"contains": [
"global"
]
},
{
"contains": [
"persists"
]
},
{
"contains": [
"across calls"
]
},
{
"contains": [
"variable"
]
}
]
},
"hidden": {
"checks": [
{
"contains": [
"const"
]
},
{
"contains": [
"let"
]
},
{
"contains": [
"declaration"
]
}
]
},
"diagnose": {
"checks": [
{
"contains": [
"implicit global"
]
},
{
"contains": [
"missing declaration"
]
},
{
"contains": [
"accidental global"
]
}
]
}
}
}temperature
0
max_tokens
420
timeout (s)
120
type
scored
file
debug-global-variable-pollution-v2.json