FAILURE MAP
← Case archive

FA-93721 / Solar tracker geometry / Open access

Anemometer fail-safe stow voting: missing value filter · case 01

A dead-calm reading of 0 m/s is treated as a missing sensor and forces a stow.

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

ROOT CAUSE

The validity filter tests truthiness, dropping zero readings.

VERIFIED REPAIR

Test value is not None.

Unsuccessful approach: Replacing missing values with 0 counts dead sensors as calm.

Case contract

readings are [value or None, age_s] per anemometer. A reading is valid when value is not None and age <= max_age. Fewer than n_required valid readings: ['stow', 'sensor', None]. Otherwise use the highest valid value: >= stow_at gives ['stow', 'wind', v], else ['track', 'ok', v].

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(readings, max_age, stow_at, n_required):
    valid = [v for v, age in readings if v and age <= max_age]
    if len(valid) < n_required:
        return ['stow', 'sensor', None]
    peak = max(valid)
    if peak >= stow_at:
        return ['stow', 'wind', peak]
    return ['track', 'ok', peak]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['boundary: reading exactly max_age old', [[[10, 60]], 60, 15, 1], ['track', 'ok', 10]],
  ['boundary: calm zero reading', [[[0, 5], [None, 5]], 60, 15, 1], ['track', 'ok', 0]],
  ['boundary: wind at stow limit', [[[15, 5], [4, 5]], 60, 15, 2], ['stow', 'wind', 15]],
  ['regression: missing value filter', [[[15, 10], [0, 30]], 30, 18, 2], ['track', 'ok', 15]],
  ['regression: missing value filter (partial repair)',
   [[[None, 5], [12, 61], [16.5, 30]], 60, 18, 2], ['stow', 'sensor', None]],
  ['control 1', [[[14.5, 5], [8, 5], [22, 60]], 60, 15, 2], ['stow', 'wind', 22]],
  ['control 2', [[[8, 60], [8, 120]], 60, 18, 1], ['track', 'ok', 8]]],
 [['boundary: reading exactly max_age old', [[[10, 60]], 60, 15, 1], ['track', 'ok', 10]],
  ['boundary: calm zero reading', [[[0, 5], [None, 5]], 60, 15, 1], ['track', 'ok', 0]],
  ['boundary: wind at stow limit', [[[15, 5], [4, 5]], 60, 15, 2], ['stow', 'wind', 15]],
  ['regression: missing value filter', [[[22, 120], [0, 30], [14.5, 0]], 30, 15, 2],
   ['track', 'ok', 14.5]],
  ['regression: missing value filter (partial repair)',
   [[[None, 0], [None, 120], [14.5, 0]], 30, 18, 2], ['stow', 'sensor', None]],
  ['control 1', [[[8, 60], [0, 10], [14.5, 10]], 60, 18, 1], ['track', 'ok', 14.5]],
  ['control 2', [[[3.5, 61], [22, 61], [22, 10], [16.5, 30]], 60, 18, 1], ['stow', 'wind', 22]]],
 [['boundary: reading exactly max_age old', [[[10, 60]], 60, 15, 1], ['track', 'ok', 10]],
  ['boundary: calm zero reading', [[[0, 5], [None, 5]], 60, 15, 1], ['track', 'ok', 0]],
  ['boundary: wind at stow limit', [[[15, 5], [4, 5]], 60, 15, 2], ['stow', 'wind', 15]],
  ['regression: missing value filter', [[[0, 5]], 60, 15, 1], ['track', 'ok', 0]],
  ['regression: missing value filter (partial repair)',
   [[[None, 0], [None, 120], [14.5, 0]], 30, 18, 2], ['stow', 'sensor', None]],
  ['control 1', [[[22, 61], [22, 120]], 30, 18, 2], ['stow', 'sensor', None]],
  ['control 2', [[[3.5, 30], [15, 0], [None, 61], [None, 30]], 60, 18, 2], ['track', 'ok', 15]]],
 [['boundary: reading exactly max_age old', [[[10, 60]], 60, 15, 1], ['track', 'ok', 10]],
  ['boundary: calm zero reading', [[[0, 5], [None, 5]], 60, 15, 1], ['track', 'ok', 0]],
  ['boundary: wind at stow limit', [[[15, 5], [4, 5]], 60, 15, 2], ['stow', 'wind', 15]],
  ['regression: missing value filter', [[[3.5, 61], [0, 5], [0, 60], [14.5, 120]], 60, 18, 1],
   ['track', 'ok', 0]],
  ['regression: missing value filter (partial repair)',
   [[[None, 61], [3.5, 0], [None, 5]], 60, 18, 2], ['stow', 'sensor', None]],
  ['control 1', [[[3.5, 5], [22, 30]], 30, 18, 2], ['stow', 'wind', 22]],
  ['control 2', [[[22, 0], [3.5, 60], [12, 30], [14.5, 5]], 30, 15, 1], ['stow', 'wind', 22]]],
 [['boundary: reading exactly max_age old', [[[10, 60]], 60, 15, 1], ['track', 'ok', 10]],
  ['boundary: calm zero reading', [[[0, 5], [None, 5]], 60, 15, 1], ['track', 'ok', 0]],
  ['boundary: wind at stow limit', [[[15, 5], [4, 5]], 60, 15, 2], ['stow', 'wind', 15]],
  ['regression: missing value filter', [[[22, 60], [0, 30]], 30, 15, 1], ['track', 'ok', 0]],
  ['regression: missing value filter (partial repair)', [[[None, 10], [15, 0]], 30, 15, 2],
   ['stow', 'sensor', None]],
  ['control 1', [[[3.5, 61], [0, 5], [0, 60], [14.5, 120]], 60, 18, 1], ['track', 'ok', 0]],
  ['control 2', [[[15, 10], [12, 61], [14.5, 60], [None, 60]], 30, 15, 1], ['stow', 'wind', 15]]]]
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: reading exactly max_age old['track', 'ok', 10]['track', 'ok', 10]Passed
boundary: calm zero reading['stow', 'sensor', None]['track', 'ok', 0]Failed
boundary: wind at stow limit['stow', 'wind', 15]['stow', 'wind', 15]Passed
regression: missing value filter['stow', 'sensor', None]['track', 'ok', 15]Failed
regression: missing value filter (partial repair)['stow', 'sensor', None]['stow', 'sensor', None]Passed
control 1['stow', 'wind', 22]['stow', 'wind', 22]Passed
control 2['track', 'ok', 8]['track', 'ok', 8]Passed

SHA-256 / 538405f8c810d727cfe698f3698c1876109e03466142716e65b67b8aa6c98f38

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(readings, max_age, stow_at, n_required):
    valid = [v or 0 for v, age in readings if age <= max_age]
    if len(valid) < n_required:
        return ['stow', 'sensor', None]
    peak = max(valid)
    if peak >= stow_at:
        return ['stow', 'wind', peak]
    return ['track', 'ok', peak]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['boundary: reading exactly max_age old', [[[10, 60]], 60, 15, 1], ['track', 'ok', 10]],
  ['boundary: calm zero reading', [[[0, 5], [None, 5]], 60, 15, 1], ['track', 'ok', 0]],
  ['boundary: wind at stow limit', [[[15, 5], [4, 5]], 60, 15, 2], ['stow', 'wind', 15]],
  ['regression: missing value filter', [[[15, 10], [0, 30]], 30, 18, 2], ['track', 'ok', 15]],
  ['regression: missing value filter (partial repair)',
   [[[None, 5], [12, 61], [16.5, 30]], 60, 18, 2], ['stow', 'sensor', None]],
  ['control 1', [[[14.5, 5], [8, 5], [22, 60]], 60, 15, 2], ['stow', 'wind', 22]],
  ['control 2', [[[8, 60], [8, 120]], 60, 18, 1], ['track', 'ok', 8]]],
 [['boundary: reading exactly max_age old', [[[10, 60]], 60, 15, 1], ['track', 'ok', 10]],
  ['boundary: calm zero reading', [[[0, 5], [None, 5]], 60, 15, 1], ['track', 'ok', 0]],
  ['boundary: wind at stow limit', [[[15, 5], [4, 5]], 60, 15, 2], ['stow', 'wind', 15]],
  ['regression: missing value filter', [[[22, 120], [0, 30], [14.5, 0]], 30, 15, 2],
   ['track', 'ok', 14.5]],
  ['regression: missing value filter (partial repair)',
   [[[None, 0], [None, 120], [14.5, 0]], 30, 18, 2], ['stow', 'sensor', None]],
  ['control 1', [[[8, 60], [0, 10], [14.5, 10]], 60, 18, 1], ['track', 'ok', 14.5]],
  ['control 2', [[[3.5, 61], [22, 61], [22, 10], [16.5, 30]], 60, 18, 1], ['stow', 'wind', 22]]],
 [['boundary: reading exactly max_age old', [[[10, 60]], 60, 15, 1], ['track', 'ok', 10]],
  ['boundary: calm zero reading', [[[0, 5], [None, 5]], 60, 15, 1], ['track', 'ok', 0]],
  ['boundary: wind at stow limit', [[[15, 5], [4, 5]], 60, 15, 2], ['stow', 'wind', 15]],
  ['regression: missing value filter', [[[0, 5]], 60, 15, 1], ['track', 'ok', 0]],
  ['regression: missing value filter (partial repair)',
   [[[None, 0], [None, 120], [14.5, 0]], 30, 18, 2], ['stow', 'sensor', None]],
  ['control 1', [[[22, 61], [22, 120]], 30, 18, 2], ['stow', 'sensor', None]],
  ['control 2', [[[3.5, 30], [15, 0], [None, 61], [None, 30]], 60, 18, 2], ['track', 'ok', 15]]],
 [['boundary: reading exactly max_age old', [[[10, 60]], 60, 15, 1], ['track', 'ok', 10]],
  ['boundary: calm zero reading', [[[0, 5], [None, 5]], 60, 15, 1], ['track', 'ok', 0]],
  ['boundary: wind at stow limit', [[[15, 5], [4, 5]], 60, 15, 2], ['stow', 'wind', 15]],
  ['regression: missing value filter', [[[3.5, 61], [0, 5], [0, 60], [14.5, 120]], 60, 18, 1],
   ['track', 'ok', 0]],
  ['regression: missing value filter (partial repair)',
   [[[None, 61], [3.5, 0], [None, 5]], 60, 18, 2], ['stow', 'sensor', None]],
  ['control 1', [[[3.5, 5], [22, 30]], 30, 18, 2], ['stow', 'wind', 22]],
  ['control 2', [[[22, 0], [3.5, 60], [12, 30], [14.5, 5]], 30, 15, 1], ['stow', 'wind', 22]]],
 [['boundary: reading exactly max_age old', [[[10, 60]], 60, 15, 1], ['track', 'ok', 10]],
  ['boundary: calm zero reading', [[[0, 5], [None, 5]], 60, 15, 1], ['track', 'ok', 0]],
  ['boundary: wind at stow limit', [[[15, 5], [4, 5]], 60, 15, 2], ['stow', 'wind', 15]],
  ['regression: missing value filter', [[[22, 60], [0, 30]], 30, 15, 1], ['track', 'ok', 0]],
  ['regression: missing value filter (partial repair)', [[[None, 10], [15, 0]], 30, 15, 2],
   ['stow', 'sensor', None]],
  ['control 1', [[[3.5, 61], [0, 5], [0, 60], [14.5, 120]], 60, 18, 1], ['track', 'ok', 0]],
  ['control 2', [[[15, 10], [12, 61], [14.5, 60], [None, 60]], 30, 15, 1], ['stow', 'wind', 15]]]]
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: reading exactly max_age old['track', 'ok', 10]['track', 'ok', 10]Passed
boundary: calm zero reading['track', 'ok', 0]['track', 'ok', 0]Passed
boundary: wind at stow limit['stow', 'wind', 15]['stow', 'wind', 15]Passed
regression: missing value filter['track', 'ok', 15]['track', 'ok', 15]Passed
regression: missing value filter (partial repair)['track', 'ok', 16.5]['stow', 'sensor', None]Failed
control 1['stow', 'wind', 22]['stow', 'wind', 22]Passed
control 2['track', 'ok', 8]['track', 'ok', 8]Passed

SHA-256 / 61d6f41e94384619d7e92bd629ee12318fd5f686c39638f2a1c809dfd99e6666

3 / The verified repair

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

N = 1
observations = []
def solve(readings, max_age, stow_at, n_required):
    valid = [v for v, age in readings if v is not None and age <= max_age]
    if len(valid) < n_required:
        return ['stow', 'sensor', None]
    peak = max(valid)
    if peak >= stow_at:
        return ['stow', 'wind', peak]
    return ['track', 'ok', peak]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['boundary: reading exactly max_age old', [[[10, 60]], 60, 15, 1], ['track', 'ok', 10]],
  ['boundary: calm zero reading', [[[0, 5], [None, 5]], 60, 15, 1], ['track', 'ok', 0]],
  ['boundary: wind at stow limit', [[[15, 5], [4, 5]], 60, 15, 2], ['stow', 'wind', 15]],
  ['regression: missing value filter', [[[15, 10], [0, 30]], 30, 18, 2], ['track', 'ok', 15]],
  ['regression: missing value filter (partial repair)',
   [[[None, 5], [12, 61], [16.5, 30]], 60, 18, 2], ['stow', 'sensor', None]],
  ['control 1', [[[14.5, 5], [8, 5], [22, 60]], 60, 15, 2], ['stow', 'wind', 22]],
  ['control 2', [[[8, 60], [8, 120]], 60, 18, 1], ['track', 'ok', 8]]],
 [['boundary: reading exactly max_age old', [[[10, 60]], 60, 15, 1], ['track', 'ok', 10]],
  ['boundary: calm zero reading', [[[0, 5], [None, 5]], 60, 15, 1], ['track', 'ok', 0]],
  ['boundary: wind at stow limit', [[[15, 5], [4, 5]], 60, 15, 2], ['stow', 'wind', 15]],
  ['regression: missing value filter', [[[22, 120], [0, 30], [14.5, 0]], 30, 15, 2],
   ['track', 'ok', 14.5]],
  ['regression: missing value filter (partial repair)',
   [[[None, 0], [None, 120], [14.5, 0]], 30, 18, 2], ['stow', 'sensor', None]],
  ['control 1', [[[8, 60], [0, 10], [14.5, 10]], 60, 18, 1], ['track', 'ok', 14.5]],
  ['control 2', [[[3.5, 61], [22, 61], [22, 10], [16.5, 30]], 60, 18, 1], ['stow', 'wind', 22]]],
 [['boundary: reading exactly max_age old', [[[10, 60]], 60, 15, 1], ['track', 'ok', 10]],
  ['boundary: calm zero reading', [[[0, 5], [None, 5]], 60, 15, 1], ['track', 'ok', 0]],
  ['boundary: wind at stow limit', [[[15, 5], [4, 5]], 60, 15, 2], ['stow', 'wind', 15]],
  ['regression: missing value filter', [[[0, 5]], 60, 15, 1], ['track', 'ok', 0]],
  ['regression: missing value filter (partial repair)',
   [[[None, 0], [None, 120], [14.5, 0]], 30, 18, 2], ['stow', 'sensor', None]],
  ['control 1', [[[22, 61], [22, 120]], 30, 18, 2], ['stow', 'sensor', None]],
  ['control 2', [[[3.5, 30], [15, 0], [None, 61], [None, 30]], 60, 18, 2], ['track', 'ok', 15]]],
 [['boundary: reading exactly max_age old', [[[10, 60]], 60, 15, 1], ['track', 'ok', 10]],
  ['boundary: calm zero reading', [[[0, 5], [None, 5]], 60, 15, 1], ['track', 'ok', 0]],
  ['boundary: wind at stow limit', [[[15, 5], [4, 5]], 60, 15, 2], ['stow', 'wind', 15]],
  ['regression: missing value filter', [[[3.5, 61], [0, 5], [0, 60], [14.5, 120]], 60, 18, 1],
   ['track', 'ok', 0]],
  ['regression: missing value filter (partial repair)',
   [[[None, 61], [3.5, 0], [None, 5]], 60, 18, 2], ['stow', 'sensor', None]],
  ['control 1', [[[3.5, 5], [22, 30]], 30, 18, 2], ['stow', 'wind', 22]],
  ['control 2', [[[22, 0], [3.5, 60], [12, 30], [14.5, 5]], 30, 15, 1], ['stow', 'wind', 22]]],
 [['boundary: reading exactly max_age old', [[[10, 60]], 60, 15, 1], ['track', 'ok', 10]],
  ['boundary: calm zero reading', [[[0, 5], [None, 5]], 60, 15, 1], ['track', 'ok', 0]],
  ['boundary: wind at stow limit', [[[15, 5], [4, 5]], 60, 15, 2], ['stow', 'wind', 15]],
  ['regression: missing value filter', [[[22, 60], [0, 30]], 30, 15, 1], ['track', 'ok', 0]],
  ['regression: missing value filter (partial repair)', [[[None, 10], [15, 0]], 30, 15, 2],
   ['stow', 'sensor', None]],
  ['control 1', [[[3.5, 61], [0, 5], [0, 60], [14.5, 120]], 60, 18, 1], ['track', 'ok', 0]],
  ['control 2', [[[15, 10], [12, 61], [14.5, 60], [None, 60]], 30, 15, 1], ['stow', 'wind', 15]]]]
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: reading exactly max_age old['track', 'ok', 10]['track', 'ok', 10]Passed
boundary: calm zero reading['track', 'ok', 0]['track', 'ok', 0]Passed
boundary: wind at stow limit['stow', 'wind', 15]['stow', 'wind', 15]Passed
regression: missing value filter['track', 'ok', 15]['track', 'ok', 15]Passed
regression: missing value filter (partial repair)['stow', 'sensor', None]['stow', 'sensor', None]Passed
control 1['stow', 'wind', 22]['stow', 'wind', 22]Passed
control 2['track', 'ok', 8]['track', 'ok', 8]Passed

SHA-256 / 9fd80e32e18609e8b93b747d7908d007f35e480267fbbfe02c84d7b2087dca04

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:57.678892+00:00.

Case digest / d82a118539fda261f7ed1cfdc61e63c411481bd23c01584e8f58866242bba1ae