FA-71326 / Weather index computation / Open access
Hourly snowfall and settled depth: freezing ratio band · case 01
Snow at exactly -5 degC is reported with the wet 10:1 ratio instead of 15:1.
ROOT CAUSE
The -5 degC boundary is assigned to the warmer ratio band.
VERIFIED REPAIR
Use 10:1 for -5 < T <= 0 and 15:1 at -5 degC.
Unsuccessful approach: Moving 0 degC into the 5:1 band halves snowfall exactly at freezing.
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 = 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 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 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 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 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 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 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 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 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 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 27', [[[4.0, 3.0], [0.5, 0.5], [1.0, -12.0], [1.0, -0.5], [4.0, -8.0], [1.0, -5.0]]], [10.8, 10.5]]], [['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 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 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 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 | [4.8, 4.5] | [5.2, 5.0] | Failed |
| storm 2 | [6.5, 5.7] | [6.5, 5.7] | Passed |
| storm 3 | [11.2, 10.8] | [13.2, 12.8] | Failed |
| storm 4 | [9.0, 8.5] | [10.2, 9.6] | Failed |
| storm 5 | [12.0, 11.4] | [13.0, 12.3] | Failed |
| storm 6 | [3.5, 3.3] | [3.5, 3.3] | Passed |
| storm 7 | [6.2, 6.0] | [8.2, 7.9] | Failed |
SHA-256 / 80e4c66abdfbcc642c9cd1198e4c78cf7b3e1429d438314e484729d9e9ab6c93
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.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 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 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 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 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 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 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 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 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 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 27', [[[4.0, 3.0], [0.5, 0.5], [1.0, -12.0], [1.0, -0.5], [4.0, -8.0], [1.0, -5.0]]], [10.8, 10.5]]], [['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 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 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 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 | [5.8, 5.0] | [6.0, 5.2] | Failed |
| storm 1 | [5.2, 5.0] | [5.2, 5.0] | Passed |
| storm 2 | [5.5, 4.7] | [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.0, 2.8] | [3.5, 3.3] | Failed |
| storm 7 | [7.8, 7.5] | [8.2, 7.9] | Failed |
SHA-256 / a492c56d4d2857e26911924bca0661c42d4d6da42e05ec036f91219aff978e20
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 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 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 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 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 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 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 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 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 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 27', [[[4.0, 3.0], [0.5, 0.5], [1.0, -12.0], [1.0, -0.5], [4.0, -8.0], [1.0, -5.0]]], [10.8, 10.5]]], [['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 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 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 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 7 | [8.2, 7.9] | [8.2, 7.9] | Passed |
SHA-256 / f674f2e5afb40e9a563b304308deda8c282de800baf53ef814cf3d119e911957
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.634294+00:00.
Case digest / e9131aec186e16784094e13605e49495cabf4ea784c2e3a23a7379a011407ae3