{"abstract":"Pack removal subtracts module capacity instead of that module inventory.","category":"Battery state accounting","checks":6,"contract":"Modules map unique identifiers to [charge,capacity]. Return total remaining charge after removing an existing identifier.","contract_signature":"modules, removed","evaluation_group":"model-f35d03cee8ba7505","failed_approach":"Subtracting average inventory assumes equally charged modules.","family":"z-battery_models-module-detachment","id":"FA-12306","implementations":{"attempt":{"sha256":"d324aaa5ab08183df454604d96145a8e5f29aeb1a17631749fdfb48ab6967961","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(modules, removed):\n    return sum(v[0] for v in modules.values()) * (len(modules)-1)//len(modules)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('low module', solve({'a':[N,10*N],'b':[8*N,10*N]}, 'a'), 8*N)\ncheck('high module', solve({'a':[N,10*N],'b':[8*N,10*N]}, 'b'), N)\ncheck('only module', solve({'a':[N,10*N]}, 'a'), 0)\ncheck('empty removed', solve({'a':[0,10*N],'b':[8*N,10*N]}, 'a'), 8*N)\ncheck('equal', solve({'a':[N,10*N],'b':[N,10*N]}, 'a'), N)\ncheck('three', solve({'a':[N,10*N],'b':[2*N,10*N],'c':[7*N,10*N]}, 'b'), 8*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":"05b4be2a5d61c0cb8d07c7c94c39fe0fe2940f0cbdddc8f26649686a2849205a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(modules, removed):\n    return sum(v[0] for v in modules.values()) - modules[removed][1]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('low module', solve({'a':[N,10*N],'b':[8*N,10*N]}, 'a'), 8*N)\ncheck('high module', solve({'a':[N,10*N],'b':[8*N,10*N]}, 'b'), N)\ncheck('only module', solve({'a':[N,10*N]}, 'a'), 0)\ncheck('empty removed', solve({'a':[0,10*N],'b':[8*N,10*N]}, 'a'), 8*N)\ncheck('equal', solve({'a':[N,10*N],'b':[N,10*N]}, 'a'), N)\ncheck('three', solve({'a':[N,10*N],'b':[2*N,10*N],'c':[7*N,10*N]}, 'b'), 8*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-module-detachment","generated_at":"2026-09-29T14:38:55.602870+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":"Pack removal subtracts module capacity instead of that module inventory.","sha256":"46e9de623e5aafee9034e5e31ea04dfb4eb5c6fb387c2d98347ac88a8a81a1a9","title":"Removing a module loses charge provenance · 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":38.449,"exit_code":1,"observations":[{"actual":4,"check":"low module","expected":8,"passed":false},{"actual":4,"check":"high module","expected":1,"passed":false},{"actual":0,"check":"only module","expected":0,"passed":true},{"actual":4,"check":"empty removed","expected":8,"passed":false},{"actual":1,"check":"equal","expected":1,"passed":true},{"actual":6,"check":"three","expected":8,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"low module\", \"actual\": 4, \"expected\": 8, \"passed\": false}, {\"check\": \"high module\", \"actual\": 4, \"expected\": 1, \"passed\": false}, {\"check\": \"only module\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"empty removed\", \"actual\": 4, \"expected\": 8, \"passed\": false}, {\"check\": \"equal\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"three\", \"actual\": 6, \"expected\": 8, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.435,"exit_code":1,"observations":[{"actual":-1,"check":"low module","expected":8,"passed":false},{"actual":-1,"check":"high module","expected":1,"passed":false},{"actual":-9,"check":"only module","expected":0,"passed":false},{"actual":-2,"check":"empty removed","expected":8,"passed":false},{"actual":-8,"check":"equal","expected":1,"passed":false},{"actual":0,"check":"three","expected":8,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"low module\", \"actual\": -1, \"expected\": 8, \"passed\": false}, {\"check\": \"high module\", \"actual\": -1, \"expected\": 1, \"passed\": false}, {\"check\": \"only module\", \"actual\": -9, \"expected\": 0, \"passed\": false}, {\"check\": \"empty removed\", \"actual\": -2, \"expected\": 8, \"passed\": false}, {\"check\": \"equal\", \"actual\": -8, \"expected\": 1, \"passed\": false}, {\"check\": \"three\", \"actual\": 0, \"expected\": 8, \"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."}}