FA-12331 / Battery state accounting / Open access
Replacement inherits the previous cell wear counter · case 01
A slot stores wear independently of the identity occupying it.
ROOT CAUSE
A slot stores wear independently of the identity occupying it.
THE FAILURE
A slot stores wear independently of the identity occupying it.
Unsuccessful approach: Resetting on every attachment loses wear when the same cell is reattached.
Case 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.
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(current, wear, incoming, discharge):
return wear+discharge
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('new cell', solve('a',10*N,'b',N), N)
check('same cell', solve('a',10*N,'a',N), 11*N)
check('same no flow', solve('a',10*N,'a',0), 10*N)
check('new no flow', solve('a',10*N,'b',0), 0)
check('new unworn', solve('a',0,'b',N), N)
check('same unworn', solve('a',0,'a',N), 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 |
|---|---|---|---|
| new cell | 11 | 1 | Failed |
| same cell | 11 | 11 | Passed |
| same no flow | 10 | 10 | Passed |
| new no flow | 10 | 0 | Failed |
| new unworn | 1 | 1 | Passed |
| same unworn | 1 | 1 | Passed |
SHA-256 / 3bfd5c8438c55a2b8c65b29cacc1b457638696cd04397903a33a2314b8b0a49b
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(current, wear, incoming, discharge):
return discharge
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('new cell', solve('a',10*N,'b',N), N)
check('same cell', solve('a',10*N,'a',N), 11*N)
check('same no flow', solve('a',10*N,'a',0), 10*N)
check('new no flow', solve('a',10*N,'b',0), 0)
check('new unworn', solve('a',0,'b',N), N)
check('same unworn', solve('a',0,'a',N), 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 |
|---|---|---|---|
| new cell | 1 | 1 | Passed |
| same cell | 1 | 11 | Failed |
| same no flow | 0 | 10 | Failed |
| new no flow | 0 | 0 | Passed |
| new unworn | 1 | 1 | Passed |
| same unworn | 1 | 1 | Passed |
SHA-256 / adb20c45904ae2c77d0a3b519e91b44fcb9b9009df8307e4cc3d0d35515b35bc
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.973663+00:00.
Case digest / 085c8d93b8991eb9aa14cb7761b7fa7f82d6922eafcc3cb1689916fc663f8275