FAILURE MAP
← Case archive

FA-93786 / Solar tracker geometry / Open access

Hazard stow angle selection: hail side · case 01

Rows tilt their glass face away from incoming hail.

Verified by executionVariant 1 · 7 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The relative hail bearing is computed from the hail direction to the axis.

VERIFIED REPAIR

Use (hail_from - axis_az) mod 360.

Unsuccessful approach: An unwrapped absolute difference misclassifies bearings across north.

Case contract

Priority: wind >= 20 m/s gives [0.0, 'wind']; then a manual angle (clamped to +-max_angle) gives 'manual'; then hail from azimuth hail_from gives +max_angle when (hail_from - axis_az) mod 360 is strictly between 0 and 180, else -max_angle ('hail'); then snow alternates rows: even rows +max_angle, odd rows -max_angle ('snow'); otherwise [None, 'normal'].

Why this case matters

Single-axis and dual-axis solar trackers turn a sun direction into actuator commands; a sign, frame or limit mistake points a whole plant away from the sun or into a mechanical stop.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(hazards, row, axis_az, max_angle, manual):
    wind = hazards.get('wind', 0)
    if wind >= 20:
        return [0.0, 'wind']
    if manual is not None:
        return [float(max(-max_angle, min(max_angle, manual))), 'manual']
    hail = hazards.get('hail_from')
    if hail is not None:
        rel = (axis_az - hail) % 360
        return [float(max_angle if 0 < rel < 180 else -max_angle), 'hail']
    if hazards.get('snow'):
        return [float(max_angle if row % 2 == 0 else -max_angle), 'snow']
    return [None, 'normal']
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['boundary: wind exactly at stow limit', [{'wind': 20}, 0, 180, 60, 30], [0.0, 'wind']],
  ['boundary: hail along the axis', [{'hail_from': 180}, 1, 180, 60, None], [-60.0, 'hail']],
  ['normal: snow on odd row', [{'snow': True}, 3, 180, 60, None], [-60.0, 'snow']],
  ['regression: hail side', [{'wind': 15, 'hail_from': 225}, 5, 180, 50, None], [50.0, 'hail']],
  ['regression: hail side (partial repair)', [{'wind': 19, 'hail_from': 90}, 5, 180, 60, None],
   [-60.0, 'hail']],
  ['control 1', [{'wind': 15, 'hail_from': 180}, 5, 180, 50, 0], [0.0, 'manual']],
  ['control 2', [{'wind': 20, 'hail_from': 90, 'snow': False}, 2, 180, 50, -70], [0.0, 'wind']]],
 [['boundary: wind exactly at stow limit', [{'wind': 20}, 0, 180, 60, 30], [0.0, 'wind']],
  ['boundary: hail along the axis', [{'hail_from': 180}, 1, 180, 60, None], [-60.0, 'hail']],
  ['normal: snow on odd row', [{'snow': True}, 3, 180, 60, None], [-60.0, 'snow']],
  ['regression: hail side', [{'hail_from': 45, 'snow': True}, 4, 0, 50, None], [50.0, 'hail']],
  ['regression: hail side (partial repair)', [{'wind': 19, 'hail_from': 90}, 5, 180, 60, None],
   [-60.0, 'hail']],
  ['control 1', [{}, 3, 0, 60, 65], [60.0, 'manual']],
  ['control 2', [{'wind': 21, 'hail_from': 225, 'snow': True}, 1, 180, 60, -70], [0.0, 'wind']]],
 [['boundary: wind exactly at stow limit', [{'wind': 20}, 0, 180, 60, 30], [0.0, 'wind']],
  ['boundary: hail along the axis', [{'hail_from': 180}, 1, 180, 60, None], [-60.0, 'hail']],
  ['normal: snow on odd row', [{'snow': True}, 3, 180, 60, None], [-60.0, 'snow']],
  ['regression: hail side', [{'hail_from': 45, 'snow': True}, 2, 0, 50, None], [50.0, 'hail']],
  ['regression: hail side (partial repair)', [{'wind': 19, 'hail_from': 90}, 5, 180, 60, None],
   [-60.0, 'hail']],
  ['control 1', [{}, 3, 180, 50, -20], [-20.0, 'manual']],
  ['control 2', [{'wind': 21, 'snow': False}, 1, 0, 60, 65], [0.0, 'wind']]],
 [['boundary: wind exactly at stow limit', [{'wind': 20}, 0, 180, 60, 30], [0.0, 'wind']],
  ['boundary: hail along the axis', [{'hail_from': 180}, 1, 180, 60, None], [-60.0, 'hail']],
  ['normal: snow on odd row', [{'snow': True}, 3, 180, 60, None], [-60.0, 'snow']],
  ['regression: hail side', [{'wind': 19, 'hail_from': 90}, 5, 180, 60, None], [-60.0, 'hail']],
  ['control 1', [{'hail_from': None, 'snow': True}, 1, 180, 50, 30], [30.0, 'manual']],
  ['control 2', [{'wind': 15, 'snow': True}, 3, 0, 50, -20], [-20.0, 'manual']],
  ['control 3', [{'hail_from': 315}, 4, 180, 50, -20], [-20.0, 'manual']]],
 [['boundary: wind exactly at stow limit', [{'wind': 20}, 0, 180, 60, 30], [0.0, 'wind']],
  ['boundary: hail along the axis', [{'hail_from': 180}, 1, 180, 60, None], [-60.0, 'hail']],
  ['normal: snow on odd row', [{'snow': True}, 3, 180, 60, None], [-60.0, 'snow']],
  ['regression: hail side', [{'wind': 15, 'hail_from': 315, 'snow': False}, 3, 0, 50, None],
   [-50.0, 'hail']],
  ['regression: hail side (partial repair)', [{'wind': 19, 'hail_from': 90}, 5, 180, 60, None],
   [-60.0, 'hail']],
  ['control 1', [{'wind': 19, 'snow': False}, 1, 180, 60, None], [None, 'normal']],
  ['control 2', [{'snow': True}, 4, 0, 50, -20], [-20.0, 'manual']]]]
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 fixtureActualExpectedOutcome
boundary: wind exactly at stow limit[0.0, 'wind'][0.0, 'wind']Passed
boundary: hail along the axis[-60.0, 'hail'][-60.0, 'hail']Passed
normal: snow on odd row[-60.0, 'snow'][-60.0, 'snow']Passed
regression: hail side[-50.0, 'hail'][50.0, 'hail']Failed
regression: hail side (partial repair)[60.0, 'hail'][-60.0, 'hail']Failed
control 1[0.0, 'manual'][0.0, 'manual']Passed
control 2[0.0, 'wind'][0.0, 'wind']Passed

SHA-256 / 2b67b3a3b4d144015f88b2b2bb614a64c6a8c47f9b35904fae31d54eb767faee

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(hazards, row, axis_az, max_angle, manual):
    wind = hazards.get('wind', 0)
    if wind >= 20:
        return [0.0, 'wind']
    if manual is not None:
        return [float(max(-max_angle, min(max_angle, manual))), 'manual']
    hail = hazards.get('hail_from')
    if hail is not None:
        rel = abs(hail - axis_az)
        return [float(max_angle if 0 < rel < 180 else -max_angle), 'hail']
    if hazards.get('snow'):
        return [float(max_angle if row % 2 == 0 else -max_angle), 'snow']
    return [None, 'normal']
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['boundary: wind exactly at stow limit', [{'wind': 20}, 0, 180, 60, 30], [0.0, 'wind']],
  ['boundary: hail along the axis', [{'hail_from': 180}, 1, 180, 60, None], [-60.0, 'hail']],
  ['normal: snow on odd row', [{'snow': True}, 3, 180, 60, None], [-60.0, 'snow']],
  ['regression: hail side', [{'wind': 15, 'hail_from': 225}, 5, 180, 50, None], [50.0, 'hail']],
  ['regression: hail side (partial repair)', [{'wind': 19, 'hail_from': 90}, 5, 180, 60, None],
   [-60.0, 'hail']],
  ['control 1', [{'wind': 15, 'hail_from': 180}, 5, 180, 50, 0], [0.0, 'manual']],
  ['control 2', [{'wind': 20, 'hail_from': 90, 'snow': False}, 2, 180, 50, -70], [0.0, 'wind']]],
 [['boundary: wind exactly at stow limit', [{'wind': 20}, 0, 180, 60, 30], [0.0, 'wind']],
  ['boundary: hail along the axis', [{'hail_from': 180}, 1, 180, 60, None], [-60.0, 'hail']],
  ['normal: snow on odd row', [{'snow': True}, 3, 180, 60, None], [-60.0, 'snow']],
  ['regression: hail side', [{'hail_from': 45, 'snow': True}, 4, 0, 50, None], [50.0, 'hail']],
  ['regression: hail side (partial repair)', [{'wind': 19, 'hail_from': 90}, 5, 180, 60, None],
   [-60.0, 'hail']],
  ['control 1', [{}, 3, 0, 60, 65], [60.0, 'manual']],
  ['control 2', [{'wind': 21, 'hail_from': 225, 'snow': True}, 1, 180, 60, -70], [0.0, 'wind']]],
 [['boundary: wind exactly at stow limit', [{'wind': 20}, 0, 180, 60, 30], [0.0, 'wind']],
  ['boundary: hail along the axis', [{'hail_from': 180}, 1, 180, 60, None], [-60.0, 'hail']],
  ['normal: snow on odd row', [{'snow': True}, 3, 180, 60, None], [-60.0, 'snow']],
  ['regression: hail side', [{'hail_from': 45, 'snow': True}, 2, 0, 50, None], [50.0, 'hail']],
  ['regression: hail side (partial repair)', [{'wind': 19, 'hail_from': 90}, 5, 180, 60, None],
   [-60.0, 'hail']],
  ['control 1', [{}, 3, 180, 50, -20], [-20.0, 'manual']],
  ['control 2', [{'wind': 21, 'snow': False}, 1, 0, 60, 65], [0.0, 'wind']]],
 [['boundary: wind exactly at stow limit', [{'wind': 20}, 0, 180, 60, 30], [0.0, 'wind']],
  ['boundary: hail along the axis', [{'hail_from': 180}, 1, 180, 60, None], [-60.0, 'hail']],
  ['normal: snow on odd row', [{'snow': True}, 3, 180, 60, None], [-60.0, 'snow']],
  ['regression: hail side', [{'wind': 19, 'hail_from': 90}, 5, 180, 60, None], [-60.0, 'hail']],
  ['control 1', [{'hail_from': None, 'snow': True}, 1, 180, 50, 30], [30.0, 'manual']],
  ['control 2', [{'wind': 15, 'snow': True}, 3, 0, 50, -20], [-20.0, 'manual']],
  ['control 3', [{'hail_from': 315}, 4, 180, 50, -20], [-20.0, 'manual']]],
 [['boundary: wind exactly at stow limit', [{'wind': 20}, 0, 180, 60, 30], [0.0, 'wind']],
  ['boundary: hail along the axis', [{'hail_from': 180}, 1, 180, 60, None], [-60.0, 'hail']],
  ['normal: snow on odd row', [{'snow': True}, 3, 180, 60, None], [-60.0, 'snow']],
  ['regression: hail side', [{'wind': 15, 'hail_from': 315, 'snow': False}, 3, 0, 50, None],
   [-50.0, 'hail']],
  ['regression: hail side (partial repair)', [{'wind': 19, 'hail_from': 90}, 5, 180, 60, None],
   [-60.0, 'hail']],
  ['control 1', [{'wind': 19, 'snow': False}, 1, 180, 60, None], [None, 'normal']],
  ['control 2', [{'snow': True}, 4, 0, 50, -20], [-20.0, 'manual']]]]
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 fixtureActualExpectedOutcome
boundary: wind exactly at stow limit[0.0, 'wind'][0.0, 'wind']Passed
boundary: hail along the axis[-60.0, 'hail'][-60.0, 'hail']Passed
normal: snow on odd row[-60.0, 'snow'][-60.0, 'snow']Passed
regression: hail side[50.0, 'hail'][50.0, 'hail']Passed
regression: hail side (partial repair)[60.0, 'hail'][-60.0, 'hail']Failed
control 1[0.0, 'manual'][0.0, 'manual']Passed
control 2[0.0, 'wind'][0.0, 'wind']Passed

SHA-256 / e1eb6272d1fd304075937fd2009656eb1ea1c120ea1d670083effb6de958a067

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(hazards, row, axis_az, max_angle, manual):
    wind = hazards.get('wind', 0)
    if wind >= 20:
        return [0.0, 'wind']
    if manual is not None:
        return [float(max(-max_angle, min(max_angle, manual))), 'manual']
    hail = hazards.get('hail_from')
    if hail is not None:
        rel = (hail - axis_az) % 360
        return [float(max_angle if 0 < rel < 180 else -max_angle), 'hail']
    if hazards.get('snow'):
        return [float(max_angle if row % 2 == 0 else -max_angle), 'snow']
    return [None, 'normal']
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['boundary: wind exactly at stow limit', [{'wind': 20}, 0, 180, 60, 30], [0.0, 'wind']],
  ['boundary: hail along the axis', [{'hail_from': 180}, 1, 180, 60, None], [-60.0, 'hail']],
  ['normal: snow on odd row', [{'snow': True}, 3, 180, 60, None], [-60.0, 'snow']],
  ['regression: hail side', [{'wind': 15, 'hail_from': 225}, 5, 180, 50, None], [50.0, 'hail']],
  ['regression: hail side (partial repair)', [{'wind': 19, 'hail_from': 90}, 5, 180, 60, None],
   [-60.0, 'hail']],
  ['control 1', [{'wind': 15, 'hail_from': 180}, 5, 180, 50, 0], [0.0, 'manual']],
  ['control 2', [{'wind': 20, 'hail_from': 90, 'snow': False}, 2, 180, 50, -70], [0.0, 'wind']]],
 [['boundary: wind exactly at stow limit', [{'wind': 20}, 0, 180, 60, 30], [0.0, 'wind']],
  ['boundary: hail along the axis', [{'hail_from': 180}, 1, 180, 60, None], [-60.0, 'hail']],
  ['normal: snow on odd row', [{'snow': True}, 3, 180, 60, None], [-60.0, 'snow']],
  ['regression: hail side', [{'hail_from': 45, 'snow': True}, 4, 0, 50, None], [50.0, 'hail']],
  ['regression: hail side (partial repair)', [{'wind': 19, 'hail_from': 90}, 5, 180, 60, None],
   [-60.0, 'hail']],
  ['control 1', [{}, 3, 0, 60, 65], [60.0, 'manual']],
  ['control 2', [{'wind': 21, 'hail_from': 225, 'snow': True}, 1, 180, 60, -70], [0.0, 'wind']]],
 [['boundary: wind exactly at stow limit', [{'wind': 20}, 0, 180, 60, 30], [0.0, 'wind']],
  ['boundary: hail along the axis', [{'hail_from': 180}, 1, 180, 60, None], [-60.0, 'hail']],
  ['normal: snow on odd row', [{'snow': True}, 3, 180, 60, None], [-60.0, 'snow']],
  ['regression: hail side', [{'hail_from': 45, 'snow': True}, 2, 0, 50, None], [50.0, 'hail']],
  ['regression: hail side (partial repair)', [{'wind': 19, 'hail_from': 90}, 5, 180, 60, None],
   [-60.0, 'hail']],
  ['control 1', [{}, 3, 180, 50, -20], [-20.0, 'manual']],
  ['control 2', [{'wind': 21, 'snow': False}, 1, 0, 60, 65], [0.0, 'wind']]],
 [['boundary: wind exactly at stow limit', [{'wind': 20}, 0, 180, 60, 30], [0.0, 'wind']],
  ['boundary: hail along the axis', [{'hail_from': 180}, 1, 180, 60, None], [-60.0, 'hail']],
  ['normal: snow on odd row', [{'snow': True}, 3, 180, 60, None], [-60.0, 'snow']],
  ['regression: hail side', [{'wind': 19, 'hail_from': 90}, 5, 180, 60, None], [-60.0, 'hail']],
  ['control 1', [{'hail_from': None, 'snow': True}, 1, 180, 50, 30], [30.0, 'manual']],
  ['control 2', [{'wind': 15, 'snow': True}, 3, 0, 50, -20], [-20.0, 'manual']],
  ['control 3', [{'hail_from': 315}, 4, 180, 50, -20], [-20.0, 'manual']]],
 [['boundary: wind exactly at stow limit', [{'wind': 20}, 0, 180, 60, 30], [0.0, 'wind']],
  ['boundary: hail along the axis', [{'hail_from': 180}, 1, 180, 60, None], [-60.0, 'hail']],
  ['normal: snow on odd row', [{'snow': True}, 3, 180, 60, None], [-60.0, 'snow']],
  ['regression: hail side', [{'wind': 15, 'hail_from': 315, 'snow': False}, 3, 0, 50, None],
   [-50.0, 'hail']],
  ['regression: hail side (partial repair)', [{'wind': 19, 'hail_from': 90}, 5, 180, 60, None],
   [-60.0, 'hail']],
  ['control 1', [{'wind': 19, 'snow': False}, 1, 180, 60, None], [None, 'normal']],
  ['control 2', [{'snow': True}, 4, 0, 50, -20], [-20.0, 'manual']]]]
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 fixtureActualExpectedOutcome
boundary: wind exactly at stow limit[0.0, 'wind'][0.0, 'wind']Passed
boundary: hail along the axis[-60.0, 'hail'][-60.0, 'hail']Passed
normal: snow on odd row[-60.0, 'snow'][-60.0, 'snow']Passed
regression: hail side[50.0, 'hail'][50.0, 'hail']Passed
regression: hail side (partial repair)[-60.0, 'hail'][-60.0, 'hail']Passed
control 1[0.0, 'manual'][0.0, 'manual']Passed
control 2[0.0, 'wind'][0.0, 'wind']Passed

SHA-256 / bf62454c9ce0f177235cbc5fda88014522994f753045ba1c46a6bcaaa61d9c0f

Verification & scope

Deterministic stipulated toy contract for teaching; no claim of conformance with any standard, vendor protocol or production controller. 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:51:58.283239+00:00.

Case digest / 527549e30d7059afddeaefc900633048b62d8d8140aeefbf0603cafc4103e840