{"abstract":"Flush emits a normalized result without clearing its accumulator.","category":"Gradient accumulation weighting","checks":7,"contract":"Given [sum,count], flush returns [mean, [0,0]]. Empty state has mean zero; all state is cleared for the next window.","contract_signature":"state","evaluation_group":"gradient-accumulation-flush_reset","failed_approach":"Clearing only the count leaves a stale numerator in the next window.","family":"w3-gradient-accumulation-weighting-flush-reset","id":"FA-98911","implementations":{"attempt":{"sha256":"06e32d6575c3134824c5813e92cf5f661d485837b9573089d1b6d45e5811715c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(state):\n    return [state[0] / state[1] if state[1] else 0,[state[0],0]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('flush populated',solve([12*N,3*N]),[4, [0,0]])\ncheck('flush singleton',solve([5*N,N]),[5,[0,0]])\ncheck('flush empty',solve([0,0]),[0,[0,0]])\ncheck('flush zero numerator',solve([0,3*N]),[0,[0,0]])\ncheck('flush unequal',solve([14*N,4*N]),[3.5,[0,0]])\ncheck('flush unit',solve([9*N,3*N]),[3,[0,0]])\ncheck('flush larger',solve([20*N,4*N]),[5,[0,0]])\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":"206854cb1254f931634f1e8dbe241f04e43b1590b1ce817f175564f2e6df9e04","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(state):\n    return [state[0] / state[1] if state[1] else 0,state]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('flush populated',solve([12*N,3*N]),[4, [0,0]])\ncheck('flush singleton',solve([5*N,N]),[5,[0,0]])\ncheck('flush empty',solve([0,0]),[0,[0,0]])\ncheck('flush zero numerator',solve([0,3*N]),[0,[0,0]])\ncheck('flush unequal',solve([14*N,4*N]),[3.5,[0,0]])\ncheck('flush unit',solve([9*N,3*N]),[3,[0,0]])\ncheck('flush larger',solve([20*N,4*N]),[5,[0,0]])\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-flush-reset","generated_at":"2026-09-30T16:48:18.065606+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 flush returns the normalized value but leaves all accumulated state available for accidental reuse.","sha256":"ef84bb13f12366c2f3388b0d6fe0e740a606b21a1830f524a13810a27dc77318","title":"Flush emits a normalized result without clearing its accumulator · 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.735,"exit_code":1,"observations":[{"actual":[4.0,[12,0]],"check":"flush populated","expected":[4,[0,0]],"passed":false},{"actual":[5.0,[5,0]],"check":"flush singleton","expected":[5,[0,0]],"passed":false},{"actual":[0,[0,0]],"check":"flush empty","expected":[0,[0,0]],"passed":true},{"actual":[0.0,[0,0]],"check":"flush zero numerator","expected":[0,[0,0]],"passed":true},{"actual":[3.5,[14,0]],"check":"flush unequal","expected":[3.5,[0,0]],"passed":false},{"actual":[3.0,[9,0]],"check":"flush unit","expected":[3,[0,0]],"passed":false},{"actual":[5.0,[20,0]],"check":"flush larger","expected":[5,[0,0]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"flush populated\", \"actual\": [4.0, [12, 0]], \"expected\": [4, [0, 0]], \"passed\": false}, {\"check\": \"flush singleton\", \"actual\": [5.0, [5, 0]], \"expected\": [5, [0, 0]], \"passed\": false}, {\"check\": \"flush empty\", \"actual\": [0, [0, 0]], \"expected\": [0, [0, 0]], \"passed\": true}, {\"check\": \"flush zero numerator\", \"actual\": [0.0, [0, 0]], \"expected\": [0, [0, 0]], \"passed\": true}, {\"check\": \"flush unequal\", \"actual\": [3.5, [14, 0]], \"expected\": [3.5, [0, 0]], \"passed\": false}, {\"check\": \"flush unit\", \"actual\": [3.0, [9, 0]], \"expected\": [3, [0, 0]], \"passed\": false}, {\"check\": \"flush larger\", \"actual\": [5.0, [20, 0]], \"expected\": [5, [0, 0]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.87,"exit_code":1,"observations":[{"actual":[4.0,[12,3]],"check":"flush populated","expected":[4,[0,0]],"passed":false},{"actual":[5.0,[5,1]],"check":"flush singleton","expected":[5,[0,0]],"passed":false},{"actual":[0,[0,0]],"check":"flush empty","expected":[0,[0,0]],"passed":true},{"actual":[0.0,[0,3]],"check":"flush zero numerator","expected":[0,[0,0]],"passed":false},{"actual":[3.5,[14,4]],"check":"flush unequal","expected":[3.5,[0,0]],"passed":false},{"actual":[3.0,[9,3]],"check":"flush unit","expected":[3,[0,0]],"passed":false},{"actual":[5.0,[20,4]],"check":"flush larger","expected":[5,[0,0]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"flush populated\", \"actual\": [4.0, [12, 3]], \"expected\": [4, [0, 0]], \"passed\": false}, {\"check\": \"flush singleton\", \"actual\": [5.0, [5, 1]], \"expected\": [5, [0, 0]], \"passed\": false}, {\"check\": \"flush empty\", \"actual\": [0, [0, 0]], \"expected\": [0, [0, 0]], \"passed\": true}, {\"check\": \"flush zero numerator\", \"actual\": [0.0, [0, 3]], \"expected\": [0, [0, 0]], \"passed\": false}, {\"check\": \"flush unequal\", \"actual\": [3.5, [14, 4]], \"expected\": [3.5, [0, 0]], \"passed\": false}, {\"check\": \"flush unit\", \"actual\": [3.0, [9, 3]], \"expected\": [3, [0, 0]], \"passed\": false}, {\"check\": \"flush larger\", \"actual\": [5.0, [20, 4]], \"expected\": [5, [0, 0]], \"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."}}