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 logging utility calls JSON.stringify on a response object that contains a circular reference; the call throws a TypeError at runtime crashing the process. Identify the circular reference bug and fix it with a safe serialization approach.
{
"metrics": {
"repro": {
"checks": [
{
"contains": [
"circular"
]
},
{
"contains": [
"JSON.stringify"
]
},
{
"contains": [
"TypeError"
]
},
{
"contains": [
"reference"
]
}
]
},
"hidden": {
"checks": [
{
"contains": [
"replacer"
]
},
{
"contains": [
"seen"
]
},
{
"contains": [
"WeakSet"
]
}
]
},
"diagnose": {
"checks": [
{
"contains": [
"circular reference"
]
},
{
"contains": [
"serialization"
]
},
{
"contains": [
"JSON.stringify throws"
]
}
]
}
}
}temperature
0
max_tokens
420
timeout (s)
120
type
scored
file
debug-circular-ref-stringify-v2.json