{"abstract":"The final short batch is discarded from accumulation.","category":"Gradient accumulation weighting","checks":7,"contract":"Sum every observed batch size in order-independent aggregate form, including a final remainder smaller than target.","contract_signature":"batch_sizes, target","evaluation_group":"gradient-accumulation-remainder_window","failed_approach":"Rounding the total down to a multiple of target discards the final remainder.","family":"w3-gradient-accumulation-weighting-remainder-window","id":"FA-98921","implementations":{"attempt":{"sha256":"eac8bbea99346135842b0a4326ec3050bbf6ad2680b39197782399f93181ad0e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(batch_sizes, target):\n    return sum(batch_sizes) - (sum(batch_sizes) % target if target else 0)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('short final batch',solve([N,N,1],2*N),2*N+1)\ncheck('all full batches',solve([N,N],N),2*N)\ncheck('single short',solve([1],N+1),1)\ncheck('empty',solve([],N),0)\ncheck('oversized batch',solve([3*N],N),3*N)\ncheck('mixed remainder',solve([2*N,N-1],N+1),3*N-1)\ncheck('unit batch',solve([1,1,1],2),3)\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":"d3953127d7246b718e7fc63ed5d9348feb644afacb10dd47339aaba00537157f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(batch_sizes, target):\n    return sum(size for size in batch_sizes if size == target)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('short final batch',solve([N,N,1],2*N),2*N+1)\ncheck('all full batches',solve([N,N],N),2*N)\ncheck('single short',solve([1],N+1),1)\ncheck('empty',solve([],N),0)\ncheck('oversized batch',solve([3*N],N),3*N)\ncheck('mixed remainder',solve([2*N,N-1],N+1),3*N-1)\ncheck('unit batch',solve([1,1,1],2),3)\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-remainder-window","generated_at":"2026-09-30T16:48:18.535136+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 path sums only batches exactly equal to the target and drops partial or oversized contributions.","sha256":"74a424fc52e6faa167222a2d71e2934c886258981317e46222f3c35933e4df56","title":"The final short batch is discarded from accumulation · 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":28.969,"exit_code":1,"observations":[{"actual":2,"check":"short final batch","expected":3,"passed":false},{"actual":2,"check":"all full batches","expected":2,"passed":true},{"actual":0,"check":"single short","expected":1,"passed":false},{"actual":0,"check":"empty","expected":0,"passed":true},{"actual":3,"check":"oversized batch","expected":3,"passed":true},{"actual":2,"check":"mixed remainder","expected":2,"passed":true},{"actual":2,"check":"unit batch","expected":3,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"short final batch\", \"actual\": 2, \"expected\": 3, \"passed\": false}, {\"check\": \"all full batches\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"single short\", \"actual\": 0, \"expected\": 1, \"passed\": false}, {\"check\": \"empty\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"oversized batch\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"mixed remainder\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"unit batch\", \"actual\": 2, \"expected\": 3, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.414,"exit_code":1,"observations":[{"actual":0,"check":"short final batch","expected":3,"passed":false},{"actual":2,"check":"all full batches","expected":2,"passed":true},{"actual":0,"check":"single short","expected":1,"passed":false},{"actual":0,"check":"empty","expected":0,"passed":true},{"actual":0,"check":"oversized batch","expected":3,"passed":false},{"actual":2,"check":"mixed remainder","expected":2,"passed":true},{"actual":0,"check":"unit batch","expected":3,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"short final batch\", \"actual\": 0, \"expected\": 3, \"passed\": false}, {\"check\": \"all full batches\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"single short\", \"actual\": 0, \"expected\": 1, \"passed\": false}, {\"check\": \"empty\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"oversized batch\", \"actual\": 0, \"expected\": 3, \"passed\": false}, {\"check\": \"mixed remainder\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"unit batch\", \"actual\": 0, \"expected\": 3, \"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."}}