{"abstract":"Cool days reduce the cumulative total.","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":"Taking the absolute value credits cold days with development.","family":"w2-ecopop-degree-days-negative-day-floor","id":"FA-65656","implementations":{"attempt":{"sha256":"64f6e867a7ff7bf50fcc38bbe42d7f2d97257b1dd34e1986c1d5d7ba35e5417d","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)\n        lo_c = min(max(lo, base), upper)\n        dd = abs((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  ('control: hot spell above cutoff', ([20, 22, 25], [34, 38, 40], 10, 30, 30), [[15.0, 31.0, 48.5], 2]),\n  ('regression: 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: frost then warm',\n   ([-5, 2, 11, 14], [6, 16, 25, 29], 10, 30, 15),\n   [[0.0, 3.0, 11.0, 22.5], 4])],\n [('regression: 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  ('control: warm nights', ([18, 19, 21, 22], [28, 29, 33, 35], 12, 32, 40), [[11.0, 23.0, 37.5, 52.5], 4]),\n  ('control: no days', ([], [], 10, 30, 5), [[], None]),\n  ('regression: frost then warm',\n   ([-5, 2, 11, 14], [6, 16, 25, 29], 10, 30, 15),\n   [[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  ('control: hot spell above cutoff', ([20, 22, 25], [34, 38, 40], 10, 30, 30), [[15.0, 31.0, 48.5], 2]),\n  ('regression: cold days below base', ([-2, 0, 3], [5, 8, 9], 10, 30, 1), [[0.0, 0.0, 0.0], None]),\n  ('control: warm nights', ([18, 19, 21, 22], [28, 29, 33, 35], 12, 32, 40), [[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  ('regression: frost then warm',\n   ([-5, 2, 11, 14], [6, 16, 25, 29], 10, 30, 15),\n   [[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  ('control: hot spell above cutoff', ([20, 22, 25], [34, 38, 40], 10, 30, 30), [[15.0, 31.0, 48.5], 2]),\n  ('regression: 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: frost then warm',\n   ([-5, 2, 11, 14], [6, 16, 25, 29], 10, 30, 15),\n   [[0.0, 3.0, 11.0, 22.5], 4])],\n [('regression: 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  ('control: warm nights', ([18, 19, 21, 22], [28, 29, 33, 35], 12, 32, 40), [[11.0, 23.0, 37.5, 52.5], 4]),\n  ('control: no days', ([], [], 10, 30, 5), [[], None]),\n  ('regression: frost then warm',\n   ([-5, 2, 11, 14], [6, 16, 25, 29], 10, 30, 15),\n   [[0.0, 3.0, 11.0, 22.5], 4])]]\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":"809b9fb4dc36c81b9896db4db33e49e0d382b7ef66e61d6626b346d949ded85f","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)\n        lo_c = min(max(lo, base), upper)\n        dd = (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  ('control: hot spell above cutoff', ([20, 22, 25], [34, 38, 40], 10, 30, 30), [[15.0, 31.0, 48.5], 2]),\n  ('regression: 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: frost then warm',\n   ([-5, 2, 11, 14], [6, 16, 25, 29], 10, 30, 15),\n   [[0.0, 3.0, 11.0, 22.5], 4])],\n [('regression: 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  ('control: warm nights', ([18, 19, 21, 22], [28, 29, 33, 35], 12, 32, 40), [[11.0, 23.0, 37.5, 52.5], 4]),\n  ('control: no days', ([], [], 10, 30, 5), [[], None]),\n  ('regression: frost then warm',\n   ([-5, 2, 11, 14], [6, 16, 25, 29], 10, 30, 15),\n   [[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  ('control: hot spell above cutoff', ([20, 22, 25], [34, 38, 40], 10, 30, 30), [[15.0, 31.0, 48.5], 2]),\n  ('regression: cold days below base', ([-2, 0, 3], [5, 8, 9], 10, 30, 1), [[0.0, 0.0, 0.0], None]),\n  ('control: warm nights', ([18, 19, 21, 22], [28, 29, 33, 35], 12, 32, 40), [[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  ('regression: frost then warm',\n   ([-5, 2, 11, 14], [6, 16, 25, 29], 10, 30, 15),\n   [[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  ('control: hot spell above cutoff', ([20, 22, 25], [34, 38, 40], 10, 30, 30), [[15.0, 31.0, 48.5], 2]),\n  ('regression: 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: frost then warm',\n   ([-5, 2, 11, 14], [6, 16, 25, 29], 10, 30, 15),\n   [[0.0, 3.0, 11.0, 22.5], 4])],\n [('regression: 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  ('control: warm nights', ([18, 19, 21, 22], [28, 29, 33, 35], 12, 32, 40), [[11.0, 23.0, 37.5, 52.5], 4]),\n  ('control: no days', ([], [], 10, 30, 5), [[], None]),\n  ('regression: frost then warm',\n   ([-5, 2, 11, 14], [6, 16, 25, 29], 10, 30, 15),\n   [[0.0, 3.0, 11.0, 22.5], 4])]]\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-negative-day-floor","generated_at":"2026-09-29T14:47:35.984798+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":"Daily degree-days are not floored at zero.","sha256":"0186d9f93aa8c47911fef2c13dbd7e6ea0a74f8aa4ccafe05bb13b162a61c693","title":"Insect degree-day accumulation with horizontal cutoff: negative day floor · 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.939,"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":[[15.0,31.0,48.5],2],"check":"control: hot spell above cutoff","expected":[[15.0,31.0,48.5],2],"passed":true},{"actual":[[2.5,3.5,4.0],1],"check":"regression: cold days below base","expected":[[0.0,0.0,0.0],null],"passed":false},{"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":[[2.0,5.0,13.0,24.5],4],"check":"regression: frost then warm","expected":[[0.0,3.0,11.0,22.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\": \"control: hot spell above cutoff\", \"actual\": [[15.0, 31.0, 48.5], 2], \"expected\": [[15.0, 31.0, 48.5], 2], \"passed\": true}, {\"check\": \"regression: cold days below base\", \"actual\": [[2.5, 3.5, 4.0], 1], \"expected\": [[0.0, 0.0, 0.0], null], \"passed\": false}, {\"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: frost then warm\", \"actual\": [[2.0, 5.0, 13.0, 24.5], 4], \"expected\": [[0.0, 3.0, 11.0, 22.5], 4], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.272,"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":[[15.0,31.0,48.5],2],"check":"control: hot spell above cutoff","expected":[[15.0,31.0,48.5],2],"passed":true},{"actual":[[-2.5,-3.5,-4.0],null],"check":"regression: cold days below base","expected":[[0.0,0.0,0.0],null],"passed":false},{"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":[[-2.0,1.0,9.0,20.5],4],"check":"regression: frost then warm","expected":[[0.0,3.0,11.0,22.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\": \"control: hot spell above cutoff\", \"actual\": [[15.0, 31.0, 48.5], 2], \"expected\": [[15.0, 31.0, 48.5], 2], \"passed\": true}, {\"check\": \"regression: cold days below base\", \"actual\": [[-2.5, -3.5, -4.0], null], \"expected\": [[0.0, 0.0, 0.0], null], \"passed\": false}, {\"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: frost then warm\", \"actual\": [[-2.0, 1.0, 9.0, 20.5], 4], \"expected\": [[0.0, 3.0, 11.0, 22.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."}}