{"abstract":"A survey with no recaptures reports a finite abundance.","category":"Ecological population dynamics","checks":7,"contract":"Recaptures must be in [0, min(marked, caught)] else None; 'lp' = M*C/R ([None, None] when R=0, no variance); Chapman = (M+1)(C+1)/(R+1)-1 with variance (M+1)(C+1)(M-R)(C-R)/((R+1)^2 (R+2)); return [estimate rounded 2, variance rounded 2 or None].","evaluation_group":"w2-ecopop-mark-recapture","failed_approach":"Reporting zero abundance contradicts the animals already caught.","family":"w2-ecopop-mark-recapture-zero-recapture-petersen","id":"FA-65521","implementations":{"attempt":{"sha256":"1ac06a2a89a6f270db8f3bf91506bde0bb0475cfabde1b9453bd44300714744f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(marked, caught, recaptured, method):\n    if recaptured < 0 or recaptured > min(marked, caught):\n        return None\n    if method == 'lp':\n        if recaptured == 0:\n            return [0.0, None]\n        return [round(marked * caught / recaptured, 2), None]\n    est = (marked + 1) * (caught + 1) / (recaptured + 1) - 1\n    var = (marked + 1) * (caught + 1) * (marked - recaptured) * (caught - recaptured) / ((recaptured + 1) ** 2 * (recaptured + 2))\n    return [round(est, 2), round(var, 2)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control: trout chapman', (120, 100, 20, 'chapman'), [580.95, 10077.1]),\n  ('control: trout petersen', (120, 100, 20, 'lp'), [600.0, None]),\n  ('control: zero recaptures chapman', (50, 40, 0, 'chapman'), [2090.0, 2091000.0]),\n  ('regression: zero recaptures petersen', (50, 40, 0, 'lp'), [None, None]),\n  ('control: all recaptured', (30, 30, 30, 'chapman'), [30.0, 0.0]),\n  ('control: recaptures exceed catch', (80, 10, 12, 'chapman'), None),\n  ('control: recaptures exceed marked', (10, 80, 12, 'lp'), None)],\n [('regression: zero recaptures petersen', (50, 40, 0, 'lp'), [None, None]),\n  ('control: all recaptured', (30, 30, 30, 'chapman'), [30.0, 0.0]),\n  ('control: recaptures exceed catch', (80, 10, 12, 'chapman'), None),\n  ('control: recaptures exceed marked', (10, 80, 12, 'lp'), None),\n  ('control: small sample', (15, 12, 3, 'chapman'), [51.0, 280.8]),\n  ('control: butterflies', (200, 150, 45, 'chapman'), [658.8, 4966.84]),\n  ('control: negative recapture', (20, 20, -1, 'lp'), None)],\n [('control: trout chapman', (120, 100, 20, 'chapman'), [580.95, 10077.1]),\n  ('control: trout petersen', (120, 100, 20, 'lp'), [600.0, None]),\n  ('regression: zero recaptures petersen', (50, 40, 0, 'lp'), [None, None]),\n  ('control: recaptures exceed marked', (10, 80, 12, 'lp'), None),\n  ('control: small sample', (15, 12, 3, 'chapman'), [51.0, 280.8]),\n  ('control: butterflies', (200, 150, 45, 'chapman'), [658.8, 4966.84]),\n  ('control: negative recapture', (20, 20, -1, 'lp'), None)],\n [('control: trout chapman', (120, 100, 20, 'chapman'), [580.95, 10077.1]),\n  ('control: trout petersen', (120, 100, 20, 'lp'), [600.0, None]),\n  ('control: zero recaptures chapman', (50, 40, 0, 'chapman'), [2090.0, 2091000.0]),\n  ('regression: zero recaptures petersen', (50, 40, 0, 'lp'), [None, None]),\n  ('control: all recaptured', (30, 30, 30, 'chapman'), [30.0, 0.0]),\n  ('control: recaptures exceed catch', (80, 10, 12, 'chapman'), None),\n  ('control: negative recapture', (20, 20, -1, 'lp'), None)],\n [('control: zero recaptures chapman', (50, 40, 0, 'chapman'), [2090.0, 2091000.0]),\n  ('regression: zero recaptures petersen', (50, 40, 0, 'lp'), [None, None]),\n  ('control: all recaptured', (30, 30, 30, 'chapman'), [30.0, 0.0]),\n  ('control: recaptures exceed catch', (80, 10, 12, 'chapman'), None),\n  ('control: recaptures exceed marked', (10, 80, 12, 'lp'), None),\n  ('control: small sample', (15, 12, 3, 'chapman'), [51.0, 280.8]),\n  ('control: butterflies', (200, 150, 45, 'chapman'), [658.8, 4966.84])]]\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":"8c7c9c0a3ce07914e141110c4f5de1a5a311eaa79938ed5fb84788c00a75adf8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(marked, caught, recaptured, method):\n    if recaptured < 0 or recaptured > min(marked, caught):\n        return None\n    if method == 'lp':\n        if recaptured == 0:\n            recaptured = 1\n        return [round(marked * caught / recaptured, 2), None]\n    est = (marked + 1) * (caught + 1) / (recaptured + 1) - 1\n    var = (marked + 1) * (caught + 1) * (marked - recaptured) * (caught - recaptured) / ((recaptured + 1) ** 2 * (recaptured + 2))\n    return [round(est, 2), round(var, 2)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control: trout chapman', (120, 100, 20, 'chapman'), [580.95, 10077.1]),\n  ('control: trout petersen', (120, 100, 20, 'lp'), [600.0, None]),\n  ('control: zero recaptures chapman', (50, 40, 0, 'chapman'), [2090.0, 2091000.0]),\n  ('regression: zero recaptures petersen', (50, 40, 0, 'lp'), [None, None]),\n  ('control: all recaptured', (30, 30, 30, 'chapman'), [30.0, 0.0]),\n  ('control: recaptures exceed catch', (80, 10, 12, 'chapman'), None),\n  ('control: recaptures exceed marked', (10, 80, 12, 'lp'), None)],\n [('regression: zero recaptures petersen', (50, 40, 0, 'lp'), [None, None]),\n  ('control: all recaptured', (30, 30, 30, 'chapman'), [30.0, 0.0]),\n  ('control: recaptures exceed catch', (80, 10, 12, 'chapman'), None),\n  ('control: recaptures exceed marked', (10, 80, 12, 'lp'), None),\n  ('control: small sample', (15, 12, 3, 'chapman'), [51.0, 280.8]),\n  ('control: butterflies', (200, 150, 45, 'chapman'), [658.8, 4966.84]),\n  ('control: negative recapture', (20, 20, -1, 'lp'), None)],\n [('control: trout chapman', (120, 100, 20, 'chapman'), [580.95, 10077.1]),\n  ('control: trout petersen', (120, 100, 20, 'lp'), [600.0, None]),\n  ('regression: zero recaptures petersen', (50, 40, 0, 'lp'), [None, None]),\n  ('control: recaptures exceed marked', (10, 80, 12, 'lp'), None),\n  ('control: small sample', (15, 12, 3, 'chapman'), [51.0, 280.8]),\n  ('control: butterflies', (200, 150, 45, 'chapman'), [658.8, 4966.84]),\n  ('control: negative recapture', (20, 20, -1, 'lp'), None)],\n [('control: trout chapman', (120, 100, 20, 'chapman'), [580.95, 10077.1]),\n  ('control: trout petersen', (120, 100, 20, 'lp'), [600.0, None]),\n  ('control: zero recaptures chapman', (50, 40, 0, 'chapman'), [2090.0, 2091000.0]),\n  ('regression: zero recaptures petersen', (50, 40, 0, 'lp'), [None, None]),\n  ('control: all recaptured', (30, 30, 30, 'chapman'), [30.0, 0.0]),\n  ('control: recaptures exceed catch', (80, 10, 12, 'chapman'), None),\n  ('control: negative recapture', (20, 20, -1, 'lp'), None)],\n [('control: zero recaptures chapman', (50, 40, 0, 'chapman'), [2090.0, 2091000.0]),\n  ('regression: zero recaptures petersen', (50, 40, 0, 'lp'), [None, None]),\n  ('control: all recaptured', (30, 30, 30, 'chapman'), [30.0, 0.0]),\n  ('control: recaptures exceed catch', (80, 10, 12, 'chapman'), None),\n  ('control: recaptures exceed marked', (10, 80, 12, 'lp'), None),\n  ('control: small sample', (15, 12, 3, 'chapman'), [51.0, 280.8]),\n  ('control: butterflies', (200, 150, 45, 'chapman'), [658.8, 4966.84])]]\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":"a29674c3b8f281c1558755fbc77fa62f8ead5268b30145004fbd6e3eb228608b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(marked, caught, recaptured, method):\n    if recaptured < 0 or recaptured > min(marked, caught):\n        return None\n    if method == 'lp':\n        if recaptured == 0:\n            return [None, None]\n        return [round(marked * caught / recaptured, 2), None]\n    est = (marked + 1) * (caught + 1) / (recaptured + 1) - 1\n    var = (marked + 1) * (caught + 1) * (marked - recaptured) * (caught - recaptured) / ((recaptured + 1) ** 2 * (recaptured + 2))\n    return [round(est, 2), round(var, 2)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control: trout chapman', (120, 100, 20, 'chapman'), [580.95, 10077.1]),\n  ('control: trout petersen', (120, 100, 20, 'lp'), [600.0, None]),\n  ('control: zero recaptures chapman', (50, 40, 0, 'chapman'), [2090.0, 2091000.0]),\n  ('regression: zero recaptures petersen', (50, 40, 0, 'lp'), [None, None]),\n  ('control: all recaptured', (30, 30, 30, 'chapman'), [30.0, 0.0]),\n  ('control: recaptures exceed catch', (80, 10, 12, 'chapman'), None),\n  ('control: recaptures exceed marked', (10, 80, 12, 'lp'), None)],\n [('regression: zero recaptures petersen', (50, 40, 0, 'lp'), [None, None]),\n  ('control: all recaptured', (30, 30, 30, 'chapman'), [30.0, 0.0]),\n  ('control: recaptures exceed catch', (80, 10, 12, 'chapman'), None),\n  ('control: recaptures exceed marked', (10, 80, 12, 'lp'), None),\n  ('control: small sample', (15, 12, 3, 'chapman'), [51.0, 280.8]),\n  ('control: butterflies', (200, 150, 45, 'chapman'), [658.8, 4966.84]),\n  ('control: negative recapture', (20, 20, -1, 'lp'), None)],\n [('control: trout chapman', (120, 100, 20, 'chapman'), [580.95, 10077.1]),\n  ('control: trout petersen', (120, 100, 20, 'lp'), [600.0, None]),\n  ('regression: zero recaptures petersen', (50, 40, 0, 'lp'), [None, None]),\n  ('control: recaptures exceed marked', (10, 80, 12, 'lp'), None),\n  ('control: small sample', (15, 12, 3, 'chapman'), [51.0, 280.8]),\n  ('control: butterflies', (200, 150, 45, 'chapman'), [658.8, 4966.84]),\n  ('control: negative recapture', (20, 20, -1, 'lp'), None)],\n [('control: trout chapman', (120, 100, 20, 'chapman'), [580.95, 10077.1]),\n  ('control: trout petersen', (120, 100, 20, 'lp'), [600.0, None]),\n  ('control: zero recaptures chapman', (50, 40, 0, 'chapman'), [2090.0, 2091000.0]),\n  ('regression: zero recaptures petersen', (50, 40, 0, 'lp'), [None, None]),\n  ('control: all recaptured', (30, 30, 30, 'chapman'), [30.0, 0.0]),\n  ('control: recaptures exceed catch', (80, 10, 12, 'chapman'), None),\n  ('control: negative recapture', (20, 20, -1, 'lp'), None)],\n [('control: zero recaptures chapman', (50, 40, 0, 'chapman'), [2090.0, 2091000.0]),\n  ('regression: zero recaptures petersen', (50, 40, 0, 'lp'), [None, None]),\n  ('control: all recaptured', (30, 30, 30, 'chapman'), [30.0, 0.0]),\n  ('control: recaptures exceed catch', (80, 10, 12, 'chapman'), None),\n  ('control: recaptures exceed marked', (10, 80, 12, 'lp'), None),\n  ('control: small sample', (15, 12, 3, 'chapman'), [51.0, 280.8]),\n  ('control: butterflies', (200, 150, 45, 'chapman'), [658.8, 4966.84])]]\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-mark-recapture-zero-recapture-petersen","generated_at":"2026-09-29T14:47:34.697312+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.","repair":"Restore the zero-recapture Petersen rule: `return [None, None]`.","root_cause":"R=0 is replaced by 1 instead of reporting the estimate as undefined.","sha256":"ba62b3046a932f281534dcc26508bc7b2ff17fd6e876dec65a75f8607f0c2414","title":"Two-sample mark-recapture abundance: zero-recapture Petersen · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.984,"exit_code":1,"observations":[{"actual":[580.95,10077.1],"check":"control: trout chapman","expected":[580.95,10077.1],"passed":true},{"actual":[600.0,null],"check":"control: trout petersen","expected":[600.0,null],"passed":true},{"actual":[2090.0,2091000.0],"check":"control: zero recaptures chapman","expected":[2090.0,2091000.0],"passed":true},{"actual":[0.0,null],"check":"regression: zero recaptures petersen","expected":[null,null],"passed":false},{"actual":[30.0,0.0],"check":"control: all recaptured","expected":[30.0,0.0],"passed":true},{"actual":null,"check":"control: recaptures exceed catch","expected":null,"passed":true},{"actual":null,"check":"control: recaptures exceed marked","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control: trout chapman\", \"actual\": [580.95, 10077.1], \"expected\": [580.95, 10077.1], \"passed\": true}, {\"check\": \"control: trout petersen\", \"actual\": [600.0, null], \"expected\": [600.0, null], \"passed\": true}, {\"check\": \"control: zero recaptures chapman\", \"actual\": [2090.0, 2091000.0], \"expected\": [2090.0, 2091000.0], \"passed\": true}, {\"check\": \"regression: zero recaptures petersen\", \"actual\": [0.0, null], \"expected\": [null, null], \"passed\": false}, {\"check\": \"control: all recaptured\", \"actual\": [30.0, 0.0], \"expected\": [30.0, 0.0], \"passed\": true}, {\"check\": \"control: recaptures exceed catch\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control: recaptures exceed marked\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.135,"exit_code":1,"observations":[{"actual":[580.95,10077.1],"check":"control: trout chapman","expected":[580.95,10077.1],"passed":true},{"actual":[600.0,null],"check":"control: trout petersen","expected":[600.0,null],"passed":true},{"actual":[2090.0,2091000.0],"check":"control: zero recaptures chapman","expected":[2090.0,2091000.0],"passed":true},{"actual":[2000.0,null],"check":"regression: zero recaptures petersen","expected":[null,null],"passed":false},{"actual":[30.0,0.0],"check":"control: all recaptured","expected":[30.0,0.0],"passed":true},{"actual":null,"check":"control: recaptures exceed catch","expected":null,"passed":true},{"actual":null,"check":"control: recaptures exceed marked","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control: trout chapman\", \"actual\": [580.95, 10077.1], \"expected\": [580.95, 10077.1], \"passed\": true}, {\"check\": \"control: trout petersen\", \"actual\": [600.0, null], \"expected\": [600.0, null], \"passed\": true}, {\"check\": \"control: zero recaptures chapman\", \"actual\": [2090.0, 2091000.0], \"expected\": [2090.0, 2091000.0], \"passed\": true}, {\"check\": \"regression: zero recaptures petersen\", \"actual\": [2000.0, null], \"expected\": [null, null], \"passed\": false}, {\"check\": \"control: all recaptured\", \"actual\": [30.0, 0.0], \"expected\": [30.0, 0.0], \"passed\": true}, {\"check\": \"control: recaptures exceed catch\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control: recaptures exceed marked\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.875,"exit_code":0,"observations":[{"actual":[580.95,10077.1],"check":"control: trout chapman","expected":[580.95,10077.1],"passed":true},{"actual":[600.0,null],"check":"control: trout petersen","expected":[600.0,null],"passed":true},{"actual":[2090.0,2091000.0],"check":"control: zero recaptures chapman","expected":[2090.0,2091000.0],"passed":true},{"actual":[null,null],"check":"regression: zero recaptures petersen","expected":[null,null],"passed":true},{"actual":[30.0,0.0],"check":"control: all recaptured","expected":[30.0,0.0],"passed":true},{"actual":null,"check":"control: recaptures exceed catch","expected":null,"passed":true},{"actual":null,"check":"control: recaptures exceed marked","expected":null,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control: trout chapman\", \"actual\": [580.95, 10077.1], \"expected\": [580.95, 10077.1], \"passed\": true}, {\"check\": \"control: trout petersen\", \"actual\": [600.0, null], \"expected\": [600.0, null], \"passed\": true}, {\"check\": \"control: zero recaptures chapman\", \"actual\": [2090.0, 2091000.0], \"expected\": [2090.0, 2091000.0], \"passed\": true}, {\"check\": \"regression: zero recaptures petersen\", \"actual\": [null, null], \"expected\": [null, null], \"passed\": true}, {\"check\": \"control: all recaptured\", \"actual\": [30.0, 0.0], \"expected\": [30.0, 0.0], \"passed\": true}, {\"check\": \"control: recaptures exceed catch\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control: recaptures exceed marked\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}