FA-71336 / Weather index computation / Open access
Hourly snowfall and settled depth: rain melt floor · case 01
Heavy rain on a thin pack reports negative snow depth.
ROOT CAUSE
Rain melt is not floored at zero.
VERIFIED REPAIR
Floor the depth at 0 after rain melt.
Unsuccessful approach: Using 0.05 cm per mm restores the floor but scales melt tenfold too small.
Case contract
hours are [liquid_mm, temp_c]. Snow-to-liquid ratio: T>1 rain (0), 0<T<=1: 5, -5<T<=0: 10, -12<T<=-5: 15, T<=-12: 20. New snow cm = liquid*ratio/10. Each hour the existing depth settles by 2% before the new snow is added; rain (ratio 0, liquid > 0) melts 0.5 cm per mm, floored at 0. Return [total new snowfall rounded 0.1, final depth rounded 0.1].
Why this case matters
Winter road maintenance and snow reports need both new snowfall and settled depth.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(hours):
total = 0.0
depth = 0.0
for liq, t in hours:
if t > 1:
slr = 0
elif t > 0:
slr = 5
elif t > -5:
slr = 10
elif t > -12:
slr = 15
else:
slr = 20
new = liq * slr / 10.0
depth = depth * 0.98 + new
total += new
if slr == 0 and liq > 0:
depth = depth - 0.5 * liq
return [round(total, 1), round(depth, 1)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['storm 0', [[[1.0, -15.0], [1.0, 1.0], [0.0, 0.0], [1.0, 3.0], [2.0, -8.0], [0.5, 0.0]]], [6.0, 5.2]], ['storm 1', [[[0.5, 0.5], [1.0, 0.5], [2.0, -8.0], [0.0, -5.0], [0.0, 1.0], [1.0, -5.0]]], [5.2, 5.0]], ['storm 2', [[[1.0, -8.0], [2.0, 0.0], [0.0, -5.0], [1.0, -0.5], [1.0, 3.0], [4.0, 0.5]]], [6.5, 5.7]], ['storm 3', [[[0.5, -3.0], [0.5, -0.5], [1.0, -8.0], [4.0, -5.0], [4.0, -0.5], [0.5, -8.0]]], [13.2, 12.8]], ['storm 4', [[[2.0, -5.0], [4.0, -0.5], [0.5, -5.0], [0.0, -5.0], [1.0, 1.0], [2.0, -0.5]]], [10.2, 9.6]], ['storm 5', [[[2.0, -5.0], [2.0, -3.0], [0.0, -8.0], [4.0, -8.0], [4.0, 0.5], [0.0, -15.0]]], [13.0, 12.3]], ['storm 6', [[[1.0, -8.0], [1.0, -0.5], [0.0, -12.0], [0.0, 0.5], [1.0, 0.0], [0.0, 0.0]]], [3.5, 3.3]], ['storm 9', [[[4.0, 3.0], [1.0, -3.0], [2.0, -3.0], [0.5, -12.0], [0.0, -3.0], [2.0, -3.0]]], [6.0, 5.8]]], [['storm 7', [[[0.0, 3.0], [1.0, 0.0], [0.0, -15.0], [4.0, -5.0], [0.5, -15.0], [0.5, 1.0]]], [8.2, 7.9]], ['storm 8', [[[0.0, 1.0], [2.0, -8.0], [2.0, -0.5], [2.0, -8.0], [4.0, 0.5], [2.0, -3.0]]], [12.0, 11.5]], ['storm 9', [[[4.0, 3.0], [1.0, -3.0], [2.0, -3.0], [0.5, -12.0], [0.0, -3.0], [2.0, -3.0]]], [6.0, 5.8]], ['storm 10', [[[0.0, -12.0], [2.0, -15.0], [0.0, 3.0], [2.0, 1.0], [0.0, 0.5], [1.0, -15.0]]], [7.0, 6.6]], ['storm 11', [[[1.0, -8.0], [2.0, -15.0], [1.0, -3.0], [0.0, 1.0], [4.0, -3.0], [0.0, 3.0]]], [10.5, 9.9]], ['storm 12', [[[1.0, -0.5], [4.0, -5.0], [0.5, -12.0], [4.0, 0.5], [1.0, -5.0], [1.0, 3.0]]], [11.5, 10.3]], ['storm 13', [[[4.0, -8.0], [4.0, 0.5], [1.0, -15.0], [4.0, -5.0], [0.5, -12.0], [0.5, -12.0]]], [18.0, 16.9]], ['storm 23', [[[2.0, -12.0], [4.0, -8.0], [0.5, -3.0], [4.0, 0.0], [1.0, -8.0], [0.5, 3.0]]], [16.0, 14.7]]], [['storm 0', [[[1.0, -15.0], [1.0, 1.0], [0.0, 0.0], [1.0, 3.0], [2.0, -8.0], [0.5, 0.0]]], [6.0, 5.2]], ['storm 9', [[[4.0, 3.0], [1.0, -3.0], [2.0, -3.0], [0.5, -12.0], [0.0, -3.0], [2.0, -3.0]]], [6.0, 5.8]], ['storm 14', [[[1.0, 1.0], [0.0, -5.0], [2.0, -5.0], [4.0, -8.0], [1.0, -15.0], [4.0, 3.0]]], [11.5, 9.0]], ['storm 15', [[[2.0, -12.0], [2.0, 1.0], [1.0, 3.0], [4.0, -5.0], [2.0, -15.0], [4.0, -3.0]]], [19.0, 17.7]], ['storm 16', [[[4.0, 1.0], [0.0, 0.0], [0.0, -5.0], [4.0, 1.0], [0.0, 0.0], [0.0, 0.0]]], [4.0, 3.7]], ['storm 17', [[[0.0, -12.0], [0.5, 0.0], [2.0, -12.0], [2.0, 0.5], [1.0, 0.5], [2.0, -12.0]]], [10.0, 9.7]], ['storm 18', [[[4.0, 0.5], [0.0, -12.0], [0.0, -3.0], [0.0, -12.0], [0.0, 0.0], [0.5, -5.0]]], [2.8, 2.6]], ['storm 19', [[[4.0, -5.0], [0.5, -3.0], [4.0, 1.0], [0.5, -15.0], [0.0, -15.0], [0.5, 3.0]]], [9.5, 8.5]]], [['storm 9', [[[4.0, 3.0], [1.0, -3.0], [2.0, -3.0], [0.5, -12.0], [0.0, -3.0], [2.0, -3.0]]], [6.0, 5.8]], ['storm 19', [[[4.0, -5.0], [0.5, -3.0], [4.0, 1.0], [0.5, -15.0], [0.0, -15.0], [0.5, 3.0]]], [9.5, 8.5]], ['storm 21', [[[0.0, -5.0], [1.0, -15.0], [4.0, 1.0], [4.0, -3.0], [4.0, -12.0], [2.0, -12.0]]], [20.0, 19.4]], ['storm 22', [[[4.0, -8.0], [2.0, -15.0], [0.0, -3.0], [4.0, -8.0], [4.0, -0.5], [4.0, 0.0]]], [24.0, 22.8]], ['storm 23', [[[2.0, -12.0], [4.0, -8.0], [0.5, -3.0], [4.0, 0.0], [1.0, -8.0], [0.5, 3.0]]], [16.0, 14.7]], ['storm 24', [[[0.0, 0.5], [2.0, 3.0], [2.0, -5.0], [4.0, -3.0], [0.0, -0.5], [1.0, 3.0]]], [7.0, 6.2]], ['storm 25', [[[2.0, -3.0], [4.0, -8.0], [1.0, 3.0], [0.0, 0.5], [0.5, -3.0], [0.0, -5.0]]], [8.5, 7.4]], ['storm 26', [[[2.0, 0.0], [1.0, -0.5], [2.0, -12.0], [2.0, -8.0], [4.0, -12.0], [1.0, -12.0]]], [20.0, 19.2]]], [['storm 0', [[[1.0, -15.0], [1.0, 1.0], [0.0, 0.0], [1.0, 3.0], [2.0, -8.0], [0.5, 0.0]]], [6.0, 5.2]], ['storm 1', [[[0.5, 0.5], [1.0, 0.5], [2.0, -8.0], [0.0, -5.0], [0.0, 1.0], [1.0, -5.0]]], [5.2, 5.0]], ['storm 9', [[[4.0, 3.0], [1.0, -3.0], [2.0, -3.0], [0.5, -12.0], [0.0, -3.0], [2.0, -3.0]]], [6.0, 5.8]], ['storm 28', [[[0.0, -3.0], [0.5, -3.0], [2.0, -3.0], [2.0, 3.0], [0.0, 1.0], [2.0, -15.0]]], [6.5, 5.4]], ['storm 29', [[[0.5, -5.0], [4.0, 1.0], [1.0, -3.0], [0.5, 0.5], [1.0, 1.0], [1.0, -5.0]]], [6.0, 5.7]], ['rain on snowpack', [[[5.0, -8.0], [3.0, 2.0], [10.0, 3.0]]], [7.5, 0.7]], ['exactly freezing', [[[2.0, 0.0], [2.0, 0.0]]], [4.0, 4.0]], ['single burst then settling', [[[4.0, -6.0], [0.0, -6.0], [0.0, -6.0]]], [6.0, 5.8]]]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
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 |
|---|---|---|---|
| storm 0 | [6.0, 5.2] | [6.0, 5.2] | Passed |
| storm 1 | [5.2, 5.0] | [5.2, 5.0] | Passed |
| storm 2 | [6.5, 5.7] | [6.5, 5.7] | Passed |
| storm 3 | [13.2, 12.8] | [13.2, 12.8] | Passed |
| storm 4 | [10.2, 9.6] | [10.2, 9.6] | Passed |
| storm 5 | [13.0, 12.3] | [13.0, 12.3] | Passed |
| storm 6 | [3.5, 3.3] | [3.5, 3.3] | Passed |
| storm 9 | [6.0, 4.0] | [6.0, 5.8] | Failed |
SHA-256 / 6a23519a06efa4b4f07c0efcac2a111f7ab8d5e62639bb10e56277ad52078fa9
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(hours):
total = 0.0
depth = 0.0
for liq, t in hours:
if t > 1:
slr = 0
elif t > 0:
slr = 5
elif t > -5:
slr = 10
elif t > -12:
slr = 15
else:
slr = 20
new = liq * slr / 10.0
depth = depth * 0.98 + new
total += new
if slr == 0 and liq > 0:
depth = max(depth - 0.05 * liq, 0.0)
return [round(total, 1), round(depth, 1)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['storm 0', [[[1.0, -15.0], [1.0, 1.0], [0.0, 0.0], [1.0, 3.0], [2.0, -8.0], [0.5, 0.0]]], [6.0, 5.2]], ['storm 1', [[[0.5, 0.5], [1.0, 0.5], [2.0, -8.0], [0.0, -5.0], [0.0, 1.0], [1.0, -5.0]]], [5.2, 5.0]], ['storm 2', [[[1.0, -8.0], [2.0, 0.0], [0.0, -5.0], [1.0, -0.5], [1.0, 3.0], [4.0, 0.5]]], [6.5, 5.7]], ['storm 3', [[[0.5, -3.0], [0.5, -0.5], [1.0, -8.0], [4.0, -5.0], [4.0, -0.5], [0.5, -8.0]]], [13.2, 12.8]], ['storm 4', [[[2.0, -5.0], [4.0, -0.5], [0.5, -5.0], [0.0, -5.0], [1.0, 1.0], [2.0, -0.5]]], [10.2, 9.6]], ['storm 5', [[[2.0, -5.0], [2.0, -3.0], [0.0, -8.0], [4.0, -8.0], [4.0, 0.5], [0.0, -15.0]]], [13.0, 12.3]], ['storm 6', [[[1.0, -8.0], [1.0, -0.5], [0.0, -12.0], [0.0, 0.5], [1.0, 0.0], [0.0, 0.0]]], [3.5, 3.3]], ['storm 9', [[[4.0, 3.0], [1.0, -3.0], [2.0, -3.0], [0.5, -12.0], [0.0, -3.0], [2.0, -3.0]]], [6.0, 5.8]]], [['storm 7', [[[0.0, 3.0], [1.0, 0.0], [0.0, -15.0], [4.0, -5.0], [0.5, -15.0], [0.5, 1.0]]], [8.2, 7.9]], ['storm 8', [[[0.0, 1.0], [2.0, -8.0], [2.0, -0.5], [2.0, -8.0], [4.0, 0.5], [2.0, -3.0]]], [12.0, 11.5]], ['storm 9', [[[4.0, 3.0], [1.0, -3.0], [2.0, -3.0], [0.5, -12.0], [0.0, -3.0], [2.0, -3.0]]], [6.0, 5.8]], ['storm 10', [[[0.0, -12.0], [2.0, -15.0], [0.0, 3.0], [2.0, 1.0], [0.0, 0.5], [1.0, -15.0]]], [7.0, 6.6]], ['storm 11', [[[1.0, -8.0], [2.0, -15.0], [1.0, -3.0], [0.0, 1.0], [4.0, -3.0], [0.0, 3.0]]], [10.5, 9.9]], ['storm 12', [[[1.0, -0.5], [4.0, -5.0], [0.5, -12.0], [4.0, 0.5], [1.0, -5.0], [1.0, 3.0]]], [11.5, 10.3]], ['storm 13', [[[4.0, -8.0], [4.0, 0.5], [1.0, -15.0], [4.0, -5.0], [0.5, -12.0], [0.5, -12.0]]], [18.0, 16.9]], ['storm 23', [[[2.0, -12.0], [4.0, -8.0], [0.5, -3.0], [4.0, 0.0], [1.0, -8.0], [0.5, 3.0]]], [16.0, 14.7]]], [['storm 0', [[[1.0, -15.0], [1.0, 1.0], [0.0, 0.0], [1.0, 3.0], [2.0, -8.0], [0.5, 0.0]]], [6.0, 5.2]], ['storm 9', [[[4.0, 3.0], [1.0, -3.0], [2.0, -3.0], [0.5, -12.0], [0.0, -3.0], [2.0, -3.0]]], [6.0, 5.8]], ['storm 14', [[[1.0, 1.0], [0.0, -5.0], [2.0, -5.0], [4.0, -8.0], [1.0, -15.0], [4.0, 3.0]]], [11.5, 9.0]], ['storm 15', [[[2.0, -12.0], [2.0, 1.0], [1.0, 3.0], [4.0, -5.0], [2.0, -15.0], [4.0, -3.0]]], [19.0, 17.7]], ['storm 16', [[[4.0, 1.0], [0.0, 0.0], [0.0, -5.0], [4.0, 1.0], [0.0, 0.0], [0.0, 0.0]]], [4.0, 3.7]], ['storm 17', [[[0.0, -12.0], [0.5, 0.0], [2.0, -12.0], [2.0, 0.5], [1.0, 0.5], [2.0, -12.0]]], [10.0, 9.7]], ['storm 18', [[[4.0, 0.5], [0.0, -12.0], [0.0, -3.0], [0.0, -12.0], [0.0, 0.0], [0.5, -5.0]]], [2.8, 2.6]], ['storm 19', [[[4.0, -5.0], [0.5, -3.0], [4.0, 1.0], [0.5, -15.0], [0.0, -15.0], [0.5, 3.0]]], [9.5, 8.5]]], [['storm 9', [[[4.0, 3.0], [1.0, -3.0], [2.0, -3.0], [0.5, -12.0], [0.0, -3.0], [2.0, -3.0]]], [6.0, 5.8]], ['storm 19', [[[4.0, -5.0], [0.5, -3.0], [4.0, 1.0], [0.5, -15.0], [0.0, -15.0], [0.5, 3.0]]], [9.5, 8.5]], ['storm 21', [[[0.0, -5.0], [1.0, -15.0], [4.0, 1.0], [4.0, -3.0], [4.0, -12.0], [2.0, -12.0]]], [20.0, 19.4]], ['storm 22', [[[4.0, -8.0], [2.0, -15.0], [0.0, -3.0], [4.0, -8.0], [4.0, -0.5], [4.0, 0.0]]], [24.0, 22.8]], ['storm 23', [[[2.0, -12.0], [4.0, -8.0], [0.5, -3.0], [4.0, 0.0], [1.0, -8.0], [0.5, 3.0]]], [16.0, 14.7]], ['storm 24', [[[0.0, 0.5], [2.0, 3.0], [2.0, -5.0], [4.0, -3.0], [0.0, -0.5], [1.0, 3.0]]], [7.0, 6.2]], ['storm 25', [[[2.0, -3.0], [4.0, -8.0], [1.0, 3.0], [0.0, 0.5], [0.5, -3.0], [0.0, -5.0]]], [8.5, 7.4]], ['storm 26', [[[2.0, 0.0], [1.0, -0.5], [2.0, -12.0], [2.0, -8.0], [4.0, -12.0], [1.0, -12.0]]], [20.0, 19.2]]], [['storm 0', [[[1.0, -15.0], [1.0, 1.0], [0.0, 0.0], [1.0, 3.0], [2.0, -8.0], [0.5, 0.0]]], [6.0, 5.2]], ['storm 1', [[[0.5, 0.5], [1.0, 0.5], [2.0, -8.0], [0.0, -5.0], [0.0, 1.0], [1.0, -5.0]]], [5.2, 5.0]], ['storm 9', [[[4.0, 3.0], [1.0, -3.0], [2.0, -3.0], [0.5, -12.0], [0.0, -3.0], [2.0, -3.0]]], [6.0, 5.8]], ['storm 28', [[[0.0, -3.0], [0.5, -3.0], [2.0, -3.0], [2.0, 3.0], [0.0, 1.0], [2.0, -15.0]]], [6.5, 5.4]], ['storm 29', [[[0.5, -5.0], [4.0, 1.0], [1.0, -3.0], [0.5, 0.5], [1.0, 1.0], [1.0, -5.0]]], [6.0, 5.7]], ['rain on snowpack', [[[5.0, -8.0], [3.0, 2.0], [10.0, 3.0]]], [7.5, 0.7]], ['exactly freezing', [[[2.0, 0.0], [2.0, 0.0]]], [4.0, 4.0]], ['single burst then settling', [[[4.0, -6.0], [0.0, -6.0], [0.0, -6.0]]], [6.0, 5.8]]]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
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 |
|---|---|---|---|
| storm 0 | [6.0, 5.7] | [6.0, 5.2] | Failed |
| storm 1 | [5.2, 5.0] | [5.2, 5.0] | Passed |
| storm 2 | [6.5, 6.1] | [6.5, 5.7] | Failed |
| storm 3 | [13.2, 12.8] | [13.2, 12.8] | Passed |
| storm 4 | [10.2, 9.6] | [10.2, 9.6] | Passed |
| storm 5 | [13.0, 12.3] | [13.0, 12.3] | Passed |
| storm 6 | [3.5, 3.3] | [3.5, 3.3] | Passed |
| storm 9 | [6.0, 5.8] | [6.0, 5.8] | Passed |
SHA-256 / 85daf033a69829dc5c689eb0327644c287daca536ed17b52fe707af2c2e3ae5b
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(hours):
total = 0.0
depth = 0.0
for liq, t in hours:
if t > 1:
slr = 0
elif t > 0:
slr = 5
elif t > -5:
slr = 10
elif t > -12:
slr = 15
else:
slr = 20
new = liq * slr / 10.0
depth = depth * 0.98 + new
total += new
if slr == 0 and liq > 0:
depth = max(depth - 0.5 * liq, 0.0)
return [round(total, 1), round(depth, 1)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['storm 0', [[[1.0, -15.0], [1.0, 1.0], [0.0, 0.0], [1.0, 3.0], [2.0, -8.0], [0.5, 0.0]]], [6.0, 5.2]], ['storm 1', [[[0.5, 0.5], [1.0, 0.5], [2.0, -8.0], [0.0, -5.0], [0.0, 1.0], [1.0, -5.0]]], [5.2, 5.0]], ['storm 2', [[[1.0, -8.0], [2.0, 0.0], [0.0, -5.0], [1.0, -0.5], [1.0, 3.0], [4.0, 0.5]]], [6.5, 5.7]], ['storm 3', [[[0.5, -3.0], [0.5, -0.5], [1.0, -8.0], [4.0, -5.0], [4.0, -0.5], [0.5, -8.0]]], [13.2, 12.8]], ['storm 4', [[[2.0, -5.0], [4.0, -0.5], [0.5, -5.0], [0.0, -5.0], [1.0, 1.0], [2.0, -0.5]]], [10.2, 9.6]], ['storm 5', [[[2.0, -5.0], [2.0, -3.0], [0.0, -8.0], [4.0, -8.0], [4.0, 0.5], [0.0, -15.0]]], [13.0, 12.3]], ['storm 6', [[[1.0, -8.0], [1.0, -0.5], [0.0, -12.0], [0.0, 0.5], [1.0, 0.0], [0.0, 0.0]]], [3.5, 3.3]], ['storm 9', [[[4.0, 3.0], [1.0, -3.0], [2.0, -3.0], [0.5, -12.0], [0.0, -3.0], [2.0, -3.0]]], [6.0, 5.8]]], [['storm 7', [[[0.0, 3.0], [1.0, 0.0], [0.0, -15.0], [4.0, -5.0], [0.5, -15.0], [0.5, 1.0]]], [8.2, 7.9]], ['storm 8', [[[0.0, 1.0], [2.0, -8.0], [2.0, -0.5], [2.0, -8.0], [4.0, 0.5], [2.0, -3.0]]], [12.0, 11.5]], ['storm 9', [[[4.0, 3.0], [1.0, -3.0], [2.0, -3.0], [0.5, -12.0], [0.0, -3.0], [2.0, -3.0]]], [6.0, 5.8]], ['storm 10', [[[0.0, -12.0], [2.0, -15.0], [0.0, 3.0], [2.0, 1.0], [0.0, 0.5], [1.0, -15.0]]], [7.0, 6.6]], ['storm 11', [[[1.0, -8.0], [2.0, -15.0], [1.0, -3.0], [0.0, 1.0], [4.0, -3.0], [0.0, 3.0]]], [10.5, 9.9]], ['storm 12', [[[1.0, -0.5], [4.0, -5.0], [0.5, -12.0], [4.0, 0.5], [1.0, -5.0], [1.0, 3.0]]], [11.5, 10.3]], ['storm 13', [[[4.0, -8.0], [4.0, 0.5], [1.0, -15.0], [4.0, -5.0], [0.5, -12.0], [0.5, -12.0]]], [18.0, 16.9]], ['storm 23', [[[2.0, -12.0], [4.0, -8.0], [0.5, -3.0], [4.0, 0.0], [1.0, -8.0], [0.5, 3.0]]], [16.0, 14.7]]], [['storm 0', [[[1.0, -15.0], [1.0, 1.0], [0.0, 0.0], [1.0, 3.0], [2.0, -8.0], [0.5, 0.0]]], [6.0, 5.2]], ['storm 9', [[[4.0, 3.0], [1.0, -3.0], [2.0, -3.0], [0.5, -12.0], [0.0, -3.0], [2.0, -3.0]]], [6.0, 5.8]], ['storm 14', [[[1.0, 1.0], [0.0, -5.0], [2.0, -5.0], [4.0, -8.0], [1.0, -15.0], [4.0, 3.0]]], [11.5, 9.0]], ['storm 15', [[[2.0, -12.0], [2.0, 1.0], [1.0, 3.0], [4.0, -5.0], [2.0, -15.0], [4.0, -3.0]]], [19.0, 17.7]], ['storm 16', [[[4.0, 1.0], [0.0, 0.0], [0.0, -5.0], [4.0, 1.0], [0.0, 0.0], [0.0, 0.0]]], [4.0, 3.7]], ['storm 17', [[[0.0, -12.0], [0.5, 0.0], [2.0, -12.0], [2.0, 0.5], [1.0, 0.5], [2.0, -12.0]]], [10.0, 9.7]], ['storm 18', [[[4.0, 0.5], [0.0, -12.0], [0.0, -3.0], [0.0, -12.0], [0.0, 0.0], [0.5, -5.0]]], [2.8, 2.6]], ['storm 19', [[[4.0, -5.0], [0.5, -3.0], [4.0, 1.0], [0.5, -15.0], [0.0, -15.0], [0.5, 3.0]]], [9.5, 8.5]]], [['storm 9', [[[4.0, 3.0], [1.0, -3.0], [2.0, -3.0], [0.5, -12.0], [0.0, -3.0], [2.0, -3.0]]], [6.0, 5.8]], ['storm 19', [[[4.0, -5.0], [0.5, -3.0], [4.0, 1.0], [0.5, -15.0], [0.0, -15.0], [0.5, 3.0]]], [9.5, 8.5]], ['storm 21', [[[0.0, -5.0], [1.0, -15.0], [4.0, 1.0], [4.0, -3.0], [4.0, -12.0], [2.0, -12.0]]], [20.0, 19.4]], ['storm 22', [[[4.0, -8.0], [2.0, -15.0], [0.0, -3.0], [4.0, -8.0], [4.0, -0.5], [4.0, 0.0]]], [24.0, 22.8]], ['storm 23', [[[2.0, -12.0], [4.0, -8.0], [0.5, -3.0], [4.0, 0.0], [1.0, -8.0], [0.5, 3.0]]], [16.0, 14.7]], ['storm 24', [[[0.0, 0.5], [2.0, 3.0], [2.0, -5.0], [4.0, -3.0], [0.0, -0.5], [1.0, 3.0]]], [7.0, 6.2]], ['storm 25', [[[2.0, -3.0], [4.0, -8.0], [1.0, 3.0], [0.0, 0.5], [0.5, -3.0], [0.0, -5.0]]], [8.5, 7.4]], ['storm 26', [[[2.0, 0.0], [1.0, -0.5], [2.0, -12.0], [2.0, -8.0], [4.0, -12.0], [1.0, -12.0]]], [20.0, 19.2]]], [['storm 0', [[[1.0, -15.0], [1.0, 1.0], [0.0, 0.0], [1.0, 3.0], [2.0, -8.0], [0.5, 0.0]]], [6.0, 5.2]], ['storm 1', [[[0.5, 0.5], [1.0, 0.5], [2.0, -8.0], [0.0, -5.0], [0.0, 1.0], [1.0, -5.0]]], [5.2, 5.0]], ['storm 9', [[[4.0, 3.0], [1.0, -3.0], [2.0, -3.0], [0.5, -12.0], [0.0, -3.0], [2.0, -3.0]]], [6.0, 5.8]], ['storm 28', [[[0.0, -3.0], [0.5, -3.0], [2.0, -3.0], [2.0, 3.0], [0.0, 1.0], [2.0, -15.0]]], [6.5, 5.4]], ['storm 29', [[[0.5, -5.0], [4.0, 1.0], [1.0, -3.0], [0.5, 0.5], [1.0, 1.0], [1.0, -5.0]]], [6.0, 5.7]], ['rain on snowpack', [[[5.0, -8.0], [3.0, 2.0], [10.0, 3.0]]], [7.5, 0.7]], ['exactly freezing', [[[2.0, 0.0], [2.0, 0.0]]], [4.0, 4.0]], ['single burst then settling', [[[4.0, -6.0], [0.0, -6.0], [0.0, -6.0]]], [6.0, 5.8]]]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
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 |
|---|---|---|---|
| storm 0 | [6.0, 5.2] | [6.0, 5.2] | Passed |
| storm 1 | [5.2, 5.0] | [5.2, 5.0] | Passed |
| storm 2 | [6.5, 5.7] | [6.5, 5.7] | Passed |
| storm 3 | [13.2, 12.8] | [13.2, 12.8] | Passed |
| storm 4 | [10.2, 9.6] | [10.2, 9.6] | Passed |
| storm 5 | [13.0, 12.3] | [13.0, 12.3] | Passed |
| storm 6 | [3.5, 3.3] | [3.5, 3.3] | Passed |
| storm 9 | [6.0, 5.8] | [6.0, 5.8] | Passed |
SHA-256 / 7d5c1453b23ecc4e06b23c8db8859ae149bd24352cef3f58e95c726c77304638
Verification & scope
Stipulated deterministic teaching model of an operational weather index; coefficients and thresholds are fixed by the contract and no claim of standards conformance is made. 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:48:28.674455+00:00.
Case digest / 78269a3d20c1bb311554f949fd2988c6a28c7d913e04e2bab4e37fb94aad3256