{"abstract":"Capacity recalibration preserves a displayed fraction instead of stored inventory.","category":"Battery state accounting","checks":6,"contract":"Return absolute stored integer charge after replacing the capacity estimate; cap at new capacity. Old capacity is positive and charge lies within it.","contract_signature":"charge, old_capacity, new_capacity","evaluation_group":"model-5dfa3f0aee8a8225","failed_approach":"Clipping only on downward capacity changes still rescales upward changes.","family":"z-battery_models-capacity-rebase","id":"FA-12296","implementations":{"attempt":{"sha256":"c3b2eb0a9af632ff4d40404179ddc76360a07e354ededf6af135908569349db9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(charge, old_capacity, new_capacity):\n    return min(charge, new_capacity) if new_capacity < old_capacity else charge * new_capacity // old_capacity\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('upward', solve(4*N, 10*N, 20*N), 4*N)\ncheck('downward no clip', solve(4*N, 10*N, 8*N), 4*N)\ncheck('clip', solve(9*N, 10*N, 6*N), 6*N)\ncheck('empty', solve(0, 10*N, 20*N), 0)\ncheck('unchanged', solve(7*N, 10*N, 10*N), 7*N)\ncheck('zero capacity', solve(7*N, 10*N, 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":"25e9c32efb03275c18a840b52368a6840be5f304a6cfc023e84cb91f44f3575a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(charge, old_capacity, new_capacity):\n    return charge * new_capacity // old_capacity\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('upward', solve(4*N, 10*N, 20*N), 4*N)\ncheck('downward no clip', solve(4*N, 10*N, 8*N), 4*N)\ncheck('clip', solve(9*N, 10*N, 6*N), 6*N)\ncheck('empty', solve(0, 10*N, 20*N), 0)\ncheck('unchanged', solve(7*N, 10*N, 10*N), 7*N)\ncheck('zero capacity', solve(7*N, 10*N, 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":"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-capacity-rebase","generated_at":"2026-09-29T14:38:55.592634+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":"Capacity recalibration preserves a displayed fraction instead of stored inventory.","sha256":"4c4dd00831a98898e9ad206480ec53c52cfa488884fc71c38bc2c281eba8d937","title":"Capacity calibration invents stored charge · 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":37.613,"exit_code":1,"observations":[{"actual":8,"check":"upward","expected":4,"passed":false},{"actual":4,"check":"downward no clip","expected":4,"passed":true},{"actual":6,"check":"clip","expected":6,"passed":true},{"actual":0,"check":"empty","expected":0,"passed":true},{"actual":7,"check":"unchanged","expected":7,"passed":true},{"actual":0,"check":"zero capacity","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"upward\", \"actual\": 8, \"expected\": 4, \"passed\": false}, {\"check\": \"downward no clip\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"clip\", \"actual\": 6, \"expected\": 6, \"passed\": true}, {\"check\": \"empty\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"unchanged\", \"actual\": 7, \"expected\": 7, \"passed\": true}, {\"check\": \"zero capacity\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.336,"exit_code":1,"observations":[{"actual":8,"check":"upward","expected":4,"passed":false},{"actual":3,"check":"downward no clip","expected":4,"passed":false},{"actual":5,"check":"clip","expected":6,"passed":false},{"actual":0,"check":"empty","expected":0,"passed":true},{"actual":7,"check":"unchanged","expected":7,"passed":true},{"actual":0,"check":"zero capacity","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"upward\", \"actual\": 8, \"expected\": 4, \"passed\": false}, {\"check\": \"downward no clip\", \"actual\": 3, \"expected\": 4, \"passed\": false}, {\"check\": \"clip\", \"actual\": 5, \"expected\": 6, \"passed\": false}, {\"check\": \"empty\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"unchanged\", \"actual\": 7, \"expected\": 7, \"passed\": true}, {\"check\": \"zero capacity\", \"actual\": 0, \"expected\": 0, \"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."}}