{"abstract":"Only the final event sum is clipped to capacity.","category":"Battery state accounting","checks":6,"contract":"Return final inventory after ordered signed transfer attempts; each event independently clips the inventory to [0,capacity].","contract_signature":"initial, capacity, deltas","evaluation_group":"model-e06b8d95a73fd687","failed_approach":"Clipping upper bounds per event still carries negative inventory debt across later charges.","family":"z-battery_models-charge-overflow-history","id":"FA-12321","implementations":{"attempt":{"sha256":"5355533a8bc44ead7394d23c43cf1daa6e84527dc4511dbde5075d878d6caf73","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(initial, capacity, deltas):\n    q=initial\n    for d in deltas:\n        q=min(capacity,q+d)\n    return max(0,q)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('overflow then drain', solve(9*N,10*N,[5*N,-3*N]), 7*N)\ncheck('underflow then fill', solve(N,10*N,[-5*N,3*N]), 3*N)\ncheck('no events', solve(4*N,10*N,[]), 4*N)\ncheck('ordinary', solve(4*N,10*N,[N,-2*N]), 3*N)\ncheck('zero capacity', solve(0,0,[N,-N]), 0)\ncheck('multiple clipping', solve(5*N,10*N,[20*N,-30*N,4*N]), 4*N)\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":"a8cebd3c6518a695a27e9a0b06ba2aef162512ce1c7e89bb8ba659bdd2ff0db2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(initial, capacity, deltas):\n    return min(capacity,max(0,initial+sum(deltas)))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('overflow then drain', solve(9*N,10*N,[5*N,-3*N]), 7*N)\ncheck('underflow then fill', solve(N,10*N,[-5*N,3*N]), 3*N)\ncheck('no events', solve(4*N,10*N,[]), 4*N)\ncheck('ordinary', solve(4*N,10*N,[N,-2*N]), 3*N)\ncheck('zero capacity', solve(0,0,[N,-N]), 0)\ncheck('multiple clipping', solve(5*N,10*N,[20*N,-30*N,4*N]), 4*N)\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":"Integer toy accounting with declared loss rules; no electrochemistry, hardware behavior, or safety claims. 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":"z-battery_models-charge-overflow-history","generated_at":"2026-09-29T14:38:55.842821+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"An explicit synthetic battery bookkeeping model isolates this state-accounting error; it is not an engineering prediction or safety procedure.","root_cause":"Only the final event sum is clipped to capacity.","sha256":"80a2495ea2e0086d5ce0285ffe495b4ab3007afc0a3a46192bdd28a7cb21646b","title":"Overflow charge is retained as a hidden future credit · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":39.684,"exit_code":1,"observations":[{"actual":7,"check":"overflow then drain","expected":7,"passed":true},{"actual":0,"check":"underflow then fill","expected":3,"passed":false},{"actual":4,"check":"no events","expected":4,"passed":true},{"actual":3,"check":"ordinary","expected":3,"passed":true},{"actual":0,"check":"zero capacity","expected":0,"passed":true},{"actual":0,"check":"multiple clipping","expected":4,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"overflow then drain\", \"actual\": 7, \"expected\": 7, \"passed\": true}, {\"check\": \"underflow then fill\", \"actual\": 0, \"expected\": 3, \"passed\": false}, {\"check\": \"no events\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"ordinary\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"zero capacity\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"multiple clipping\", \"actual\": 0, \"expected\": 4, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.791,"exit_code":1,"observations":[{"actual":10,"check":"overflow then drain","expected":7,"passed":false},{"actual":0,"check":"underflow then fill","expected":3,"passed":false},{"actual":4,"check":"no events","expected":4,"passed":true},{"actual":3,"check":"ordinary","expected":3,"passed":true},{"actual":0,"check":"zero capacity","expected":0,"passed":true},{"actual":0,"check":"multiple clipping","expected":4,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"overflow then drain\", \"actual\": 10, \"expected\": 7, \"passed\": false}, {\"check\": \"underflow then fill\", \"actual\": 0, \"expected\": 3, \"passed\": false}, {\"check\": \"no events\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"ordinary\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"zero capacity\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"multiple clipping\", \"actual\": 0, \"expected\": 4, \"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."}}