{"abstract":"Streaming accumulation overwrites its prior numerator.","category":"Gradient accumulation weighting","checks":7,"contract":"State is [gradient_sum, example_count]. Appending adds both fields independently and returns the updated state.","contract_signature":"state, new_sum, new_count","evaluation_group":"gradient-accumulation-stream_state","failed_approach":"Keeping the larger count loses examples when a later microbatch is smaller.","family":"w3-gradient-accumulation-weighting-stream-state","id":"FA-98901","implementations":{"attempt":{"sha256":"360155f01c0ce4fc48ab2f535ec0734f6934d1fef4ac1d0d8efbe97febbcf169","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(state, new_sum, new_count):\n    return [state[0]+new_sum, max(state[1],new_count)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('append unequal batch',solve([2*N,N],12*N,3*N),[14*N,4*N])\ncheck('append singleton',solve([5*N,N],7*N,N),[12*N,2*N])\ncheck('empty append',solve([4*N,2*N],0,0),[4*N,2*N])\ncheck('zero state',solve([0,0],6*N,2*N),[6*N,2*N])\ncheck('multiple prior count',solve([3*N,4*N],9*N,3*N),[12*N,7*N])\ncheck('zero sum append',solve([8*N,4*N],0,N),[8*N,5*N])\ncheck('large append',solve([N,2],8*N,4*N),[9*N,4*N+2])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"bad65a664486baaf1c09c5fe79f4371cae89e60100487b2b22783f9aa3f8b22c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(state, new_sum, new_count):\n    return [new_sum,new_count]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('append unequal batch',solve([2*N,N],12*N,3*N),[14*N,4*N])\ncheck('append singleton',solve([5*N,N],7*N,N),[12*N,2*N])\ncheck('empty append',solve([4*N,2*N],0,0),[4*N,2*N])\ncheck('zero state',solve([0,0],6*N,2*N),[6*N,2*N])\ncheck('multiple prior count',solve([3*N,4*N],9*N,3*N),[12*N,7*N])\ncheck('zero sum append',solve([8*N,4*N],0,N),[8*N,5*N])\ncheck('large append',solve([N,2],8*N,4*N),[9*N,4*N+2])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Inputs are scalar or short-list summaries and do not model autodiff, devices, or an optimizer. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w3-gradient-accumulation-weighting-stream-state","generated_at":"2026-09-30T16:48:18.065711+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic toy model isolates one local accumulation contract.","root_cause":"The broken update overwrites prior gradient and count state with the newest microbatch.","sha256":"e07a064ababf21bcc837caf70529e0f32f67766d6db77e95ea1c851f2e256081","title":"Streaming accumulation overwrites its prior numerator · case 01","variant":1,"variant_policy":"The fixture code references N, supplied as 1 through 5. Fixed boundary checks may repeat. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":31.562,"exit_code":1,"observations":[{"actual":[14,3],"check":"append unequal batch","expected":[14,4],"passed":false},{"actual":[12,1],"check":"append singleton","expected":[12,2],"passed":false},{"actual":[4,2],"check":"empty append","expected":[4,2],"passed":true},{"actual":[6,2],"check":"zero state","expected":[6,2],"passed":true},{"actual":[12,4],"check":"multiple prior count","expected":[12,7],"passed":false},{"actual":[8,4],"check":"zero sum append","expected":[8,5],"passed":false},{"actual":[9,4],"check":"large append","expected":[9,6],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"append unequal batch\", \"actual\": [14, 3], \"expected\": [14, 4], \"passed\": false}, {\"check\": \"append singleton\", \"actual\": [12, 1], \"expected\": [12, 2], \"passed\": false}, {\"check\": \"empty append\", \"actual\": [4, 2], \"expected\": [4, 2], \"passed\": true}, {\"check\": \"zero state\", \"actual\": [6, 2], \"expected\": [6, 2], \"passed\": true}, {\"check\": \"multiple prior count\", \"actual\": [12, 4], \"expected\": [12, 7], \"passed\": false}, {\"check\": \"zero sum append\", \"actual\": [8, 4], \"expected\": [8, 5], \"passed\": false}, {\"check\": \"large append\", \"actual\": [9, 4], \"expected\": [9, 6], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":29.814,"exit_code":1,"observations":[{"actual":[12,3],"check":"append unequal batch","expected":[14,4],"passed":false},{"actual":[7,1],"check":"append singleton","expected":[12,2],"passed":false},{"actual":[0,0],"check":"empty append","expected":[4,2],"passed":false},{"actual":[6,2],"check":"zero state","expected":[6,2],"passed":true},{"actual":[9,3],"check":"multiple prior count","expected":[12,7],"passed":false},{"actual":[0,1],"check":"zero sum append","expected":[8,5],"passed":false},{"actual":[8,4],"check":"large append","expected":[9,6],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"append unequal batch\", \"actual\": [12, 3], \"expected\": [14, 4], \"passed\": false}, {\"check\": \"append singleton\", \"actual\": [7, 1], \"expected\": [12, 2], \"passed\": false}, {\"check\": \"empty append\", \"actual\": [0, 0], \"expected\": [4, 2], \"passed\": false}, {\"check\": \"zero state\", \"actual\": [6, 2], \"expected\": [6, 2], \"passed\": true}, {\"check\": \"multiple prior count\", \"actual\": [9, 3], \"expected\": [12, 7], \"passed\": false}, {\"check\": \"zero sum append\", \"actual\": [0, 1], \"expected\": [8, 5], \"passed\": false}, {\"check\": \"large append\", \"actual\": [8, 4], \"expected\": [9, 6], \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}