{"abstract":"Clear-sky samples with no diffuse reading are reported as night.","category":"Solar tracker geometry","checks":7,"contract":"ghi <= 0 returns [0.0, night]. Diffuse fraction df = dhi*100/ghi percent (may exceed 100 with sensor noise). df >= thresh_pct: [0.0, 'diffuse']. If blend > 0 and df > thresh_pct - blend the angle is ideal*(thresh_pct - df)/blend ('blend'). Otherwise [ideal, 'track']. Angles rounded to 3.","evaluation_group":"w2-solar_tracker_geometry-diffuse-flat-stow","failed_approach":"Treating dhi > ghi as night hides overcast readings that should go flat.","family":"w2-solar_tracker_geometry-diffuse-flat-stow-night-detection","id":"FA-93686","implementations":{"attempt":{"sha256":"333754623f377fbd287d9b361aad4c071260bff54c9fd205a5122d2bb9b9b278","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(ghi, dhi, ideal, thresh_pct, blend):\n    if ghi <= 0 or dhi > ghi:\n        return [0.0, 'night']\n    df = dhi * 100 / ghi\n    if df >= thresh_pct:\n        return [0.0, 'diffuse']\n    if blend > 0 and df > thresh_pct - blend:\n        return [round(ideal * (thresh_pct - df) / blend, 3), 'blend']\n    return [round(float(ideal), 3), 'track']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: diffuse fraction at threshold', [400, 280, 30, 70, 10], [0.0, 'diffuse']],\n  ['boundary: blend band lower edge', [400, 240, 30, 70, 10], [30.0, 'track']],\n  ['normal: clear sky', [800, 80, -45, 70, 10], [-45.0, 'track']],\n  ['regression: night detection', [400, 0, -50, 80, 10], [-50.0, 'track']],\n  ['regression: night detection (partial repair)', [200, 900, -30, 70, 0], [0.0, 'diffuse']],\n  ['control 1', [100, 400, -30, 70, 20], [0.0, 'diffuse']],\n  ['control 2', [800, 20, 0, 70, 20], [0.0, 'track']]],\n [['boundary: diffuse fraction at threshold', [400, 280, 30, 70, 10], [0.0, 'diffuse']],\n  ['boundary: blend band lower edge', [400, 240, 30, 70, 10], [30.0, 'track']],\n  ['normal: clear sky', [800, 80, -45, 70, 10], [-45.0, 'track']],\n  ['regression: night detection', [800, 0, 0, 80, 20], [0.0, 'track']],\n  ['regression: night detection (partial repair)', [400, 900, -30, 70, 20], [0.0, 'diffuse']],\n  ['control 1', [100, 400, -30, 70, 0], [0.0, 'diffuse']],\n  ['control 2', [100, 0, 0, 70, 0], [0.0, 'track']]],\n [['boundary: diffuse fraction at threshold', [400, 280, 30, 70, 10], [0.0, 'diffuse']],\n  ['boundary: blend band lower edge', [400, 240, 30, 70, 10], [30.0, 'track']],\n  ['normal: clear sky', [800, 80, -45, 70, 10], [-45.0, 'track']],\n  ['regression: night detection', [800, 0, 0, 70, 0], [0.0, 'track']],\n  ['regression: night detection (partial repair)', [100, 160, -50, 80, 20], [0.0, 'diffuse']],\n  ['control 1', [200, 160, 25, 70, 0], [0.0, 'diffuse']],\n  ['control 2', [800, 160, -50, 80, 20], [-50.0, 'track']]],\n [['boundary: diffuse fraction at threshold', [400, 280, 30, 70, 10], [0.0, 'diffuse']],\n  ['boundary: blend band lower edge', [400, 240, 30, 70, 10], [30.0, 'track']],\n  ['normal: clear sky', [800, 80, -45, 70, 10], [-45.0, 'track']],\n  ['regression: night detection', [400, 0, 0, 80, 0], [0.0, 'track']],\n  ['regression: night detection (partial repair)', [100, 400, -30, 70, 0], [0.0, 'diffuse']],\n  ['control 1', [400, 80, -30, 80, 0], [-30.0, 'track']],\n  ['control 2', [100, 40, -50, 70, 0], [-50.0, 'track']]],\n [['boundary: diffuse fraction at threshold', [400, 280, 30, 70, 10], [0.0, 'diffuse']],\n  ['boundary: blend band lower edge', [400, 240, 30, 70, 10], [30.0, 'track']],\n  ['normal: clear sky', [800, 80, -45, 70, 10], [-45.0, 'track']],\n  ['regression: night detection', [200, 0, -50, 80, 10], [-50.0, 'track']],\n  ['regression: night detection (partial repair)', [200, 900, 25, 80, 20], [0.0, 'diffuse']],\n  ['control 1', [400, 400, 0, 80, 10], [0.0, 'diffuse']],\n  ['control 2', [100, 400, -30, 70, 0], [0.0, 'diffuse']]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"401a54784a5ac362f39a469303d341bea551e183c3f7ce02cb91dc530e05400a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(ghi, dhi, ideal, thresh_pct, blend):\n    if dhi <= 0:\n        return [0.0, 'night']\n    df = dhi * 100 / ghi\n    if df >= thresh_pct:\n        return [0.0, 'diffuse']\n    if blend > 0 and df > thresh_pct - blend:\n        return [round(ideal * (thresh_pct - df) / blend, 3), 'blend']\n    return [round(float(ideal), 3), 'track']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: diffuse fraction at threshold', [400, 280, 30, 70, 10], [0.0, 'diffuse']],\n  ['boundary: blend band lower edge', [400, 240, 30, 70, 10], [30.0, 'track']],\n  ['normal: clear sky', [800, 80, -45, 70, 10], [-45.0, 'track']],\n  ['regression: night detection', [400, 0, -50, 80, 10], [-50.0, 'track']],\n  ['regression: night detection (partial repair)', [200, 900, -30, 70, 0], [0.0, 'diffuse']],\n  ['control 1', [100, 400, -30, 70, 20], [0.0, 'diffuse']],\n  ['control 2', [800, 20, 0, 70, 20], [0.0, 'track']]],\n [['boundary: diffuse fraction at threshold', [400, 280, 30, 70, 10], [0.0, 'diffuse']],\n  ['boundary: blend band lower edge', [400, 240, 30, 70, 10], [30.0, 'track']],\n  ['normal: clear sky', [800, 80, -45, 70, 10], [-45.0, 'track']],\n  ['regression: night detection', [800, 0, 0, 80, 20], [0.0, 'track']],\n  ['regression: night detection (partial repair)', [400, 900, -30, 70, 20], [0.0, 'diffuse']],\n  ['control 1', [100, 400, -30, 70, 0], [0.0, 'diffuse']],\n  ['control 2', [100, 0, 0, 70, 0], [0.0, 'track']]],\n [['boundary: diffuse fraction at threshold', [400, 280, 30, 70, 10], [0.0, 'diffuse']],\n  ['boundary: blend band lower edge', [400, 240, 30, 70, 10], [30.0, 'track']],\n  ['normal: clear sky', [800, 80, -45, 70, 10], [-45.0, 'track']],\n  ['regression: night detection', [800, 0, 0, 70, 0], [0.0, 'track']],\n  ['regression: night detection (partial repair)', [100, 160, -50, 80, 20], [0.0, 'diffuse']],\n  ['control 1', [200, 160, 25, 70, 0], [0.0, 'diffuse']],\n  ['control 2', [800, 160, -50, 80, 20], [-50.0, 'track']]],\n [['boundary: diffuse fraction at threshold', [400, 280, 30, 70, 10], [0.0, 'diffuse']],\n  ['boundary: blend band lower edge', [400, 240, 30, 70, 10], [30.0, 'track']],\n  ['normal: clear sky', [800, 80, -45, 70, 10], [-45.0, 'track']],\n  ['regression: night detection', [400, 0, 0, 80, 0], [0.0, 'track']],\n  ['regression: night detection (partial repair)', [100, 400, -30, 70, 0], [0.0, 'diffuse']],\n  ['control 1', [400, 80, -30, 80, 0], [-30.0, 'track']],\n  ['control 2', [100, 40, -50, 70, 0], [-50.0, 'track']]],\n [['boundary: diffuse fraction at threshold', [400, 280, 30, 70, 10], [0.0, 'diffuse']],\n  ['boundary: blend band lower edge', [400, 240, 30, 70, 10], [30.0, 'track']],\n  ['normal: clear sky', [800, 80, -45, 70, 10], [-45.0, 'track']],\n  ['regression: night detection', [200, 0, -50, 80, 10], [-50.0, 'track']],\n  ['regression: night detection (partial repair)', [200, 900, 25, 80, 20], [0.0, 'diffuse']],\n  ['control 1', [400, 400, 0, 80, 10], [0.0, 'diffuse']],\n  ['control 2', [100, 400, -30, 70, 0], [0.0, 'diffuse']]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"eb3f8b20915f50df6d900be865fddb0ee79a189ba8e6473628e3d6887f15a0a4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(ghi, dhi, ideal, thresh_pct, blend):\n    if ghi <= 0:\n        return [0.0, 'night']\n    df = dhi * 100 / ghi\n    if df >= thresh_pct:\n        return [0.0, 'diffuse']\n    if blend > 0 and df > thresh_pct - blend:\n        return [round(ideal * (thresh_pct - df) / blend, 3), 'blend']\n    return [round(float(ideal), 3), 'track']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: diffuse fraction at threshold', [400, 280, 30, 70, 10], [0.0, 'diffuse']],\n  ['boundary: blend band lower edge', [400, 240, 30, 70, 10], [30.0, 'track']],\n  ['normal: clear sky', [800, 80, -45, 70, 10], [-45.0, 'track']],\n  ['regression: night detection', [400, 0, -50, 80, 10], [-50.0, 'track']],\n  ['regression: night detection (partial repair)', [200, 900, -30, 70, 0], [0.0, 'diffuse']],\n  ['control 1', [100, 400, -30, 70, 20], [0.0, 'diffuse']],\n  ['control 2', [800, 20, 0, 70, 20], [0.0, 'track']]],\n [['boundary: diffuse fraction at threshold', [400, 280, 30, 70, 10], [0.0, 'diffuse']],\n  ['boundary: blend band lower edge', [400, 240, 30, 70, 10], [30.0, 'track']],\n  ['normal: clear sky', [800, 80, -45, 70, 10], [-45.0, 'track']],\n  ['regression: night detection', [800, 0, 0, 80, 20], [0.0, 'track']],\n  ['regression: night detection (partial repair)', [400, 900, -30, 70, 20], [0.0, 'diffuse']],\n  ['control 1', [100, 400, -30, 70, 0], [0.0, 'diffuse']],\n  ['control 2', [100, 0, 0, 70, 0], [0.0, 'track']]],\n [['boundary: diffuse fraction at threshold', [400, 280, 30, 70, 10], [0.0, 'diffuse']],\n  ['boundary: blend band lower edge', [400, 240, 30, 70, 10], [30.0, 'track']],\n  ['normal: clear sky', [800, 80, -45, 70, 10], [-45.0, 'track']],\n  ['regression: night detection', [800, 0, 0, 70, 0], [0.0, 'track']],\n  ['regression: night detection (partial repair)', [100, 160, -50, 80, 20], [0.0, 'diffuse']],\n  ['control 1', [200, 160, 25, 70, 0], [0.0, 'diffuse']],\n  ['control 2', [800, 160, -50, 80, 20], [-50.0, 'track']]],\n [['boundary: diffuse fraction at threshold', [400, 280, 30, 70, 10], [0.0, 'diffuse']],\n  ['boundary: blend band lower edge', [400, 240, 30, 70, 10], [30.0, 'track']],\n  ['normal: clear sky', [800, 80, -45, 70, 10], [-45.0, 'track']],\n  ['regression: night detection', [400, 0, 0, 80, 0], [0.0, 'track']],\n  ['regression: night detection (partial repair)', [100, 400, -30, 70, 0], [0.0, 'diffuse']],\n  ['control 1', [400, 80, -30, 80, 0], [-30.0, 'track']],\n  ['control 2', [100, 40, -50, 70, 0], [-50.0, 'track']]],\n [['boundary: diffuse fraction at threshold', [400, 280, 30, 70, 10], [0.0, 'diffuse']],\n  ['boundary: blend band lower edge', [400, 240, 30, 70, 10], [30.0, 'track']],\n  ['normal: clear sky', [800, 80, -45, 70, 10], [-45.0, 'track']],\n  ['regression: night detection', [200, 0, -50, 80, 10], [-50.0, 'track']],\n  ['regression: night detection (partial repair)', [200, 900, 25, 80, 20], [0.0, 'diffuse']],\n  ['control 1', [400, 400, 0, 80, 10], [0.0, 'diffuse']],\n  ['control 2', [100, 400, -30, 70, 0], [0.0, 'diffuse']]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-solar_tracker_geometry-diffuse-flat-stow-night-detection","generated_at":"2026-09-29T14:51:57.457623+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"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.","repair":"Detect night from ghi <= 0.","root_cause":"Night is detected from the diffuse sensor instead of global irradiance.","sha256":"8bf878f8e625bb4313d180a7b9794c8f45edef2147e132ad617b75486ea72cd8","title":"Overcast diffuse flat stow: night detection · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.975,"exit_code":1,"observations":[{"actual":[0.0,"diffuse"],"check":"boundary: diffuse fraction at threshold","expected":[0.0,"diffuse"],"passed":true},{"actual":[30.0,"track"],"check":"boundary: blend band lower edge","expected":[30.0,"track"],"passed":true},{"actual":[-45.0,"track"],"check":"normal: clear sky","expected":[-45.0,"track"],"passed":true},{"actual":[-50.0,"track"],"check":"regression: night detection","expected":[-50.0,"track"],"passed":true},{"actual":[0.0,"night"],"check":"regression: night detection (partial repair)","expected":[0.0,"diffuse"],"passed":false},{"actual":[0.0,"night"],"check":"control 1","expected":[0.0,"diffuse"],"passed":false},{"actual":[0.0,"track"],"check":"control 2","expected":[0.0,"track"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: diffuse fraction at threshold\", \"actual\": [0.0, \"diffuse\"], \"expected\": [0.0, \"diffuse\"], \"passed\": true}, {\"check\": \"boundary: blend band lower edge\", \"actual\": [30.0, \"track\"], \"expected\": [30.0, \"track\"], \"passed\": true}, {\"check\": \"normal: clear sky\", \"actual\": [-45.0, \"track\"], \"expected\": [-45.0, \"track\"], \"passed\": true}, {\"check\": \"regression: night detection\", \"actual\": [-50.0, \"track\"], \"expected\": [-50.0, \"track\"], \"passed\": true}, {\"check\": \"regression: night detection (partial repair)\", \"actual\": [0.0, \"night\"], \"expected\": [0.0, \"diffuse\"], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [0.0, \"night\"], \"expected\": [0.0, \"diffuse\"], \"passed\": false}, {\"check\": \"control 2\", \"actual\": [0.0, \"track\"], \"expected\": [0.0, \"track\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.141,"exit_code":1,"observations":[{"actual":[0.0,"diffuse"],"check":"boundary: diffuse fraction at threshold","expected":[0.0,"diffuse"],"passed":true},{"actual":[30.0,"track"],"check":"boundary: blend band lower edge","expected":[30.0,"track"],"passed":true},{"actual":[-45.0,"track"],"check":"normal: clear sky","expected":[-45.0,"track"],"passed":true},{"actual":[0.0,"night"],"check":"regression: night detection","expected":[-50.0,"track"],"passed":false},{"actual":[0.0,"diffuse"],"check":"regression: night detection (partial repair)","expected":[0.0,"diffuse"],"passed":true},{"actual":[0.0,"diffuse"],"check":"control 1","expected":[0.0,"diffuse"],"passed":true},{"actual":[0.0,"track"],"check":"control 2","expected":[0.0,"track"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: diffuse fraction at threshold\", \"actual\": [0.0, \"diffuse\"], \"expected\": [0.0, \"diffuse\"], \"passed\": true}, {\"check\": \"boundary: blend band lower edge\", \"actual\": [30.0, \"track\"], \"expected\": [30.0, \"track\"], \"passed\": true}, {\"check\": \"normal: clear sky\", \"actual\": [-45.0, \"track\"], \"expected\": [-45.0, \"track\"], \"passed\": true}, {\"check\": \"regression: night detection\", \"actual\": [0.0, \"night\"], \"expected\": [-50.0, \"track\"], \"passed\": false}, {\"check\": \"regression: night detection (partial repair)\", \"actual\": [0.0, \"diffuse\"], \"expected\": [0.0, \"diffuse\"], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [0.0, \"diffuse\"], \"expected\": [0.0, \"diffuse\"], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [0.0, \"track\"], \"expected\": [0.0, \"track\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.355,"exit_code":0,"observations":[{"actual":[0.0,"diffuse"],"check":"boundary: diffuse fraction at threshold","expected":[0.0,"diffuse"],"passed":true},{"actual":[30.0,"track"],"check":"boundary: blend band lower edge","expected":[30.0,"track"],"passed":true},{"actual":[-45.0,"track"],"check":"normal: clear sky","expected":[-45.0,"track"],"passed":true},{"actual":[-50.0,"track"],"check":"regression: night detection","expected":[-50.0,"track"],"passed":true},{"actual":[0.0,"diffuse"],"check":"regression: night detection (partial repair)","expected":[0.0,"diffuse"],"passed":true},{"actual":[0.0,"diffuse"],"check":"control 1","expected":[0.0,"diffuse"],"passed":true},{"actual":[0.0,"track"],"check":"control 2","expected":[0.0,"track"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: diffuse fraction at threshold\", \"actual\": [0.0, \"diffuse\"], \"expected\": [0.0, \"diffuse\"], \"passed\": true}, {\"check\": \"boundary: blend band lower edge\", \"actual\": [30.0, \"track\"], \"expected\": [30.0, \"track\"], \"passed\": true}, {\"check\": \"normal: clear sky\", \"actual\": [-45.0, \"track\"], \"expected\": [-45.0, \"track\"], \"passed\": true}, {\"check\": \"regression: night detection\", \"actual\": [-50.0, \"track\"], \"expected\": [-50.0, \"track\"], \"passed\": true}, {\"check\": \"regression: night detection (partial repair)\", \"actual\": [0.0, \"diffuse\"], \"expected\": [0.0, \"diffuse\"], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [0.0, \"diffuse\"], \"expected\": [0.0, \"diffuse\"], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [0.0, \"track\"], \"expected\": [0.0, \"track\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}