FA-12301 / Battery state accounting / Open access
Series availability sums incompatible cell inventories · case 01
Series discharge is allowed to draw the sum of individual cell inventories.
ROOT CAUSE
Series discharge is allowed to draw the sum of individual cell inventories.
THE FAILURE
Series discharge is allowed to draw the sum of individual cell inventories.
Unsuccessful approach: Using the average still overdraws the smallest cell.
Case contract
For a nonempty list of nonnegative cell charge inventories and nonnegative request, return delivered charge and remaining cells; series cells each supply the delivered amount.
Why this case matters
An explicit synthetic battery bookkeeping model isolates this state-accounting error; it is not an engineering prediction or safety procedure.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(cells, request):
d = min(request, sum(cells))
return [d, [c-d for c in cells]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('unequal', solve([2*N,8*N], 5*N), [2*N,[0,6*N]])
check('empty cell', solve([0,8*N], N), [0,[0,8*N]])
check('equal', solve([4*N,4*N], 3*N), [3*N,[N,N]])
check('single', solve([4*N], 8*N), [4*N,[0]])
check('no request', solve([2*N,8*N], 0), [0,[2*N,8*N]])
check('three cells', solve([9*N,3*N,7*N], 8*N), [3*N,[6*N,0,4*N]])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| unequal | [5, [-3, 3]] | [2, [0, 6]] | Failed |
| empty cell | [1, [-1, 7]] | [0, [0, 8]] | Failed |
| equal | [3, [1, 1]] | [3, [1, 1]] | Passed |
| single | [4, [0]] | [4, [0]] | Passed |
| no request | [0, [2, 8]] | [0, [2, 8]] | Passed |
| three cells | [8, [1, -5, -1]] | [3, [6, 0, 4]] | Failed |
SHA-256 / d9fe7dd5baff55b5c0cd725af0c05a5951b625ab7f1ce89d9958dda60289f106
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(cells, request):
d = min(request, sum(cells)//len(cells))
return [d, [c-d for c in cells]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('unequal', solve([2*N,8*N], 5*N), [2*N,[0,6*N]])
check('empty cell', solve([0,8*N], N), [0,[0,8*N]])
check('equal', solve([4*N,4*N], 3*N), [3*N,[N,N]])
check('single', solve([4*N], 8*N), [4*N,[0]])
check('no request', solve([2*N,8*N], 0), [0,[2*N,8*N]])
check('three cells', solve([9*N,3*N,7*N], 8*N), [3*N,[6*N,0,4*N]])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| unequal | [5, [-3, 3]] | [2, [0, 6]] | Failed |
| empty cell | [1, [-1, 7]] | [0, [0, 8]] | Failed |
| equal | [3, [1, 1]] | [3, [1, 1]] | Passed |
| single | [4, [0]] | [4, [0]] | Passed |
| no request | [0, [2, 8]] | [0, [2, 8]] | Passed |
| three cells | [6, [3, -3, 1]] | [3, [6, 0, 4]] | Failed |
SHA-256 / 908e1a07649466efe7e32b179694b08d31b27a279243adf28249ffe6bdee245c
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:38:55.595315+00:00.
Case digest / 341036a84dc2a091b49a5600c9159a9f86e04c8dcb68628c93167c85243efd6a