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. Array.forEach is used with an async callback to process a list of database writes; forEach does not await the returned Promises, so the caller continues before all writes complete and data is missing. Identify the unhandled async issue and fix it.
{
"metrics": {
"repro": {
"checks": [
{
"contains": [
"forEach"
]
},
{
"contains": [
"async callback"
]
},
{
"contains": [
"not awaited"
]
},
{
"contains": [
"completes"
]
}
]
},
"hidden": {
"checks": [
{
"contains": [
"Promise.all"
]
},
{
"contains": [
"for...of"
]
},
{
"contains": [
"map"
]
}
]
},
"diagnose": {
"checks": [
{
"contains": [
"forEach ignores"
]
},
{
"contains": [
"async forEach"
]
},
{
"contains": [
"unawaited promises"
]
}
]
}
}
}temperature
0
max_tokens
420
timeout (s)
120
type
scored
file
debug-async-forEach-v2.json