FAILURE MAP
← Case archive

FA-93641 / Solar tracker geometry / Open access

Precomputed tracker angle table: duplicate minute precedence · case 01

A corrected table entry appended later is ignored.

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

ROOT CAUSE

The first entry for a minute is kept instead of the last.

THE FAILURE

The first entry for a minute is kept instead of the last.

Unsuccessful approach: Keeping the larger angle is not the last-entry rule.

Case contract

table lists [minute, angle] entries in any order; for duplicate minutes the last listed entry wins. Outside [first, last] minute the tracker is flat (0.0). Inside, the angle is linearly interpolated between neighbouring entries and rounded to 2. Return the angle.

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(table, t):
    pts = {}
    for m, a in table:
        if m not in pts:
            pts[m] = a
    keys = sorted(pts)
    if not keys or t < keys[0] or t > keys[-1]:
        return 0.0
    for m0, m1 in zip(keys, keys[1:]):
        if m0 <= t <= m1:
            a0, a1 = pts[m0], pts[m1]
            return round(a0 + (a1 - a0) * (t - m0) / (m1 - m0), 2)
    return round(float(pts[keys[0]]), 2)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['boundary: at last entry', [[[360, -60], [720, 0], [1080, 60]], 1080], 60.0],
  ['normal: midway', [[[360, -60], [720, 0], [1080, 60]], 540], -30.0],
  ['boundary: before first entry', [[[360, -60], [720, 0]], 300], 0.0],
  ['regression: duplicate minute precedence', [[[420, 60], [600, -30], [900, -30], [600, 30]], 525],
   42.5],
  ['regression: duplicate minute precedence (partial repair)',
   [[[1020, -30], [540, 15], [540, -15]], 825], -23.91],
  ['control 1', [[[840, 45], [1140, -60]], 300], 0.0],
  ['control 2', [[[540, -60], [600, 60], [480, 45]], 870], 0.0]],
 [['boundary: at last entry', [[[360, -60], [720, 0], [1080, 60]], 1080], 60.0],
  ['normal: midway', [[[360, -60], [720, 0], [1080, 60]], 540], -30.0],
  ['boundary: before first entry', [[[360, -60], [720, 0]], 300], 0.0],
  ['regression: duplicate minute precedence', [[[420, -45], [420, -30], [900, -60]], 765], -51.56],
  ['regression: duplicate minute precedence (partial repair)',
   [[[1140, -60], [360, -30], [900, 30], [900, 15], [480, 0]], 855], 13.39],
  ['control 1', [[[540, 30], [1020, 45]], 945], 42.66],
  ['control 2', [[[660, 0], [360, 30], [780, 0], [1080, 60], [960, -30]], 480], 18.0]],
 [['boundary: at last entry', [[[360, -60], [720, 0], [1080, 60]], 1080], 60.0],
  ['normal: midway', [[[360, -60], [720, 0], [1080, 60]], 540], -30.0],
  ['boundary: before first entry', [[[360, -60], [720, 0]], 300], 0.0],
  ['regression: duplicate minute precedence',
   [[[1020, -60], [660, -30], [600, -45], [480, 45], [600, -15]], 525], 22.5],
  ['regression: duplicate minute precedence (partial repair)',
   [[[720, 45], [1140, -45], [360, 45], [1140, -60], [360, 15]], 945], -11.25],
  ['control 1', [[[1080, -45], [540, 45]], 1110], 0.0],
  ['control 2', [[[600, 45], [1020, 45]], 585], 0.0]],
 [['boundary: at last entry', [[[360, -60], [720, 0], [1080, 60]], 1080], 60.0],
  ['normal: midway', [[[360, -60], [720, 0], [1080, 60]], 540], -30.0],
  ['boundary: before first entry', [[[360, -60], [720, 0]], 300], 0.0],
  ['regression: duplicate minute precedence',
   [[[780, -30], [600, 60], [900, -15], [600, 0], [480, 45], [960, -15]], 750], -25.0],
  ['regression: duplicate minute precedence (partial repair)',
   [[[720, -60], [540, -45], [540, -60], [960, -45], [360, -45]], 525], -58.75],
  ['control 1', [[[600, -15], [1080, 30], [1080, 0]], 420], 0.0],
  ['control 2', [[[1140, 0], [480, -15]], 1110], -0.68]],
 [['boundary: at last entry', [[[360, -60], [720, 0], [1080, 60]], 1080], 60.0],
  ['normal: midway', [[[360, -60], [720, 0], [1080, 60]], 540], -30.0],
  ['boundary: before first entry', [[[360, -60], [720, 0]], 300], 0.0],
  ['regression: duplicate minute precedence',
   [[[900, -45], [720, -45], [960, -15], [900, 60], [420, 30]], 765], -18.75],
  ['regression: duplicate minute precedence (partial repair)',
   [[[600, 0], [420, 15], [720, -15], [420, -60]], 585], -5.0],
  ['control 1', [[[1080, 0]], 345], 0.0], ['control 2', [[[1080, 45]], 600], 0.0]]]
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: at last entry60.060.0Passed
normal: midway-30.0-30.0Passed
boundary: before first entry0.00.0Passed
regression: duplicate minute precedence7.542.5Failed
regression: duplicate minute precedence (partial repair)-11.72-23.91Failed
control 10.00.0Passed
control 20.00.0Passed

SHA-256 / efce8cd91c350c5ea071c47cf99d0cca08809342522f58827c2ce64d3ed4986f

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(table, t):
    pts = {}
    for m, a in table:
        pts[m] = max(a, pts.get(m, a))
    keys = sorted(pts)
    if not keys or t < keys[0] or t > keys[-1]:
        return 0.0
    for m0, m1 in zip(keys, keys[1:]):
        if m0 <= t <= m1:
            a0, a1 = pts[m0], pts[m1]
            return round(a0 + (a1 - a0) * (t - m0) / (m1 - m0), 2)
    return round(float(pts[keys[0]]), 2)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['boundary: at last entry', [[[360, -60], [720, 0], [1080, 60]], 1080], 60.0],
  ['normal: midway', [[[360, -60], [720, 0], [1080, 60]], 540], -30.0],
  ['boundary: before first entry', [[[360, -60], [720, 0]], 300], 0.0],
  ['regression: duplicate minute precedence', [[[420, 60], [600, -30], [900, -30], [600, 30]], 525],
   42.5],
  ['regression: duplicate minute precedence (partial repair)',
   [[[1020, -30], [540, 15], [540, -15]], 825], -23.91],
  ['control 1', [[[840, 45], [1140, -60]], 300], 0.0],
  ['control 2', [[[540, -60], [600, 60], [480, 45]], 870], 0.0]],
 [['boundary: at last entry', [[[360, -60], [720, 0], [1080, 60]], 1080], 60.0],
  ['normal: midway', [[[360, -60], [720, 0], [1080, 60]], 540], -30.0],
  ['boundary: before first entry', [[[360, -60], [720, 0]], 300], 0.0],
  ['regression: duplicate minute precedence', [[[420, -45], [420, -30], [900, -60]], 765], -51.56],
  ['regression: duplicate minute precedence (partial repair)',
   [[[1140, -60], [360, -30], [900, 30], [900, 15], [480, 0]], 855], 13.39],
  ['control 1', [[[540, 30], [1020, 45]], 945], 42.66],
  ['control 2', [[[660, 0], [360, 30], [780, 0], [1080, 60], [960, -30]], 480], 18.0]],
 [['boundary: at last entry', [[[360, -60], [720, 0], [1080, 60]], 1080], 60.0],
  ['normal: midway', [[[360, -60], [720, 0], [1080, 60]], 540], -30.0],
  ['boundary: before first entry', [[[360, -60], [720, 0]], 300], 0.0],
  ['regression: duplicate minute precedence',
   [[[1020, -60], [660, -30], [600, -45], [480, 45], [600, -15]], 525], 22.5],
  ['regression: duplicate minute precedence (partial repair)',
   [[[720, 45], [1140, -45], [360, 45], [1140, -60], [360, 15]], 945], -11.25],
  ['control 1', [[[1080, -45], [540, 45]], 1110], 0.0],
  ['control 2', [[[600, 45], [1020, 45]], 585], 0.0]],
 [['boundary: at last entry', [[[360, -60], [720, 0], [1080, 60]], 1080], 60.0],
  ['normal: midway', [[[360, -60], [720, 0], [1080, 60]], 540], -30.0],
  ['boundary: before first entry', [[[360, -60], [720, 0]], 300], 0.0],
  ['regression: duplicate minute precedence',
   [[[780, -30], [600, 60], [900, -15], [600, 0], [480, 45], [960, -15]], 750], -25.0],
  ['regression: duplicate minute precedence (partial repair)',
   [[[720, -60], [540, -45], [540, -60], [960, -45], [360, -45]], 525], -58.75],
  ['control 1', [[[600, -15], [1080, 30], [1080, 0]], 420], 0.0],
  ['control 2', [[[1140, 0], [480, -15]], 1110], -0.68]],
 [['boundary: at last entry', [[[360, -60], [720, 0], [1080, 60]], 1080], 60.0],
  ['normal: midway', [[[360, -60], [720, 0], [1080, 60]], 540], -30.0],
  ['boundary: before first entry', [[[360, -60], [720, 0]], 300], 0.0],
  ['regression: duplicate minute precedence',
   [[[900, -45], [720, -45], [960, -15], [900, 60], [420, 30]], 765], -18.75],
  ['regression: duplicate minute precedence (partial repair)',
   [[[600, 0], [420, 15], [720, -15], [420, -60]], 585], -5.0],
  ['control 1', [[[1080, 0]], 345], 0.0], ['control 2', [[[1080, 45]], 600], 0.0]]]
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: at last entry60.060.0Passed
normal: midway-30.0-30.0Passed
boundary: before first entry0.00.0Passed
regression: duplicate minute precedence42.542.5Passed
regression: duplicate minute precedence (partial repair)-11.72-23.91Failed
control 10.00.0Passed
control 20.00.0Passed

SHA-256 / f1433eca2d786ea0476cbfcd2e425c3c183d9a4dd58bb9ac23487de98178c6d8

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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

Case digest / 5ffb0fa3b3054bf6a5cef66a904f38649ca63cf1e0913dbcba434d2009fe9c19