{"abstract":"A slot stores wear independently of the identity occupying it.","category":"Battery state accounting","checks":6,"contract":"Given current identity and wear, incoming identity, and new discharge amount, return that slot wear: preserve for same identity, reset for different identity, then add discharge.","contract_signature":"current, wear, incoming, discharge","evaluation_group":"model-03ccbae2d2a19a77","failed_approach":"Resetting on every attachment loses wear when the same cell is reattached.","family":"z-battery_models-replacement-identity","id":"FA-12331","implementations":{"attempt":{"sha256":"adb20c45904ae2c77d0a3b519e91b44fcb9b9009df8307e4cc3d0d35515b35bc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(current, wear, incoming, discharge):\n    return discharge\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('new cell', solve('a',10*N,'b',N), N)\ncheck('same cell', solve('a',10*N,'a',N), 11*N)\ncheck('same no flow', solve('a',10*N,'a',0), 10*N)\ncheck('new no flow', solve('a',10*N,'b',0), 0)\ncheck('new unworn', solve('a',0,'b',N), N)\ncheck('same unworn', solve('a',0,'a',N), 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":"3bfd5c8438c55a2b8c65b29cacc1b457638696cd04397903a33a2314b8b0a49b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(current, wear, incoming, discharge):\n    return wear+discharge\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('new cell', solve('a',10*N,'b',N), N)\ncheck('same cell', solve('a',10*N,'a',N), 11*N)\ncheck('same no flow', solve('a',10*N,'a',0), 10*N)\ncheck('new no flow', solve('a',10*N,'b',0), 0)\ncheck('new unworn', solve('a',0,'b',N), N)\ncheck('same unworn', solve('a',0,'a',N), 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-replacement-identity","generated_at":"2026-09-29T14:38:55.973663+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":"A slot stores wear independently of the identity occupying it.","sha256":"085c8d93b8991eb9aa14cb7761b7fa7f82d6922eafcc3cb1689916fc663f8275","title":"Replacement inherits the previous cell wear counter · 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":41.349,"exit_code":1,"observations":[{"actual":1,"check":"new cell","expected":1,"passed":true},{"actual":1,"check":"same cell","expected":11,"passed":false},{"actual":0,"check":"same no flow","expected":10,"passed":false},{"actual":0,"check":"new no flow","expected":0,"passed":true},{"actual":1,"check":"new unworn","expected":1,"passed":true},{"actual":1,"check":"same unworn","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"new cell\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"same cell\", \"actual\": 1, \"expected\": 11, \"passed\": false}, {\"check\": \"same no flow\", \"actual\": 0, \"expected\": 10, \"passed\": false}, {\"check\": \"new no flow\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"new unworn\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"same unworn\", \"actual\": 1, \"expected\": 1, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.345,"exit_code":1,"observations":[{"actual":11,"check":"new cell","expected":1,"passed":false},{"actual":11,"check":"same cell","expected":11,"passed":true},{"actual":10,"check":"same no flow","expected":10,"passed":true},{"actual":10,"check":"new no flow","expected":0,"passed":false},{"actual":1,"check":"new unworn","expected":1,"passed":true},{"actual":1,"check":"same unworn","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"new cell\", \"actual\": 11, \"expected\": 1, \"passed\": false}, {\"check\": \"same cell\", \"actual\": 11, \"expected\": 11, \"passed\": true}, {\"check\": \"same no flow\", \"actual\": 10, \"expected\": 10, \"passed\": true}, {\"check\": \"new no flow\", \"actual\": 10, \"expected\": 0, \"passed\": false}, {\"check\": \"new unworn\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"same unworn\", \"actual\": 1, \"expected\": 1, \"passed\": true}], \"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."}}