FA-12261 / Power metering accounting / Open access
A missing interval is reported as measured zero consumption · case 01
A missing interval is reported as measured zero consumption.
ROOT CAUSE
Missing readings are silently filled with zero and reported complete.
VERIFIED REPAIR
Determine completeness from the quality flag, independently of the measured magnitude.
Unsuccessful approach: Truthiness detects missing readings but also marks legitimate measured zeros incomplete.
Case contract
Rows [quality, energy] use actual or missing. Missing energy is None. Return [sum of actual energy, complete], where complete is true exactly when no missing interval exists. A measured zero is valid.
Why this case matters
Meter settlement depends on explicit register and tariff policies; this controlled model makes that policy observable.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows):
return [sum(e or 0 for q,e in rows),True]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('missing alongside actual', solve([['actual',N],['missing',None]]),[N,False])
check('measured zero', solve([['actual',0]]),[0,True])
check('all missing', solve([['missing',None]]),[0,False])
check('ordinary actual', solve([['actual',N]]),[N,True])
check('zero mixed with energy', solve([['actual',0],['actual',N]]),[N,True])
check('empty complete by convention', solve([]),[0,True])
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 |
|---|---|---|---|
| missing alongside actual | [1, True] | [1, False] | Failed |
| measured zero | [0, True] | [0, True] | Passed |
| all missing | [0, True] | [0, False] | Failed |
| ordinary actual | [1, True] | [1, True] | Passed |
| zero mixed with energy | [1, True] | [1, True] | Passed |
| empty complete by convention | [0, True] | [0, True] | Passed |
SHA-256 / e68a2c2f525ca7a3bc98d967dde3e43174e5a6342865c0b9c499b6d8d106ce95
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows):
return [sum(e or 0 for q,e in rows),all(e for q,e in rows)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('missing alongside actual', solve([['actual',N],['missing',None]]),[N,False])
check('measured zero', solve([['actual',0]]),[0,True])
check('all missing', solve([['missing',None]]),[0,False])
check('ordinary actual', solve([['actual',N]]),[N,True])
check('zero mixed with energy', solve([['actual',0],['actual',N]]),[N,True])
check('empty complete by convention', solve([]),[0,True])
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 |
|---|---|---|---|
| missing alongside actual | [1, False] | [1, False] | Passed |
| measured zero | [0, False] | [0, True] | Failed |
| all missing | [0, False] | [0, False] | Passed |
| ordinary actual | [1, True] | [1, True] | Passed |
| zero mixed with energy | [1, False] | [1, True] | Failed |
| empty complete by convention | [0, True] | [0, True] | Passed |
SHA-256 / 4a4066bbd04764603f719d10a7b16e5443ae9859c24adf6cf9f57716dcd499da
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows):
return [sum(e for q,e in rows if q=="actual"),all(q=="actual" for q,e in rows)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('missing alongside actual', solve([['actual',N],['missing',None]]),[N,False])
check('measured zero', solve([['actual',0]]),[0,True])
check('all missing', solve([['missing',None]]),[0,False])
check('ordinary actual', solve([['actual',N]]),[N,True])
check('zero mixed with energy', solve([['actual',0],['actual',N]]),[N,True])
check('empty complete by convention', solve([]),[0,True])
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 |
|---|---|---|---|
| missing alongside actual | [1, False] | [1, False] | Passed |
| measured zero | [0, True] | [0, True] | Passed |
| all missing | [0, False] | [0, False] | Passed |
| ordinary actual | [1, True] | [1, True] | Passed |
| zero mixed with energy | [1, True] | [1, True] | Passed |
| empty complete by convention | [0, True] | [0, True] | Passed |
SHA-256 / 00966c5b474cd431dff70fce387b79c7ecd360edd949c599f385f76f299636d3
Verification & scope
Simplified integer-energy accounting model; no hardware protocol, legal tariff, measurement uncertainty, or live grid behavior is represented. 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.347538+00:00.
Case digest / d0802ebbad78d12457a01473040354ca387011e448a6bceb32bc717d027efaf9