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 module-level Map is used as an object cache; because Map holds strong references, objects stored as keys are never garbage-collected even when all other references are dropped, causing memory to grow unboundedly over time. Identify the GC issue and fix it.
{
"metrics": {
"repro": {
"checks": [
{
"contains": [
"strong reference"
]
},
{
"contains": [
"garbage collected"
]
},
{
"contains": [
"Map"
]
},
{
"contains": [
"memory"
]
}
]
},
"hidden": {
"checks": [
{
"contains": [
"WeakMap"
]
},
{
"contains": [
"weak reference"
]
},
{
"contains": [
"GC"
]
}
]
},
"diagnose": {
"checks": [
{
"contains": [
"Map prevents GC"
]
},
{
"contains": [
"memory leak"
]
},
{
"contains": [
"strong reference"
]
}
]
}
}
}temperature
0
max_tokens
420
timeout (s)
120
type
scored
file
debug-map-vs-weakmap-v2.json