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. Two Worker threads perform a read-modify-write cycle on a shared SharedArrayBuffer counter using Atomics.load then Atomics.store; without an atomic compare-exchange the final count is consistently lower than expected under concurrent load. Identify the non-atomic update race and fix it.
{
"metrics": {
"repro": {
"checks": [
{
"contains": [
"Atomics"
]
},
{
"contains": [
"SharedArrayBuffer"
]
},
{
"contains": [
"race condition"
]
},
{
"contains": [
"concurrent"
]
}
]
},
"hidden": {
"checks": [
{
"contains": [
"Atomics.compareExchange"
]
},
{
"contains": [
"compare-exchange"
]
},
{
"contains": [
"atomic increment"
]
}
]
},
"diagnose": {
"checks": [
{
"contains": [
"non-atomic read-modify-write"
]
},
{
"contains": [
"lost update"
]
},
{
"contains": [
"Atomics.add"
]
}
]
}
}
}temperature
0
max_tokens
420
timeout (s)
120
type
scored
file
debug-worker-race-condition-v2.json