{"abstract":"Convergence year is the last year inside the band instead of the first.","category":"Ecological population dynamics","checks":7,"contract":"N[t+1] = r0*N/(1+(r0-1)*N/K); equilibrium K if r0>1 else 0; band = 0.01*K; hit = first year (0 = start) with |N-eq|<=band, else None; return [trajectory rounded 4, equilibrium, hit]; None for invalid inputs.","contract_signature":"n0, r0, k, years","evaluation_group":"w2-ecopop-beverton-holt","failed_approach":"Ignoring year 1 misses stocks that converge immediately.","family":"w2-ecopop-beverton-holt-first-hit-latch","id":"FA-65391","implementations":{"attempt":{"sha256":"a5afa9985543d82b7f55606591bcb9d76a88e6c5ab35da50b5e078cd97d517b7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(n0, r0, k, years):\n    if k <= 0 or r0 <= 0 or n0 < 0:\n        return None\n    eq = float(k) if r0 > 1 else 0.0\n    band = 0.01 * k\n    n = float(n0)\n    traj = []\n    hit = 0 if abs(n - eq) <= band else None\n    for year in range(1, years + 1):\n        n = r0 * n / (1 + (r0 - 1) * n / k)\n        traj.append(round(n, 4))\n        if hit is None and abs(n - eq) <= band and year > 1:\n            hit = year\n    return [traj, eq, hit]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: herring recruitment',\n   (50, 3.0, 1000, 10),\n   [[136.3636, 321.4286, 586.9565, 810.0, 927.4809, 974.5989, 991.3871, 997.1125, 999.0356, 999.6783],\n    1000.0,\n    7]),\n  ('control: slow approach',\n   (10, 1.5, 500, 12),\n   [[14.8515,\n     21.9512,\n     32.2196,\n     46.8208,\n     67.09,\n     94.3079,\n     129.2706,\n     171.709,\n     219.8186,\n     270.309,\n     319.1849,\n     362.9343],\n    500.0,\n    None]),\n  ('regression: start at capacity', (1000, 2.0, 1000, 4), [[1000.0, 1000.0, 1000.0, 1000.0], 1000.0, 0]),\n  ('regression: start within band', (995, 2.0, 1000, 3), [[997.4937, 998.7453, 999.3723], 1000.0, 0]),\n  ('control: replacement r0 one', (200, 1.0, 1000, 4), [[200.0, 200.0, 200.0, 200.0], 0.0, None]),\n  ('control: invalid r0', (100, 0.0, 1000, 5), None),\n  ('regression: one year from band',\n   (985, 2.0, 1000, 4),\n   [[992.4433, 996.2073, 998.1001, 999.0491], 1000.0, 1])],\n [('regression: start within band', (995, 2.0, 1000, 3), [[997.4937, 998.7453, 999.3723], 1000.0, 0]),\n  ('control: replacement r0 one', (200, 1.0, 1000, 4), [[200.0, 200.0, 200.0, 200.0], 0.0, None]),\n  ('regression: declining r0 half',\n   (400, 0.5, 1000, 8),\n   [[250.0, 142.8571, 76.9231, 40.0, 20.4082, 10.3093, 5.1813, 2.5974], 0.0, 7]),\n  ('regression: above capacity',\n   (3000, 2.5, 1000, 6),\n   [[1363.6364, 1119.403, 1044.5682, 1017.363, 1006.8736, 1002.7381], 1000.0, 5]),\n  ('control: invalid r0', (100, 0.0, 1000, 5), None),\n  ('control: never reaches band', (1, 1.2, 10000, 5), [[1.2, 1.4399, 1.7279, 2.0734, 2.4879], 10000.0, None]),\n  ('regression: one year from band',\n   (985, 2.0, 1000, 4),\n   [[992.4433, 996.2073, 998.1001, 999.0491], 1000.0, 1])],\n [('regression: herring recruitment',\n   (50, 3.0, 1000, 10),\n   [[136.3636, 321.4286, 586.9565, 810.0, 927.4809, 974.5989, 991.3871, 997.1125, 999.0356, 999.6783],\n    1000.0,\n    7]),\n  ('control: slow approach',\n   (10, 1.5, 500, 12),\n   [[14.8515,\n     21.9512,\n     32.2196,\n     46.8208,\n     67.09,\n     94.3079,\n     129.2706,\n     171.709,\n     219.8186,\n     270.309,\n     319.1849,\n     362.9343],\n    500.0,\n    None]),\n  ('regression: above capacity',\n   (3000, 2.5, 1000, 6),\n   [[1363.6364, 1119.403, 1044.5682, 1017.363, 1006.8736, 1002.7381], 1000.0, 5]),\n  ('control: invalid r0', (100, 0.0, 1000, 5), None),\n  ('control: never reaches band', (1, 1.2, 10000, 5), [[1.2, 1.4399, 1.7279, 2.0734, 2.4879], 10000.0, None]),\n  ('regression: one year from band',\n   (985, 2.0, 1000, 4),\n   [[992.4433, 996.2073, 998.1001, 999.0491], 1000.0, 1]),\n  ('regression: small capacity',\n   (2, 4.0, 20, 6),\n   [[6.1538, 12.8, 17.5342, 19.3208, 19.8258, 19.9562], 20.0, 5])],\n [('regression: herring recruitment',\n   (50, 3.0, 1000, 10),\n   [[136.3636, 321.4286, 586.9565, 810.0, 927.4809, 974.5989, 991.3871, 997.1125, 999.0356, 999.6783],\n    1000.0,\n    7]),\n  ('control: slow approach',\n   (10, 1.5, 500, 12),\n   [[14.8515,\n     21.9512,\n     32.2196,\n     46.8208,\n     67.09,\n     94.3079,\n     129.2706,\n     171.709,\n     219.8186,\n     270.309,\n     319.1849,\n     362.9343],\n    500.0,\n    None]),\n  ('regression: start at capacity', (1000, 2.0, 1000, 4), [[1000.0, 1000.0, 1000.0, 1000.0], 1000.0, 0]),\n  ('control: replacement r0 one', (200, 1.0, 1000, 4), [[200.0, 200.0, 200.0, 200.0], 0.0, None]),\n  ('control: invalid r0', (100, 0.0, 1000, 5), None),\n  ('regression: one year from band',\n   (985, 2.0, 1000, 4),\n   [[992.4433, 996.2073, 998.1001, 999.0491], 1000.0, 1]),\n  ('regression: small capacity',\n   (2, 4.0, 20, 6),\n   [[6.1538, 12.8, 17.5342, 19.3208, 19.8258, 19.9562], 20.0, 5])],\n [('control: slow approach',\n   (10, 1.5, 500, 12),\n   [[14.8515,\n     21.9512,\n     32.2196,\n     46.8208,\n     67.09,\n     94.3079,\n     129.2706,\n     171.709,\n     219.8186,\n     270.309,\n     319.1849,\n     362.9343],\n    500.0,\n    None]),\n  ('regression: start at capacity', (1000, 2.0, 1000, 4), [[1000.0, 1000.0, 1000.0, 1000.0], 1000.0, 0]),\n  ('regression: start within band', (995, 2.0, 1000, 3), [[997.4937, 998.7453, 999.3723], 1000.0, 0]),\n  ('control: replacement r0 one', (200, 1.0, 1000, 4), [[200.0, 200.0, 200.0, 200.0], 0.0, None]),\n  ('regression: declining r0 half',\n   (400, 0.5, 1000, 8),\n   [[250.0, 142.8571, 76.9231, 40.0, 20.4082, 10.3093, 5.1813, 2.5974], 0.0, 7]),\n  ('control: invalid r0', (100, 0.0, 1000, 5), None),\n  ('regression: one year from band',\n   (985, 2.0, 1000, 4),\n   [[992.4433, 996.2073, 998.1001, 999.0491], 1000.0, 1])]]\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":"342a2a1ab9fa740bc0526c7f8acbaa539ab2afbe912a2a617738ad913e59dcdf","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(n0, r0, k, years):\n    if k <= 0 or r0 <= 0 or n0 < 0:\n        return None\n    eq = float(k) if r0 > 1 else 0.0\n    band = 0.01 * k\n    n = float(n0)\n    traj = []\n    hit = 0 if abs(n - eq) <= band else None\n    for year in range(1, years + 1):\n        n = r0 * n / (1 + (r0 - 1) * n / k)\n        traj.append(round(n, 4))\n        if abs(n - eq) <= band:\n            hit = year\n    return [traj, eq, hit]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: herring recruitment',\n   (50, 3.0, 1000, 10),\n   [[136.3636, 321.4286, 586.9565, 810.0, 927.4809, 974.5989, 991.3871, 997.1125, 999.0356, 999.6783],\n    1000.0,\n    7]),\n  ('control: slow approach',\n   (10, 1.5, 500, 12),\n   [[14.8515,\n     21.9512,\n     32.2196,\n     46.8208,\n     67.09,\n     94.3079,\n     129.2706,\n     171.709,\n     219.8186,\n     270.309,\n     319.1849,\n     362.9343],\n    500.0,\n    None]),\n  ('regression: start at capacity', (1000, 2.0, 1000, 4), [[1000.0, 1000.0, 1000.0, 1000.0], 1000.0, 0]),\n  ('regression: start within band', (995, 2.0, 1000, 3), [[997.4937, 998.7453, 999.3723], 1000.0, 0]),\n  ('control: replacement r0 one', (200, 1.0, 1000, 4), [[200.0, 200.0, 200.0, 200.0], 0.0, None]),\n  ('control: invalid r0', (100, 0.0, 1000, 5), None),\n  ('regression: one year from band',\n   (985, 2.0, 1000, 4),\n   [[992.4433, 996.2073, 998.1001, 999.0491], 1000.0, 1])],\n [('regression: start within band', (995, 2.0, 1000, 3), [[997.4937, 998.7453, 999.3723], 1000.0, 0]),\n  ('control: replacement r0 one', (200, 1.0, 1000, 4), [[200.0, 200.0, 200.0, 200.0], 0.0, None]),\n  ('regression: declining r0 half',\n   (400, 0.5, 1000, 8),\n   [[250.0, 142.8571, 76.9231, 40.0, 20.4082, 10.3093, 5.1813, 2.5974], 0.0, 7]),\n  ('regression: above capacity',\n   (3000, 2.5, 1000, 6),\n   [[1363.6364, 1119.403, 1044.5682, 1017.363, 1006.8736, 1002.7381], 1000.0, 5]),\n  ('control: invalid r0', (100, 0.0, 1000, 5), None),\n  ('control: never reaches band', (1, 1.2, 10000, 5), [[1.2, 1.4399, 1.7279, 2.0734, 2.4879], 10000.0, None]),\n  ('regression: one year from band',\n   (985, 2.0, 1000, 4),\n   [[992.4433, 996.2073, 998.1001, 999.0491], 1000.0, 1])],\n [('regression: herring recruitment',\n   (50, 3.0, 1000, 10),\n   [[136.3636, 321.4286, 586.9565, 810.0, 927.4809, 974.5989, 991.3871, 997.1125, 999.0356, 999.6783],\n    1000.0,\n    7]),\n  ('control: slow approach',\n   (10, 1.5, 500, 12),\n   [[14.8515,\n     21.9512,\n     32.2196,\n     46.8208,\n     67.09,\n     94.3079,\n     129.2706,\n     171.709,\n     219.8186,\n     270.309,\n     319.1849,\n     362.9343],\n    500.0,\n    None]),\n  ('regression: above capacity',\n   (3000, 2.5, 1000, 6),\n   [[1363.6364, 1119.403, 1044.5682, 1017.363, 1006.8736, 1002.7381], 1000.0, 5]),\n  ('control: invalid r0', (100, 0.0, 1000, 5), None),\n  ('control: never reaches band', (1, 1.2, 10000, 5), [[1.2, 1.4399, 1.7279, 2.0734, 2.4879], 10000.0, None]),\n  ('regression: one year from band',\n   (985, 2.0, 1000, 4),\n   [[992.4433, 996.2073, 998.1001, 999.0491], 1000.0, 1]),\n  ('regression: small capacity',\n   (2, 4.0, 20, 6),\n   [[6.1538, 12.8, 17.5342, 19.3208, 19.8258, 19.9562], 20.0, 5])],\n [('regression: herring recruitment',\n   (50, 3.0, 1000, 10),\n   [[136.3636, 321.4286, 586.9565, 810.0, 927.4809, 974.5989, 991.3871, 997.1125, 999.0356, 999.6783],\n    1000.0,\n    7]),\n  ('control: slow approach',\n   (10, 1.5, 500, 12),\n   [[14.8515,\n     21.9512,\n     32.2196,\n     46.8208,\n     67.09,\n     94.3079,\n     129.2706,\n     171.709,\n     219.8186,\n     270.309,\n     319.1849,\n     362.9343],\n    500.0,\n    None]),\n  ('regression: start at capacity', (1000, 2.0, 1000, 4), [[1000.0, 1000.0, 1000.0, 1000.0], 1000.0, 0]),\n  ('control: replacement r0 one', (200, 1.0, 1000, 4), [[200.0, 200.0, 200.0, 200.0], 0.0, None]),\n  ('control: invalid r0', (100, 0.0, 1000, 5), None),\n  ('regression: one year from band',\n   (985, 2.0, 1000, 4),\n   [[992.4433, 996.2073, 998.1001, 999.0491], 1000.0, 1]),\n  ('regression: small capacity',\n   (2, 4.0, 20, 6),\n   [[6.1538, 12.8, 17.5342, 19.3208, 19.8258, 19.9562], 20.0, 5])],\n [('control: slow approach',\n   (10, 1.5, 500, 12),\n   [[14.8515,\n     21.9512,\n     32.2196,\n     46.8208,\n     67.09,\n     94.3079,\n     129.2706,\n     171.709,\n     219.8186,\n     270.309,\n     319.1849,\n     362.9343],\n    500.0,\n    None]),\n  ('regression: start at capacity', (1000, 2.0, 1000, 4), [[1000.0, 1000.0, 1000.0, 1000.0], 1000.0, 0]),\n  ('regression: start within band', (995, 2.0, 1000, 3), [[997.4937, 998.7453, 999.3723], 1000.0, 0]),\n  ('control: replacement r0 one', (200, 1.0, 1000, 4), [[200.0, 200.0, 200.0, 200.0], 0.0, None]),\n  ('regression: declining r0 half',\n   (400, 0.5, 1000, 8),\n   [[250.0, 142.8571, 76.9231, 40.0, 20.4082, 10.3093, 5.1813, 2.5974], 0.0, 7]),\n  ('control: invalid r0', (100, 0.0, 1000, 5), None),\n  ('regression: one year from band',\n   (985, 2.0, 1000, 4),\n   [[992.4433, 996.2073, 998.1001, 999.0491], 1000.0, 1])]]\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-beverton-holt-first-hit-latch","generated_at":"2026-09-29T14:47:33.396929+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 hit year is overwritten every year the stock remains inside the band.","sha256":"1003e36d93564c822dc08910ef2178d1c7415b5f81ce1c2329efd4c70b7af7b0","title":"Beverton-Holt recruitment convergence: first-hit latch · 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":43.554,"exit_code":1,"observations":[{"actual":[[136.3636,321.4286,586.9565,810.0,927.4809,974.5989,991.3871,997.1125,999.0356,999.6783],1000.0,7],"check":"regression: herring recruitment","expected":[[136.3636,321.4286,586.9565,810.0,927.4809,974.5989,991.3871,997.1125,999.0356,999.6783],1000.0,7],"passed":true},{"actual":[[14.8515,21.9512,32.2196,46.8208,67.09,94.3079,129.2706,171.709,219.8186,270.309,319.1849,362.9343],500.0,null],"check":"control: slow approach","expected":[[14.8515,21.9512,32.2196,46.8208,67.09,94.3079,129.2706,171.709,219.8186,270.309,319.1849,362.9343],500.0,null],"passed":true},{"actual":[[1000.0,1000.0,1000.0,1000.0],1000.0,0],"check":"regression: start at capacity","expected":[[1000.0,1000.0,1000.0,1000.0],1000.0,0],"passed":true},{"actual":[[997.4937,998.7453,999.3723],1000.0,0],"check":"regression: start within band","expected":[[997.4937,998.7453,999.3723],1000.0,0],"passed":true},{"actual":[[200.0,200.0,200.0,200.0],0.0,null],"check":"control: replacement r0 one","expected":[[200.0,200.0,200.0,200.0],0.0,null],"passed":true},{"actual":null,"check":"control: invalid r0","expected":null,"passed":true},{"actual":[[992.4433,996.2073,998.1001,999.0491],1000.0,2],"check":"regression: one year from band","expected":[[992.4433,996.2073,998.1001,999.0491],1000.0,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: herring recruitment\", \"actual\": [[136.3636, 321.4286, 586.9565, 810.0, 927.4809, 974.5989, 991.3871, 997.1125, 999.0356, 999.6783], 1000.0, 7], \"expected\": [[136.3636, 321.4286, 586.9565, 810.0, 927.4809, 974.5989, 991.3871, 997.1125, 999.0356, 999.6783], 1000.0, 7], \"passed\": true}, {\"check\": \"control: slow approach\", \"actual\": [[14.8515, 21.9512, 32.2196, 46.8208, 67.09, 94.3079, 129.2706, 171.709, 219.8186, 270.309, 319.1849, 362.9343], 500.0, null], \"expected\": [[14.8515, 21.9512, 32.2196, 46.8208, 67.09, 94.3079, 129.2706, 171.709, 219.8186, 270.309, 319.1849, 362.9343], 500.0, null], \"passed\": true}, {\"check\": \"regression: start at capacity\", \"actual\": [[1000.0, 1000.0, 1000.0, 1000.0], 1000.0, 0], \"expected\": [[1000.0, 1000.0, 1000.0, 1000.0], 1000.0, 0], \"passed\": true}, {\"check\": \"regression: start within band\", \"actual\": [[997.4937, 998.7453, 999.3723], 1000.0, 0], \"expected\": [[997.4937, 998.7453, 999.3723], 1000.0, 0], \"passed\": true}, {\"check\": \"control: replacement r0 one\", \"actual\": [[200.0, 200.0, 200.0, 200.0], 0.0, null], \"expected\": [[200.0, 200.0, 200.0, 200.0], 0.0, null], \"passed\": true}, {\"check\": \"control: invalid r0\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"regression: one year from band\", \"actual\": [[992.4433, 996.2073, 998.1001, 999.0491], 1000.0, 2], \"expected\": [[992.4433, 996.2073, 998.1001, 999.0491], 1000.0, 1], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.566,"exit_code":1,"observations":[{"actual":[[136.3636,321.4286,586.9565,810.0,927.4809,974.5989,991.3871,997.1125,999.0356,999.6783],1000.0,10],"check":"regression: herring recruitment","expected":[[136.3636,321.4286,586.9565,810.0,927.4809,974.5989,991.3871,997.1125,999.0356,999.6783],1000.0,7],"passed":false},{"actual":[[14.8515,21.9512,32.2196,46.8208,67.09,94.3079,129.2706,171.709,219.8186,270.309,319.1849,362.9343],500.0,null],"check":"control: slow approach","expected":[[14.8515,21.9512,32.2196,46.8208,67.09,94.3079,129.2706,171.709,219.8186,270.309,319.1849,362.9343],500.0,null],"passed":true},{"actual":[[1000.0,1000.0,1000.0,1000.0],1000.0,4],"check":"regression: start at capacity","expected":[[1000.0,1000.0,1000.0,1000.0],1000.0,0],"passed":false},{"actual":[[997.4937,998.7453,999.3723],1000.0,3],"check":"regression: start within band","expected":[[997.4937,998.7453,999.3723],1000.0,0],"passed":false},{"actual":[[200.0,200.0,200.0,200.0],0.0,null],"check":"control: replacement r0 one","expected":[[200.0,200.0,200.0,200.0],0.0,null],"passed":true},{"actual":null,"check":"control: invalid r0","expected":null,"passed":true},{"actual":[[992.4433,996.2073,998.1001,999.0491],1000.0,4],"check":"regression: one year from band","expected":[[992.4433,996.2073,998.1001,999.0491],1000.0,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: herring recruitment\", \"actual\": [[136.3636, 321.4286, 586.9565, 810.0, 927.4809, 974.5989, 991.3871, 997.1125, 999.0356, 999.6783], 1000.0, 10], \"expected\": [[136.3636, 321.4286, 586.9565, 810.0, 927.4809, 974.5989, 991.3871, 997.1125, 999.0356, 999.6783], 1000.0, 7], \"passed\": false}, {\"check\": \"control: slow approach\", \"actual\": [[14.8515, 21.9512, 32.2196, 46.8208, 67.09, 94.3079, 129.2706, 171.709, 219.8186, 270.309, 319.1849, 362.9343], 500.0, null], \"expected\": [[14.8515, 21.9512, 32.2196, 46.8208, 67.09, 94.3079, 129.2706, 171.709, 219.8186, 270.309, 319.1849, 362.9343], 500.0, null], \"passed\": true}, {\"check\": \"regression: start at capacity\", \"actual\": [[1000.0, 1000.0, 1000.0, 1000.0], 1000.0, 4], \"expected\": [[1000.0, 1000.0, 1000.0, 1000.0], 1000.0, 0], \"passed\": false}, {\"check\": \"regression: start within band\", \"actual\": [[997.4937, 998.7453, 999.3723], 1000.0, 3], \"expected\": [[997.4937, 998.7453, 999.3723], 1000.0, 0], \"passed\": false}, {\"check\": \"control: replacement r0 one\", \"actual\": [[200.0, 200.0, 200.0, 200.0], 0.0, null], \"expected\": [[200.0, 200.0, 200.0, 200.0], 0.0, null], \"passed\": true}, {\"check\": \"control: invalid r0\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"regression: one year from band\", \"actual\": [[992.4433, 996.2073, 998.1001, 999.0491], 1000.0, 4], \"expected\": [[992.4433, 996.2073, 998.1001, 999.0491], 1000.0, 1], \"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."}}