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 validator reuses a global regular expression with test(), causing alternating true and false results for the same input. Identify the bug and fix.
{
"metrics": {
"repro": {
"checks": [
{
"contains": [
"same input"
]
},
{
"contains": [
"alternating"
]
},
{
"contains": [
"global"
]
},
{
"contains": [
"test"
]
}
]
},
"hidden": {
"checks": [
{
"contains": [
"remove g"
]
},
{
"contains": [
"lastIndex"
]
},
{
"contains": [
"new RegExp"
]
}
]
},
"diagnose": {
"checks": [
{
"contains": [
"regex"
]
},
{
"contains": [
"state"
]
},
{
"contains": [
"validator"
]
}
]
}
}
}temperature
0
max_tokens
420
timeout (s)
120
type
scored
file
debug-regex-global-state-v2.json