{"abstract":"Heat waves add degree-days above the developmental ceiling.","category":"Ecological population dynamics","checks":7,"contract":"Daily max is capped at upper; daily min is raised to base and capped at upper; DD = max(0, mean - base); emergence day is the first 1-based day with cumulative DD >= target; return [cumulative rounded 2, day or None]; None when upper <= base.","contract_signature":"tmins, tmaxs, base, upper, target","evaluation_group":"w2-ecopop-degree-days","failed_approach":"Subtracting the excess applies a vertical cutoff instead of the stipulated horizontal one.","family":"w2-ecopop-degree-days-upper-cutoff","id":"FA-65646","implementations":{"attempt":{"sha256":"82e26783c09ed8e1b7532af938d5955c894fb516bb6842c4a9b46ef857cef7c6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(tmins, tmaxs, base, upper, target):\n    if upper <= base:\n        return None\n    total = 0.0\n    cum = []\n    day_hit = None\n    for d, (lo, hi) in enumerate(zip(tmins, tmaxs), start=1):\n        hi_c = min(hi, upper) - (hi - upper if hi > upper else 0)\n        lo_c = min(max(lo, base), upper)\n        dd = max(0.0, (hi_c + lo_c) / 2 - base)\n        total += dd\n        cum.append(round(total, 2))\n        if day_hit is None and total >= target:\n            day_hit = d\n    return [cum, day_hit]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control: spring warming codling moth',\n   ([4, 6, 8, 10, 12, 14], [15, 18, 20, 24, 26, 30], 10, 31, 20),\n   [[2.5, 6.5, 11.5, 18.5, 27.5, 39.5], 5]),\n  ('regression: hot spell above cutoff', ([20, 22, 25], [34, 38, 40], 10, 30, 30), [[15.0, 31.0, 48.5], 2]),\n  ('control: cold days below base', ([-2, 0, 3], [5, 8, 9], 10, 30, 1), [[0.0, 0.0, 0.0], None]),\n  ('control: exact target', ([10, 10, 10], [20, 20, 20], 10, 30, 10), [[5.0, 10.0, 15.0], 2]),\n  ('control: never emerges', ([5, 6], [12, 13], 10, 30, 50), [[1.0, 2.5], None]),\n  ('control: invalid thresholds', ([5], [15], 20, 20, 5), None),\n  ('regression: warm nights',\n   ([18, 19, 21, 22], [28, 29, 33, 35], 12, 32, 40),\n   [[11.0, 23.0, 37.5, 52.5], 4])],\n [('regression: hot spell above cutoff', ([20, 22, 25], [34, 38, 40], 10, 30, 30), [[15.0, 31.0, 48.5], 2]),\n  ('control: exact target', ([10, 10, 10], [20, 20, 20], 10, 30, 10), [[5.0, 10.0, 15.0], 2]),\n  ('control: never emerges', ([5, 6], [12, 13], 10, 30, 50), [[1.0, 2.5], None]),\n  ('control: invalid thresholds', ([5], [15], 20, 20, 5), None),\n  ('regression: warm nights',\n   ([18, 19, 21, 22], [28, 29, 33, 35], 12, 32, 40),\n   [[11.0, 23.0, 37.5, 52.5], 4]),\n  ('control: no days', ([], [], 10, 30, 5), [[], None]),\n  ('control: near-miss rounding', ([10, 10], [29.2, 10], 10, 30, 10), [[9.6, 9.6], None])],\n [('control: spring warming codling moth',\n   ([4, 6, 8, 10, 12, 14], [15, 18, 20, 24, 26, 30], 10, 31, 20),\n   [[2.5, 6.5, 11.5, 18.5, 27.5, 39.5], 5]),\n  ('regression: hot spell above cutoff', ([20, 22, 25], [34, 38, 40], 10, 30, 30), [[15.0, 31.0, 48.5], 2]),\n  ('control: cold days below base', ([-2, 0, 3], [5, 8, 9], 10, 30, 1), [[0.0, 0.0, 0.0], None]),\n  ('regression: warm nights',\n   ([18, 19, 21, 22], [28, 29, 33, 35], 12, 32, 40),\n   [[11.0, 23.0, 37.5, 52.5], 4]),\n  ('control: no days', ([], [], 10, 30, 5), [[], None]),\n  ('control: near-miss rounding', ([10, 10], [29.2, 10], 10, 30, 10), [[9.6, 9.6], None]),\n  ('control: frost then warm', ([-5, 2, 11, 14], [6, 16, 25, 29], 10, 30, 15), [[0.0, 3.0, 11.0, 22.5], 4])],\n [('control: spring warming codling moth',\n   ([4, 6, 8, 10, 12, 14], [15, 18, 20, 24, 26, 30], 10, 31, 20),\n   [[2.5, 6.5, 11.5, 18.5, 27.5, 39.5], 5]),\n  ('regression: hot spell above cutoff', ([20, 22, 25], [34, 38, 40], 10, 30, 30), [[15.0, 31.0, 48.5], 2]),\n  ('control: cold days below base', ([-2, 0, 3], [5, 8, 9], 10, 30, 1), [[0.0, 0.0, 0.0], None]),\n  ('control: exact target', ([10, 10, 10], [20, 20, 20], 10, 30, 10), [[5.0, 10.0, 15.0], 2]),\n  ('control: never emerges', ([5, 6], [12, 13], 10, 30, 50), [[1.0, 2.5], None]),\n  ('regression: warm nights',\n   ([18, 19, 21, 22], [28, 29, 33, 35], 12, 32, 40),\n   [[11.0, 23.0, 37.5, 52.5], 4]),\n  ('control: frost then warm', ([-5, 2, 11, 14], [6, 16, 25, 29], 10, 30, 15), [[0.0, 3.0, 11.0, 22.5], 4])],\n [('regression: hot spell above cutoff', ([20, 22, 25], [34, 38, 40], 10, 30, 30), [[15.0, 31.0, 48.5], 2]),\n  ('control: cold days below base', ([-2, 0, 3], [5, 8, 9], 10, 30, 1), [[0.0, 0.0, 0.0], None]),\n  ('control: exact target', ([10, 10, 10], [20, 20, 20], 10, 30, 10), [[5.0, 10.0, 15.0], 2]),\n  ('control: never emerges', ([5, 6], [12, 13], 10, 30, 50), [[1.0, 2.5], None]),\n  ('control: invalid thresholds', ([5], [15], 20, 20, 5), None),\n  ('regression: warm nights',\n   ([18, 19, 21, 22], [28, 29, 33, 35], 12, 32, 40),\n   [[11.0, 23.0, 37.5, 52.5], 4]),\n  ('control: no days', ([], [], 10, 30, 5), [[], None])]]\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":"e909c733c58b05f75eab60e3605997f7546215652836f40501da5792d870a989","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(tmins, tmaxs, base, upper, target):\n    if upper <= base:\n        return None\n    total = 0.0\n    cum = []\n    day_hit = None\n    for d, (lo, hi) in enumerate(zip(tmins, tmaxs), start=1):\n        hi_c = hi\n        lo_c = min(max(lo, base), upper)\n        dd = max(0.0, (hi_c + lo_c) / 2 - base)\n        total += dd\n        cum.append(round(total, 2))\n        if day_hit is None and total >= target:\n            day_hit = d\n    return [cum, day_hit]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control: spring warming codling moth',\n   ([4, 6, 8, 10, 12, 14], [15, 18, 20, 24, 26, 30], 10, 31, 20),\n   [[2.5, 6.5, 11.5, 18.5, 27.5, 39.5], 5]),\n  ('regression: hot spell above cutoff', ([20, 22, 25], [34, 38, 40], 10, 30, 30), [[15.0, 31.0, 48.5], 2]),\n  ('control: cold days below base', ([-2, 0, 3], [5, 8, 9], 10, 30, 1), [[0.0, 0.0, 0.0], None]),\n  ('control: exact target', ([10, 10, 10], [20, 20, 20], 10, 30, 10), [[5.0, 10.0, 15.0], 2]),\n  ('control: never emerges', ([5, 6], [12, 13], 10, 30, 50), [[1.0, 2.5], None]),\n  ('control: invalid thresholds', ([5], [15], 20, 20, 5), None),\n  ('regression: warm nights',\n   ([18, 19, 21, 22], [28, 29, 33, 35], 12, 32, 40),\n   [[11.0, 23.0, 37.5, 52.5], 4])],\n [('regression: hot spell above cutoff', ([20, 22, 25], [34, 38, 40], 10, 30, 30), [[15.0, 31.0, 48.5], 2]),\n  ('control: exact target', ([10, 10, 10], [20, 20, 20], 10, 30, 10), [[5.0, 10.0, 15.0], 2]),\n  ('control: never emerges', ([5, 6], [12, 13], 10, 30, 50), [[1.0, 2.5], None]),\n  ('control: invalid thresholds', ([5], [15], 20, 20, 5), None),\n  ('regression: warm nights',\n   ([18, 19, 21, 22], [28, 29, 33, 35], 12, 32, 40),\n   [[11.0, 23.0, 37.5, 52.5], 4]),\n  ('control: no days', ([], [], 10, 30, 5), [[], None]),\n  ('control: near-miss rounding', ([10, 10], [29.2, 10], 10, 30, 10), [[9.6, 9.6], None])],\n [('control: spring warming codling moth',\n   ([4, 6, 8, 10, 12, 14], [15, 18, 20, 24, 26, 30], 10, 31, 20),\n   [[2.5, 6.5, 11.5, 18.5, 27.5, 39.5], 5]),\n  ('regression: hot spell above cutoff', ([20, 22, 25], [34, 38, 40], 10, 30, 30), [[15.0, 31.0, 48.5], 2]),\n  ('control: cold days below base', ([-2, 0, 3], [5, 8, 9], 10, 30, 1), [[0.0, 0.0, 0.0], None]),\n  ('regression: warm nights',\n   ([18, 19, 21, 22], [28, 29, 33, 35], 12, 32, 40),\n   [[11.0, 23.0, 37.5, 52.5], 4]),\n  ('control: no days', ([], [], 10, 30, 5), [[], None]),\n  ('control: near-miss rounding', ([10, 10], [29.2, 10], 10, 30, 10), [[9.6, 9.6], None]),\n  ('control: frost then warm', ([-5, 2, 11, 14], [6, 16, 25, 29], 10, 30, 15), [[0.0, 3.0, 11.0, 22.5], 4])],\n [('control: spring warming codling moth',\n   ([4, 6, 8, 10, 12, 14], [15, 18, 20, 24, 26, 30], 10, 31, 20),\n   [[2.5, 6.5, 11.5, 18.5, 27.5, 39.5], 5]),\n  ('regression: hot spell above cutoff', ([20, 22, 25], [34, 38, 40], 10, 30, 30), [[15.0, 31.0, 48.5], 2]),\n  ('control: cold days below base', ([-2, 0, 3], [5, 8, 9], 10, 30, 1), [[0.0, 0.0, 0.0], None]),\n  ('control: exact target', ([10, 10, 10], [20, 20, 20], 10, 30, 10), [[5.0, 10.0, 15.0], 2]),\n  ('control: never emerges', ([5, 6], [12, 13], 10, 30, 50), [[1.0, 2.5], None]),\n  ('regression: warm nights',\n   ([18, 19, 21, 22], [28, 29, 33, 35], 12, 32, 40),\n   [[11.0, 23.0, 37.5, 52.5], 4]),\n  ('control: frost then warm', ([-5, 2, 11, 14], [6, 16, 25, 29], 10, 30, 15), [[0.0, 3.0, 11.0, 22.5], 4])],\n [('regression: hot spell above cutoff', ([20, 22, 25], [34, 38, 40], 10, 30, 30), [[15.0, 31.0, 48.5], 2]),\n  ('control: cold days below base', ([-2, 0, 3], [5, 8, 9], 10, 30, 1), [[0.0, 0.0, 0.0], None]),\n  ('control: exact target', ([10, 10, 10], [20, 20, 20], 10, 30, 10), [[5.0, 10.0, 15.0], 2]),\n  ('control: never emerges', ([5, 6], [12, 13], 10, 30, 50), [[1.0, 2.5], None]),\n  ('control: invalid thresholds', ([5], [15], 20, 20, 5), None),\n  ('regression: warm nights',\n   ([18, 19, 21, 22], [28, 29, 33, 35], 12, 32, 40),\n   [[11.0, 23.0, 37.5, 52.5], 4]),\n  ('control: no days', ([], [], 10, 30, 5), [[], None])]]\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 bounded teaching model with a stipulated contract; not a validated scientific or public-health modelling library. 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-ecopop-degree-days-upper-cutoff","generated_at":"2026-09-29T14:47:35.962144+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Population projections set harvest quotas, conservation status and pest-control timing; a wrong update order, boundary or rate conversion silently changes management advice.","root_cause":"The daily maximum is not capped at the upper threshold.","sha256":"411064d4be7d235f468f2c91ae652282a1554ed4bb9ffd41120c948f5af78fe2","title":"Insect degree-day accumulation with horizontal cutoff: upper cutoff · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":42.595,"exit_code":1,"observations":[{"actual":[[2.5,6.5,11.5,18.5,27.5,39.5],5],"check":"control: spring warming codling moth","expected":[[2.5,6.5,11.5,18.5,27.5,39.5],5],"passed":true},{"actual":[[13.0,25.0,37.5],3],"check":"regression: hot spell above cutoff","expected":[[15.0,31.0,48.5],2],"passed":false},{"actual":[[0.0,0.0,0.0],null],"check":"control: cold days below base","expected":[[0.0,0.0,0.0],null],"passed":true},{"actual":[[5.0,10.0,15.0],2],"check":"control: exact target","expected":[[5.0,10.0,15.0],2],"passed":true},{"actual":[[1.0,2.5],null],"check":"control: never emerges","expected":[[1.0,2.5],null],"passed":true},{"actual":null,"check":"control: invalid thresholds","expected":null,"passed":true},{"actual":[[11.0,23.0,37.0,50.5],4],"check":"regression: warm nights","expected":[[11.0,23.0,37.5,52.5],4],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control: spring warming codling moth\", \"actual\": [[2.5, 6.5, 11.5, 18.5, 27.5, 39.5], 5], \"expected\": [[2.5, 6.5, 11.5, 18.5, 27.5, 39.5], 5], \"passed\": true}, {\"check\": \"regression: hot spell above cutoff\", \"actual\": [[13.0, 25.0, 37.5], 3], \"expected\": [[15.0, 31.0, 48.5], 2], \"passed\": false}, {\"check\": \"control: cold days below base\", \"actual\": [[0.0, 0.0, 0.0], null], \"expected\": [[0.0, 0.0, 0.0], null], \"passed\": true}, {\"check\": \"control: exact target\", \"actual\": [[5.0, 10.0, 15.0], 2], \"expected\": [[5.0, 10.0, 15.0], 2], \"passed\": true}, {\"check\": \"control: never emerges\", \"actual\": [[1.0, 2.5], null], \"expected\": [[1.0, 2.5], null], \"passed\": true}, {\"check\": \"control: invalid thresholds\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"regression: warm nights\", \"actual\": [[11.0, 23.0, 37.0, 50.5], 4], \"expected\": [[11.0, 23.0, 37.5, 52.5], 4], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.188,"exit_code":1,"observations":[{"actual":[[2.5,6.5,11.5,18.5,27.5,39.5],5],"check":"control: spring warming codling moth","expected":[[2.5,6.5,11.5,18.5,27.5,39.5],5],"passed":true},{"actual":[[17.0,37.0,59.5],2],"check":"regression: hot spell above cutoff","expected":[[15.0,31.0,48.5],2],"passed":false},{"actual":[[0.0,0.0,0.0],null],"check":"control: cold days below base","expected":[[0.0,0.0,0.0],null],"passed":true},{"actual":[[5.0,10.0,15.0],2],"check":"control: exact target","expected":[[5.0,10.0,15.0],2],"passed":true},{"actual":[[1.0,2.5],null],"check":"control: never emerges","expected":[[1.0,2.5],null],"passed":true},{"actual":null,"check":"control: invalid thresholds","expected":null,"passed":true},{"actual":[[11.0,23.0,38.0,54.5],4],"check":"regression: warm nights","expected":[[11.0,23.0,37.5,52.5],4],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control: spring warming codling moth\", \"actual\": [[2.5, 6.5, 11.5, 18.5, 27.5, 39.5], 5], \"expected\": [[2.5, 6.5, 11.5, 18.5, 27.5, 39.5], 5], \"passed\": true}, {\"check\": \"regression: hot spell above cutoff\", \"actual\": [[17.0, 37.0, 59.5], 2], \"expected\": [[15.0, 31.0, 48.5], 2], \"passed\": false}, {\"check\": \"control: cold days below base\", \"actual\": [[0.0, 0.0, 0.0], null], \"expected\": [[0.0, 0.0, 0.0], null], \"passed\": true}, {\"check\": \"control: exact target\", \"actual\": [[5.0, 10.0, 15.0], 2], \"expected\": [[5.0, 10.0, 15.0], 2], \"passed\": true}, {\"check\": \"control: never emerges\", \"actual\": [[1.0, 2.5], null], \"expected\": [[1.0, 2.5], null], \"passed\": true}, {\"check\": \"control: invalid thresholds\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"regression: warm nights\", \"actual\": [[11.0, 23.0, 38.0, 54.5], 4], \"expected\": [[11.0, 23.0, 37.5, 52.5], 4], \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}