FAILURE MAP
← Case archive

FA-93471 / Solar tracker geometry / Open access

Wind stow with gust and mean triggers: calm count reset · case 01

Rows return to tracking during a gusty period after scattered calm samples.

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

ROOT CAUSE

A windy sample does not reset the consecutive-calm counter.

VERIFIED REPAIR

Reset the calm count whenever avg >= release.

Unsuccessful approach: Resetting only on gusts still lets moderate windy samples through.

Case contract

winds are per-sample speeds. avg is the mean of the last win samples (fewer at the start). Tracking rows enter stow when the sample >= gust_limit or avg >= mean_limit (one entry each time). Stowed rows return to tracking after hold consecutive samples with avg < release; any sample with avg >= release resets the count. Return [modes per sample, stow entries].

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(winds, gust_limit, mean_limit, release, win, hold):
    mode = 'track'
    calm = 0
    entries = 0
    out = []
    for i, w in enumerate(winds):
        recent = winds[max(0, i - win + 1):i + 1]
        avg = sum(recent) / len(recent)
        if mode == 'track':
            if w >= gust_limit or avg >= mean_limit:
                mode = 'stow'
                entries += 1
                calm = 0
        else:
            if avg < release:
                calm += 1
                if calm >= hold:
                    mode = 'track'
                    calm = 0
        out.append(mode)
    return [out, entries]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['boundary: gust exactly at limit', [[5, 20, 5, 5, 5], 20, 30, 10, 1, 1],
   [['track', 'stow', 'track', 'track', 'track'], 1]],
  ['normal: sustained mean wind', [[14, 15, 16, 15, 4, 4, 4], 25, 15, 10, 3, 2],
   [['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['boundary: calm interrupted before hold', [[25, 5, 12, 5, 5, 5], 20, 30, 10, 1, 2],
   [['stow', 'stow', 'stow', 'stow', 'track', 'track'], 1]],
  ['regression: calm count reset', [[14, 10, 8, 12, 18, 8, 6, 10, 14], 18, 14, 10, 1, 3],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]],
  ['regression: calm count reset (partial repair)', [[6, 6, 6, 18, 4, 0, 10, 8], 18, 15, 8, 4, 2],
   [['track', 'track', 'track', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]],
  ['control 1', [[29, 15, 15, 15, 13, 19, 11, 11, 11, 13, 15, 15, 25], 20, 15, 10, 3, 2],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow',
     'stow'],
    1]],
  ['control 2', [[16, 12, 8, 14, 22, 12, 16], 22, 14, 10, 2, 3],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]]],
 [['boundary: gust exactly at limit', [[5, 20, 5, 5, 5], 20, 30, 10, 1, 1],
   [['track', 'stow', 'track', 'track', 'track'], 1]],
  ['normal: sustained mean wind', [[14, 15, 16, 15, 4, 4, 4], 25, 15, 10, 3, 2],
   [['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['boundary: calm interrupted before hold', [[25, 5, 12, 5, 5, 5], 20, 30, 10, 1, 2],
   [['stow', 'stow', 'stow', 'stow', 'track', 'track'], 1]],
  ['regression: calm count reset', [[14, 6, 2, 14, 10, 4, 10, 14, 18, 4], 20, 14, 10, 1, 2],
   [['stow', 'stow', 'track', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 2]],
  ['regression: calm count reset (partial repair)',
   [[18, 14, 18, 6, 10, 10, 12, 10, 4, 4], 22, 12, 10, 2, 2],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['control 1', [[12, 18, 12, 26, 14, 12, 22, 10, 12, 22, 18], 18, 15, 10, 2, 2],
   [['track', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]],
  ['control 2', [[0, 2, 18, 14, 10, 2, 6, 18, 8], 18, 15, 10, 2, 1],
   [['track', 'track', 'stow', 'stow', 'stow', 'track', 'track', 'stow', 'stow'], 2]]],
 [['boundary: gust exactly at limit', [[5, 20, 5, 5, 5], 20, 30, 10, 1, 1],
   [['track', 'stow', 'track', 'track', 'track'], 1]],
  ['normal: sustained mean wind', [[14, 15, 16, 15, 4, 4, 4], 25, 15, 10, 3, 2],
   [['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['boundary: calm interrupted before hold', [[25, 5, 12, 5, 5, 5], 20, 30, 10, 1, 2],
   [['stow', 'stow', 'stow', 'stow', 'track', 'track'], 1]],
  ['regression: calm count reset', [[6, 10, 14, 18, 2, 8, 18, 2, 8, 10, 10, 2, 2], 18, 14, 8, 3, 3],
   [['track', 'track', 'track', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow',
     'stow', 'stow'],
    1]],
  ['regression: calm count reset (partial repair)',
   [[2, 18, 2, 10, 18, 4, 10, 18, 8, 4, 4, 18], 20, 14, 10, 1, 3],
   [['track', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'track',
     'stow'],
    2]],
  ['control 1', [[12, 16, 26, 18, 16, 10, 22, 26, 12, 14, 22, 22, 10, 14], 22, 12, 10, 2, 1],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow',
     'stow', 'stow'],
    1]],
  ['control 2', [[14, 12, 6, 8, 4, 6, 4, 8, 12, 6, 22, 8, 18, 22], 20, 15, 8, 3, 1],
   [['track', 'track', 'track', 'track', 'track', 'track', 'track', 'track', 'track', 'track',
     'stow', 'stow', 'stow', 'stow'],
    1]]],
 [['boundary: gust exactly at limit', [[5, 20, 5, 5, 5], 20, 30, 10, 1, 1],
   [['track', 'stow', 'track', 'track', 'track'], 1]],
  ['normal: sustained mean wind', [[14, 15, 16, 15, 4, 4, 4], 25, 15, 10, 3, 2],
   [['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['boundary: calm interrupted before hold', [[25, 5, 12, 5, 5, 5], 20, 30, 10, 1, 2],
   [['stow', 'stow', 'stow', 'stow', 'track', 'track'], 1]],
  ['regression: calm count reset', [[18, 14, 0, 18, 4, 0, 4], 22, 14, 8, 1, 3],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['regression: calm count reset (partial repair)',
   [[14, 0, 18, 18, 18, 8, 14, 2, 0, 18], 20, 12, 8, 1, 3],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]],
  ['control 1', [[22, 10, 18, 8, 16, 10, 22, 16, 10, 18], 22, 15, 10, 4, 3],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]],
  ['control 2', [[4, 2, 0, 14, 6, 4, 18, 4, 18, 6, 4], 20, 14, 10, 4, 1],
   [['track', 'track', 'track', 'track', 'track', 'track', 'track', 'track', 'track', 'track',
     'track'],
    0]]],
 [['boundary: gust exactly at limit', [[5, 20, 5, 5, 5], 20, 30, 10, 1, 1],
   [['track', 'stow', 'track', 'track', 'track'], 1]],
  ['normal: sustained mean wind', [[14, 15, 16, 15, 4, 4, 4], 25, 15, 10, 3, 2],
   [['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['boundary: calm interrupted before hold', [[25, 5, 12, 5, 5, 5], 20, 30, 10, 1, 2],
   [['stow', 'stow', 'stow', 'stow', 'track', 'track'], 1]],
  ['regression: calm count reset', [[6, 8, 8, 22, 8, 12, 4, 10, 6, 6, 12], 18, 12, 10, 1, 3],
   [['track', 'track', 'track', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'],
    1]],
  ['regression: calm count reset (partial repair)', [[6, 6, 6, 18, 4, 0, 10, 8], 18, 15, 8, 4, 2],
   [['track', 'track', 'track', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]],
  ['control 1', [[12, 4, 10, 4, 18, 4, 4, 6, 8, 10], 18, 14, 8, 1, 3],
   [['track', 'track', 'track', 'track', 'stow', 'stow', 'stow', 'track', 'track', 'track'], 1]],
  ['control 2', [[14, 8, 22, 4, 22, 10, 6, 14, 10, 8, 6], 20, 12, 10, 4, 3],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]]]]
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: gust exactly at limit[['track', 'stow', 'track', 'track', 'track'], 1][['track', 'stow', 'track', 'track', 'track'], 1]Passed
normal: sustained mean wind[['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1][['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1]Passed
boundary: calm interrupted before hold[['stow', 'stow', 'stow', 'track', 'track', 'track'], 1][['stow', 'stow', 'stow', 'stow', 'track', 'track'], 1]Failed
regression: calm count reset[['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'track', 'track', 'stow'], 2][['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]Failed
regression: calm count reset (partial repair)[['track', 'track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1][['track', 'track', 'track', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]Failed
control 1[['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1][['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]Passed
control 2[['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1][['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]Passed

SHA-256 / 2794c39e0d4b492562e66977551920c351023628b40b57e4d64165d3150f75a2

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(winds, gust_limit, mean_limit, release, win, hold):
    mode = 'track'
    calm = 0
    entries = 0
    out = []
    for i, w in enumerate(winds):
        recent = winds[max(0, i - win + 1):i + 1]
        avg = sum(recent) / len(recent)
        if mode == 'track':
            if w >= gust_limit or avg >= mean_limit:
                mode = 'stow'
                entries += 1
                calm = 0
        else:
            if avg < release:
                calm += 1
                if calm >= hold:
                    mode = 'track'
                    calm = 0
            elif w >= gust_limit:
                calm = 0
        out.append(mode)
    return [out, entries]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['boundary: gust exactly at limit', [[5, 20, 5, 5, 5], 20, 30, 10, 1, 1],
   [['track', 'stow', 'track', 'track', 'track'], 1]],
  ['normal: sustained mean wind', [[14, 15, 16, 15, 4, 4, 4], 25, 15, 10, 3, 2],
   [['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['boundary: calm interrupted before hold', [[25, 5, 12, 5, 5, 5], 20, 30, 10, 1, 2],
   [['stow', 'stow', 'stow', 'stow', 'track', 'track'], 1]],
  ['regression: calm count reset', [[14, 10, 8, 12, 18, 8, 6, 10, 14], 18, 14, 10, 1, 3],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]],
  ['regression: calm count reset (partial repair)', [[6, 6, 6, 18, 4, 0, 10, 8], 18, 15, 8, 4, 2],
   [['track', 'track', 'track', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]],
  ['control 1', [[29, 15, 15, 15, 13, 19, 11, 11, 11, 13, 15, 15, 25], 20, 15, 10, 3, 2],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow',
     'stow'],
    1]],
  ['control 2', [[16, 12, 8, 14, 22, 12, 16], 22, 14, 10, 2, 3],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]]],
 [['boundary: gust exactly at limit', [[5, 20, 5, 5, 5], 20, 30, 10, 1, 1],
   [['track', 'stow', 'track', 'track', 'track'], 1]],
  ['normal: sustained mean wind', [[14, 15, 16, 15, 4, 4, 4], 25, 15, 10, 3, 2],
   [['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['boundary: calm interrupted before hold', [[25, 5, 12, 5, 5, 5], 20, 30, 10, 1, 2],
   [['stow', 'stow', 'stow', 'stow', 'track', 'track'], 1]],
  ['regression: calm count reset', [[14, 6, 2, 14, 10, 4, 10, 14, 18, 4], 20, 14, 10, 1, 2],
   [['stow', 'stow', 'track', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 2]],
  ['regression: calm count reset (partial repair)',
   [[18, 14, 18, 6, 10, 10, 12, 10, 4, 4], 22, 12, 10, 2, 2],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['control 1', [[12, 18, 12, 26, 14, 12, 22, 10, 12, 22, 18], 18, 15, 10, 2, 2],
   [['track', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]],
  ['control 2', [[0, 2, 18, 14, 10, 2, 6, 18, 8], 18, 15, 10, 2, 1],
   [['track', 'track', 'stow', 'stow', 'stow', 'track', 'track', 'stow', 'stow'], 2]]],
 [['boundary: gust exactly at limit', [[5, 20, 5, 5, 5], 20, 30, 10, 1, 1],
   [['track', 'stow', 'track', 'track', 'track'], 1]],
  ['normal: sustained mean wind', [[14, 15, 16, 15, 4, 4, 4], 25, 15, 10, 3, 2],
   [['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['boundary: calm interrupted before hold', [[25, 5, 12, 5, 5, 5], 20, 30, 10, 1, 2],
   [['stow', 'stow', 'stow', 'stow', 'track', 'track'], 1]],
  ['regression: calm count reset', [[6, 10, 14, 18, 2, 8, 18, 2, 8, 10, 10, 2, 2], 18, 14, 8, 3, 3],
   [['track', 'track', 'track', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow',
     'stow', 'stow'],
    1]],
  ['regression: calm count reset (partial repair)',
   [[2, 18, 2, 10, 18, 4, 10, 18, 8, 4, 4, 18], 20, 14, 10, 1, 3],
   [['track', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'track',
     'stow'],
    2]],
  ['control 1', [[12, 16, 26, 18, 16, 10, 22, 26, 12, 14, 22, 22, 10, 14], 22, 12, 10, 2, 1],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow',
     'stow', 'stow'],
    1]],
  ['control 2', [[14, 12, 6, 8, 4, 6, 4, 8, 12, 6, 22, 8, 18, 22], 20, 15, 8, 3, 1],
   [['track', 'track', 'track', 'track', 'track', 'track', 'track', 'track', 'track', 'track',
     'stow', 'stow', 'stow', 'stow'],
    1]]],
 [['boundary: gust exactly at limit', [[5, 20, 5, 5, 5], 20, 30, 10, 1, 1],
   [['track', 'stow', 'track', 'track', 'track'], 1]],
  ['normal: sustained mean wind', [[14, 15, 16, 15, 4, 4, 4], 25, 15, 10, 3, 2],
   [['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['boundary: calm interrupted before hold', [[25, 5, 12, 5, 5, 5], 20, 30, 10, 1, 2],
   [['stow', 'stow', 'stow', 'stow', 'track', 'track'], 1]],
  ['regression: calm count reset', [[18, 14, 0, 18, 4, 0, 4], 22, 14, 8, 1, 3],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['regression: calm count reset (partial repair)',
   [[14, 0, 18, 18, 18, 8, 14, 2, 0, 18], 20, 12, 8, 1, 3],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]],
  ['control 1', [[22, 10, 18, 8, 16, 10, 22, 16, 10, 18], 22, 15, 10, 4, 3],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]],
  ['control 2', [[4, 2, 0, 14, 6, 4, 18, 4, 18, 6, 4], 20, 14, 10, 4, 1],
   [['track', 'track', 'track', 'track', 'track', 'track', 'track', 'track', 'track', 'track',
     'track'],
    0]]],
 [['boundary: gust exactly at limit', [[5, 20, 5, 5, 5], 20, 30, 10, 1, 1],
   [['track', 'stow', 'track', 'track', 'track'], 1]],
  ['normal: sustained mean wind', [[14, 15, 16, 15, 4, 4, 4], 25, 15, 10, 3, 2],
   [['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['boundary: calm interrupted before hold', [[25, 5, 12, 5, 5, 5], 20, 30, 10, 1, 2],
   [['stow', 'stow', 'stow', 'stow', 'track', 'track'], 1]],
  ['regression: calm count reset', [[6, 8, 8, 22, 8, 12, 4, 10, 6, 6, 12], 18, 12, 10, 1, 3],
   [['track', 'track', 'track', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'],
    1]],
  ['regression: calm count reset (partial repair)', [[6, 6, 6, 18, 4, 0, 10, 8], 18, 15, 8, 4, 2],
   [['track', 'track', 'track', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]],
  ['control 1', [[12, 4, 10, 4, 18, 4, 4, 6, 8, 10], 18, 14, 8, 1, 3],
   [['track', 'track', 'track', 'track', 'stow', 'stow', 'stow', 'track', 'track', 'track'], 1]],
  ['control 2', [[14, 8, 22, 4, 22, 10, 6, 14, 10, 8, 6], 20, 12, 10, 4, 3],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]]]]
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: gust exactly at limit[['track', 'stow', 'track', 'track', 'track'], 1][['track', 'stow', 'track', 'track', 'track'], 1]Passed
normal: sustained mean wind[['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1][['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1]Passed
boundary: calm interrupted before hold[['stow', 'stow', 'stow', 'track', 'track', 'track'], 1][['stow', 'stow', 'stow', 'stow', 'track', 'track'], 1]Failed
regression: calm count reset[['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1][['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]Passed
regression: calm count reset (partial repair)[['track', 'track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1][['track', 'track', 'track', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]Failed
control 1[['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1][['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]Passed
control 2[['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1][['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]Passed

SHA-256 / 45758cfb6b9fa8df9c5919470da1338d3df90cb4b43d263870b0b7ba2a4fbd57

3 / The verified repair

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

N = 1
observations = []
def solve(winds, gust_limit, mean_limit, release, win, hold):
    mode = 'track'
    calm = 0
    entries = 0
    out = []
    for i, w in enumerate(winds):
        recent = winds[max(0, i - win + 1):i + 1]
        avg = sum(recent) / len(recent)
        if mode == 'track':
            if w >= gust_limit or avg >= mean_limit:
                mode = 'stow'
                entries += 1
                calm = 0
        else:
            if avg < release:
                calm += 1
                if calm >= hold:
                    mode = 'track'
                    calm = 0
            else:
                calm = 0
        out.append(mode)
    return [out, entries]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['boundary: gust exactly at limit', [[5, 20, 5, 5, 5], 20, 30, 10, 1, 1],
   [['track', 'stow', 'track', 'track', 'track'], 1]],
  ['normal: sustained mean wind', [[14, 15, 16, 15, 4, 4, 4], 25, 15, 10, 3, 2],
   [['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['boundary: calm interrupted before hold', [[25, 5, 12, 5, 5, 5], 20, 30, 10, 1, 2],
   [['stow', 'stow', 'stow', 'stow', 'track', 'track'], 1]],
  ['regression: calm count reset', [[14, 10, 8, 12, 18, 8, 6, 10, 14], 18, 14, 10, 1, 3],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]],
  ['regression: calm count reset (partial repair)', [[6, 6, 6, 18, 4, 0, 10, 8], 18, 15, 8, 4, 2],
   [['track', 'track', 'track', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]],
  ['control 1', [[29, 15, 15, 15, 13, 19, 11, 11, 11, 13, 15, 15, 25], 20, 15, 10, 3, 2],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow',
     'stow'],
    1]],
  ['control 2', [[16, 12, 8, 14, 22, 12, 16], 22, 14, 10, 2, 3],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]]],
 [['boundary: gust exactly at limit', [[5, 20, 5, 5, 5], 20, 30, 10, 1, 1],
   [['track', 'stow', 'track', 'track', 'track'], 1]],
  ['normal: sustained mean wind', [[14, 15, 16, 15, 4, 4, 4], 25, 15, 10, 3, 2],
   [['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['boundary: calm interrupted before hold', [[25, 5, 12, 5, 5, 5], 20, 30, 10, 1, 2],
   [['stow', 'stow', 'stow', 'stow', 'track', 'track'], 1]],
  ['regression: calm count reset', [[14, 6, 2, 14, 10, 4, 10, 14, 18, 4], 20, 14, 10, 1, 2],
   [['stow', 'stow', 'track', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 2]],
  ['regression: calm count reset (partial repair)',
   [[18, 14, 18, 6, 10, 10, 12, 10, 4, 4], 22, 12, 10, 2, 2],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['control 1', [[12, 18, 12, 26, 14, 12, 22, 10, 12, 22, 18], 18, 15, 10, 2, 2],
   [['track', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]],
  ['control 2', [[0, 2, 18, 14, 10, 2, 6, 18, 8], 18, 15, 10, 2, 1],
   [['track', 'track', 'stow', 'stow', 'stow', 'track', 'track', 'stow', 'stow'], 2]]],
 [['boundary: gust exactly at limit', [[5, 20, 5, 5, 5], 20, 30, 10, 1, 1],
   [['track', 'stow', 'track', 'track', 'track'], 1]],
  ['normal: sustained mean wind', [[14, 15, 16, 15, 4, 4, 4], 25, 15, 10, 3, 2],
   [['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['boundary: calm interrupted before hold', [[25, 5, 12, 5, 5, 5], 20, 30, 10, 1, 2],
   [['stow', 'stow', 'stow', 'stow', 'track', 'track'], 1]],
  ['regression: calm count reset', [[6, 10, 14, 18, 2, 8, 18, 2, 8, 10, 10, 2, 2], 18, 14, 8, 3, 3],
   [['track', 'track', 'track', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow',
     'stow', 'stow'],
    1]],
  ['regression: calm count reset (partial repair)',
   [[2, 18, 2, 10, 18, 4, 10, 18, 8, 4, 4, 18], 20, 14, 10, 1, 3],
   [['track', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'track',
     'stow'],
    2]],
  ['control 1', [[12, 16, 26, 18, 16, 10, 22, 26, 12, 14, 22, 22, 10, 14], 22, 12, 10, 2, 1],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow',
     'stow', 'stow'],
    1]],
  ['control 2', [[14, 12, 6, 8, 4, 6, 4, 8, 12, 6, 22, 8, 18, 22], 20, 15, 8, 3, 1],
   [['track', 'track', 'track', 'track', 'track', 'track', 'track', 'track', 'track', 'track',
     'stow', 'stow', 'stow', 'stow'],
    1]]],
 [['boundary: gust exactly at limit', [[5, 20, 5, 5, 5], 20, 30, 10, 1, 1],
   [['track', 'stow', 'track', 'track', 'track'], 1]],
  ['normal: sustained mean wind', [[14, 15, 16, 15, 4, 4, 4], 25, 15, 10, 3, 2],
   [['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['boundary: calm interrupted before hold', [[25, 5, 12, 5, 5, 5], 20, 30, 10, 1, 2],
   [['stow', 'stow', 'stow', 'stow', 'track', 'track'], 1]],
  ['regression: calm count reset', [[18, 14, 0, 18, 4, 0, 4], 22, 14, 8, 1, 3],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['regression: calm count reset (partial repair)',
   [[14, 0, 18, 18, 18, 8, 14, 2, 0, 18], 20, 12, 8, 1, 3],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]],
  ['control 1', [[22, 10, 18, 8, 16, 10, 22, 16, 10, 18], 22, 15, 10, 4, 3],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]],
  ['control 2', [[4, 2, 0, 14, 6, 4, 18, 4, 18, 6, 4], 20, 14, 10, 4, 1],
   [['track', 'track', 'track', 'track', 'track', 'track', 'track', 'track', 'track', 'track',
     'track'],
    0]]],
 [['boundary: gust exactly at limit', [[5, 20, 5, 5, 5], 20, 30, 10, 1, 1],
   [['track', 'stow', 'track', 'track', 'track'], 1]],
  ['normal: sustained mean wind', [[14, 15, 16, 15, 4, 4, 4], 25, 15, 10, 3, 2],
   [['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1]],
  ['boundary: calm interrupted before hold', [[25, 5, 12, 5, 5, 5], 20, 30, 10, 1, 2],
   [['stow', 'stow', 'stow', 'stow', 'track', 'track'], 1]],
  ['regression: calm count reset', [[6, 8, 8, 22, 8, 12, 4, 10, 6, 6, 12], 18, 12, 10, 1, 3],
   [['track', 'track', 'track', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'],
    1]],
  ['regression: calm count reset (partial repair)', [[6, 6, 6, 18, 4, 0, 10, 8], 18, 15, 8, 4, 2],
   [['track', 'track', 'track', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]],
  ['control 1', [[12, 4, 10, 4, 18, 4, 4, 6, 8, 10], 18, 14, 8, 1, 3],
   [['track', 'track', 'track', 'track', 'stow', 'stow', 'stow', 'track', 'track', 'track'], 1]],
  ['control 2', [[14, 8, 22, 4, 22, 10, 6, 14, 10, 8, 6], 20, 12, 10, 4, 3],
   [['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]]]]
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: gust exactly at limit[['track', 'stow', 'track', 'track', 'track'], 1][['track', 'stow', 'track', 'track', 'track'], 1]Passed
normal: sustained mean wind[['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1][['track', 'track', 'stow', 'stow', 'stow', 'stow', 'track'], 1]Passed
boundary: calm interrupted before hold[['stow', 'stow', 'stow', 'stow', 'track', 'track'], 1][['stow', 'stow', 'stow', 'stow', 'track', 'track'], 1]Passed
regression: calm count reset[['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1][['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]Passed
regression: calm count reset (partial repair)[['track', 'track', 'track', 'stow', 'stow', 'stow', 'stow', 'stow'], 1][['track', 'track', 'track', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]Passed
control 1[['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1][['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]Passed
control 2[['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1][['stow', 'stow', 'stow', 'stow', 'stow', 'stow', 'stow'], 1]Passed

SHA-256 / 93988d57e621625d7c3ff7e5638bbcfbd2b85d01c11b6c5d55deda24c4753c22

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

Case digest / 90406a60093411d4eac35877c05b9b0d3ff703d08305fa2dfd2b41f737e58953