{"abstract":"The protected reserve is subtracted from stored inventory even without delivery.","category":"Battery state accounting","checks":6,"contract":"Return [delivered,remaining] for nonnegative inventory, request, reserve; reserve limits access but does not delete stored charge.","evaluation_group":"model-99cb25d86b2ada5e","failed_approach":"Capping delivery by reserve still subtracts the reserve from the reported remaining inventory.","family":"z-battery_models-reserve-floor","id":"FA-12316","implementations":{"attempt":{"sha256":"9be66ca71e96339f25419dfcad55849acff45ef23aedca8fb021cd043a9e1361","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(charge, reserve, request):\n    d=min(request,max(0,charge-reserve))\n    return [d,max(0,charge-d-reserve)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('floor', solve(10*N,3*N,10*N), [7*N,3*N])\ncheck('no request', solve(10*N,3*N,0), [0,10*N])\ncheck('under reserve', solve(2*N,3*N,N), [0,2*N])\ncheck('no reserve', solve(10*N,0,4*N), [4*N,6*N])\ncheck('partial', solve(10*N,3*N,2*N), [2*N,8*N])\ncheck('empty', solve(0,3*N,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":"926e9986913795d28a066af5fa9f6f3d3b67f81f501e2efaf2cab98a84d837df","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(charge, reserve, request):\n    d=min(request,charge)\n    return [d, max(0,charge-d-reserve)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('floor', solve(10*N,3*N,10*N), [7*N,3*N])\ncheck('no request', solve(10*N,3*N,0), [0,10*N])\ncheck('under reserve', solve(2*N,3*N,N), [0,2*N])\ncheck('no reserve', solve(10*N,0,4*N), [4*N,6*N])\ncheck('partial', solve(10*N,3*N,2*N), [2*N,8*N])\ncheck('empty', solve(0,3*N,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"},"fixed":{"sha256":"e3de972c65727fec5b6f0eae0078de0a1956b6d2e16df24fb13ebdeff6fcb181","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(charge, reserve, request):\n    d=min(request,max(0,charge-reserve))\n    return [d,charge-d]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('floor', solve(10*N,3*N,10*N), [7*N,3*N])\ncheck('no request', solve(10*N,3*N,0), [0,10*N])\ncheck('under reserve', solve(2*N,3*N,N), [0,2*N])\ncheck('no reserve', solve(10*N,0,4*N), [4*N,6*N])\ncheck('partial', solve(10*N,3*N,2*N), [2*N,8*N])\ncheck('empty', solve(0,3*N,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-reserve-floor","generated_at":"2026-09-29T14:38:55.761058+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.","repair":"Debit only delivered charge and preserve the protected reserve.","root_cause":"The protected reserve is subtracted from stored inventory even without delivery.","sha256":"3d9a5a5759f86ff1945d6aa758f970dff2d7e69a9ad8d56a5ce55cebd423640f","title":"Reserve policy permanently deletes charge · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":37.113,"exit_code":1,"observations":[{"actual":[7,0],"check":"floor","expected":[7,3],"passed":false},{"actual":[0,7],"check":"no request","expected":[0,10],"passed":false},{"actual":[0,0],"check":"under reserve","expected":[0,2],"passed":false},{"actual":[4,6],"check":"no reserve","expected":[4,6],"passed":true},{"actual":[2,5],"check":"partial","expected":[2,8],"passed":false},{"actual":[0,0],"check":"empty","expected":[0,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"floor\", \"actual\": [7, 0], \"expected\": [7, 3], \"passed\": false}, {\"check\": \"no request\", \"actual\": [0, 7], \"expected\": [0, 10], \"passed\": false}, {\"check\": \"under reserve\", \"actual\": [0, 0], \"expected\": [0, 2], \"passed\": false}, {\"check\": \"no reserve\", \"actual\": [4, 6], \"expected\": [4, 6], \"passed\": true}, {\"check\": \"partial\", \"actual\": [2, 5], \"expected\": [2, 8], \"passed\": false}, {\"check\": \"empty\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.557,"exit_code":1,"observations":[{"actual":[10,0],"check":"floor","expected":[7,3],"passed":false},{"actual":[0,7],"check":"no request","expected":[0,10],"passed":false},{"actual":[1,0],"check":"under reserve","expected":[0,2],"passed":false},{"actual":[4,6],"check":"no reserve","expected":[4,6],"passed":true},{"actual":[2,5],"check":"partial","expected":[2,8],"passed":false},{"actual":[0,0],"check":"empty","expected":[0,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"floor\", \"actual\": [10, 0], \"expected\": [7, 3], \"passed\": false}, {\"check\": \"no request\", \"actual\": [0, 7], \"expected\": [0, 10], \"passed\": false}, {\"check\": \"under reserve\", \"actual\": [1, 0], \"expected\": [0, 2], \"passed\": false}, {\"check\": \"no reserve\", \"actual\": [4, 6], \"expected\": [4, 6], \"passed\": true}, {\"check\": \"partial\", \"actual\": [2, 5], \"expected\": [2, 8], \"passed\": false}, {\"check\": \"empty\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.586,"exit_code":0,"observations":[{"actual":[7,3],"check":"floor","expected":[7,3],"passed":true},{"actual":[0,10],"check":"no request","expected":[0,10],"passed":true},{"actual":[0,2],"check":"under reserve","expected":[0,2],"passed":true},{"actual":[4,6],"check":"no reserve","expected":[4,6],"passed":true},{"actual":[2,8],"check":"partial","expected":[2,8],"passed":true},{"actual":[0,0],"check":"empty","expected":[0,0],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"floor\", \"actual\": [7, 3], \"expected\": [7, 3], \"passed\": true}, {\"check\": \"no request\", \"actual\": [0, 10], \"expected\": [0, 10], \"passed\": true}, {\"check\": \"under reserve\", \"actual\": [0, 2], \"expected\": [0, 2], \"passed\": true}, {\"check\": \"no reserve\", \"actual\": [4, 6], \"expected\": [4, 6], \"passed\": true}, {\"check\": \"partial\", \"actual\": [2, 8], \"expected\": [2, 8], \"passed\": true}, {\"check\": \"empty\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}