{"abstract":"R is overstated whenever there is a latent period.","category":"Epidemic compartment models","checks":7,"contract":"r is the least-squares slope of ln(count) against day index over days with positive counts (original day indices kept); doubling time ln2/r only when r>0 else None; latent time Tl=latent_fraction*Tg, infectious time Ti=Tg-Tl, R=(1+r*Tl)*(1+r*Ti); return [r rounded 6, doubling rounded 4, R rounded 6]; None with fewer than two positive days.","contract_signature":"counts, generation_mean, latent_fraction","evaluation_group":"w2-epidemic-growth-rate-r","failed_approach":"Halving the remaining time splits the generation interval inconsistently.","family":"w2-epidemic-growth-rate-r-stage-split","id":"FA-65161","implementations":{"attempt":{"sha256":"f0e2735d3ba71099942a8c5998250544ca121b430760b78861a9ac2fdf654903","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(counts, generation_mean, latent_fraction):\n    pts = [(d, math.log(c)) for d, c in enumerate(counts) if c > 0]\n    if len(pts) < 2:\n        return None\n    n = len(pts)\n    mx = sum(d for d, _ in pts) / n\n    my = sum(y for _, y in pts) / n\n    sxx = sum((d - mx) ** 2 for d, _ in pts)\n    sxy = sum((d - mx) * (y - my) for d, y in pts)\n    r = sxy / sxx\n    doubling = round(math.log(2) / r, 4) if r > 0 else None\n    tl = latent_fraction * generation_mean\n    ti = (generation_mean - tl) / 2\n    rep = (1 + r * tl) * (1 + r * ti)\n    return [round(r, 6), doubling, round(rep, 6)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: noisy growth', ([3, 5, 6, 10, 14, 19, 30], 5.0, 0.4), [0.372323, 1.8617, 3.693365]),\n  ('regression: with reporting gap zero', ([2, 4, 0, 9, 13, 0, 30], 6.0, 0.5), [0.437065, 1.5859, 5.341617]),\n  ('regression: declining', ([50, 41, 30, 26, 18, 15], 4.0, 0.3), [-0.246645, None, 0.217822]),\n  ('control: flat', ([7, 7, 7, 7], 5.0, 0.5), [0.0, None, 1.0]),\n  ('control: too few positives', ([0, 0, 4, 0], 5.0, 0.5), None),\n  ('regression: exact doubling per day', ([1, 2, 4, 8, 16], 3.0, 0.5), [0.693147, 1.0, 4.160461]),\n  ('regression: leading zeros', ([0, 0, 1, 3, 5, 12], 7.0, 0.6), [0.796555, 0.8702, 14.037592])],\n [('regression: noisy growth', ([3, 5, 6, 10, 14, 19, 30], 5.0, 0.4), [0.372323, 1.8617, 3.693365]),\n  ('control: flat', ([7, 7, 7, 7], 5.0, 0.5), [0.0, None, 1.0]),\n  ('control: too few positives', ([0, 0, 4, 0], 5.0, 0.5), None),\n  ('regression: exact doubling per day', ([1, 2, 4, 8, 16], 3.0, 0.5), [0.693147, 1.0, 4.160461]),\n  ('regression: leading zeros', ([0, 0, 1, 3, 5, 12], 7.0, 0.6), [0.796555, 0.8702, 14.037592]),\n  ('regression: no latency', ([10, 13, 17, 22, 28], 5.0, 0.0), [0.258533, 2.6811, 2.292666]),\n  ('regression: two points', ([5, 9], 4.5, 0.25), [0.587787, 1.1792, 4.956834])],\n [('regression: noisy growth', ([3, 5, 6, 10, 14, 19, 30], 5.0, 0.4), [0.372323, 1.8617, 3.693365]),\n  ('regression: with reporting gap zero', ([2, 4, 0, 9, 13, 0, 30], 6.0, 0.5), [0.437065, 1.5859, 5.341617]),\n  ('control: flat', ([7, 7, 7, 7], 5.0, 0.5), [0.0, None, 1.0]),\n  ('control: too few positives', ([0, 0, 4, 0], 5.0, 0.5), None),\n  ('regression: leading zeros', ([0, 0, 1, 3, 5, 12], 7.0, 0.6), [0.796555, 0.8702, 14.037592]),\n  ('regression: no latency', ([10, 13, 17, 22, 28], 5.0, 0.0), [0.258533, 2.6811, 2.292666]),\n  ('regression: two points', ([5, 9], 4.5, 0.25), [0.587787, 1.1792, 4.956834])],\n [('regression: noisy growth', ([3, 5, 6, 10, 14, 19, 30], 5.0, 0.4), [0.372323, 1.8617, 3.693365]),\n  ('regression: with reporting gap zero', ([2, 4, 0, 9, 13, 0, 30], 6.0, 0.5), [0.437065, 1.5859, 5.341617]),\n  ('regression: declining', ([50, 41, 30, 26, 18, 15], 4.0, 0.3), [-0.246645, None, 0.217822]),\n  ('control: flat', ([7, 7, 7, 7], 5.0, 0.5), [0.0, None, 1.0]),\n  ('control: too few positives', ([0, 0, 4, 0], 5.0, 0.5), None),\n  ('regression: exact doubling per day', ([1, 2, 4, 8, 16], 3.0, 0.5), [0.693147, 1.0, 4.160461]),\n  ('regression: leading zeros', ([0, 0, 1, 3, 5, 12], 7.0, 0.6), [0.796555, 0.8702, 14.037592])],\n [('regression: noisy growth', ([3, 5, 6, 10, 14, 19, 30], 5.0, 0.4), [0.372323, 1.8617, 3.693365]),\n  ('control: flat', ([7, 7, 7, 7], 5.0, 0.5), [0.0, None, 1.0]),\n  ('control: too few positives', ([0, 0, 4, 0], 5.0, 0.5), None),\n  ('regression: exact doubling per day', ([1, 2, 4, 8, 16], 3.0, 0.5), [0.693147, 1.0, 4.160461]),\n  ('regression: leading zeros', ([0, 0, 1, 3, 5, 12], 7.0, 0.6), [0.796555, 0.8702, 14.037592]),\n  ('regression: no latency', ([10, 13, 17, 22, 28], 5.0, 0.0), [0.258533, 2.6811, 2.292666]),\n  ('regression: two points', ([5, 9], 4.5, 0.25), [0.587787, 1.1792, 4.956834])]]\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":"b9161fe49795a14db83a026d8b0db8b5110674c31d56b1db3cf9dee535514d17","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(counts, generation_mean, latent_fraction):\n    pts = [(d, math.log(c)) for d, c in enumerate(counts) if c > 0]\n    if len(pts) < 2:\n        return None\n    n = len(pts)\n    mx = sum(d for d, _ in pts) / n\n    my = sum(y for _, y in pts) / n\n    sxx = sum((d - mx) ** 2 for d, _ in pts)\n    sxy = sum((d - mx) * (y - my) for d, y in pts)\n    r = sxy / sxx\n    doubling = round(math.log(2) / r, 4) if r > 0 else None\n    tl = latent_fraction * generation_mean\n    ti = generation_mean\n    rep = (1 + r * tl) * (1 + r * ti)\n    return [round(r, 6), doubling, round(rep, 6)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: noisy growth', ([3, 5, 6, 10, 14, 19, 30], 5.0, 0.4), [0.372323, 1.8617, 3.693365]),\n  ('regression: with reporting gap zero', ([2, 4, 0, 9, 13, 0, 30], 6.0, 0.5), [0.437065, 1.5859, 5.341617]),\n  ('regression: declining', ([50, 41, 30, 26, 18, 15], 4.0, 0.3), [-0.246645, None, 0.217822]),\n  ('control: flat', ([7, 7, 7, 7], 5.0, 0.5), [0.0, None, 1.0]),\n  ('control: too few positives', ([0, 0, 4, 0], 5.0, 0.5), None),\n  ('regression: exact doubling per day', ([1, 2, 4, 8, 16], 3.0, 0.5), [0.693147, 1.0, 4.160461]),\n  ('regression: leading zeros', ([0, 0, 1, 3, 5, 12], 7.0, 0.6), [0.796555, 0.8702, 14.037592])],\n [('regression: noisy growth', ([3, 5, 6, 10, 14, 19, 30], 5.0, 0.4), [0.372323, 1.8617, 3.693365]),\n  ('control: flat', ([7, 7, 7, 7], 5.0, 0.5), [0.0, None, 1.0]),\n  ('control: too few positives', ([0, 0, 4, 0], 5.0, 0.5), None),\n  ('regression: exact doubling per day', ([1, 2, 4, 8, 16], 3.0, 0.5), [0.693147, 1.0, 4.160461]),\n  ('regression: leading zeros', ([0, 0, 1, 3, 5, 12], 7.0, 0.6), [0.796555, 0.8702, 14.037592]),\n  ('regression: no latency', ([10, 13, 17, 22, 28], 5.0, 0.0), [0.258533, 2.6811, 2.292666]),\n  ('regression: two points', ([5, 9], 4.5, 0.25), [0.587787, 1.1792, 4.956834])],\n [('regression: noisy growth', ([3, 5, 6, 10, 14, 19, 30], 5.0, 0.4), [0.372323, 1.8617, 3.693365]),\n  ('regression: with reporting gap zero', ([2, 4, 0, 9, 13, 0, 30], 6.0, 0.5), [0.437065, 1.5859, 5.341617]),\n  ('control: flat', ([7, 7, 7, 7], 5.0, 0.5), [0.0, None, 1.0]),\n  ('control: too few positives', ([0, 0, 4, 0], 5.0, 0.5), None),\n  ('regression: leading zeros', ([0, 0, 1, 3, 5, 12], 7.0, 0.6), [0.796555, 0.8702, 14.037592]),\n  ('regression: no latency', ([10, 13, 17, 22, 28], 5.0, 0.0), [0.258533, 2.6811, 2.292666]),\n  ('regression: two points', ([5, 9], 4.5, 0.25), [0.587787, 1.1792, 4.956834])],\n [('regression: noisy growth', ([3, 5, 6, 10, 14, 19, 30], 5.0, 0.4), [0.372323, 1.8617, 3.693365]),\n  ('regression: with reporting gap zero', ([2, 4, 0, 9, 13, 0, 30], 6.0, 0.5), [0.437065, 1.5859, 5.341617]),\n  ('regression: declining', ([50, 41, 30, 26, 18, 15], 4.0, 0.3), [-0.246645, None, 0.217822]),\n  ('control: flat', ([7, 7, 7, 7], 5.0, 0.5), [0.0, None, 1.0]),\n  ('control: too few positives', ([0, 0, 4, 0], 5.0, 0.5), None),\n  ('regression: exact doubling per day', ([1, 2, 4, 8, 16], 3.0, 0.5), [0.693147, 1.0, 4.160461]),\n  ('regression: leading zeros', ([0, 0, 1, 3, 5, 12], 7.0, 0.6), [0.796555, 0.8702, 14.037592])],\n [('regression: noisy growth', ([3, 5, 6, 10, 14, 19, 30], 5.0, 0.4), [0.372323, 1.8617, 3.693365]),\n  ('control: flat', ([7, 7, 7, 7], 5.0, 0.5), [0.0, None, 1.0]),\n  ('control: too few positives', ([0, 0, 4, 0], 5.0, 0.5), None),\n  ('regression: exact doubling per day', ([1, 2, 4, 8, 16], 3.0, 0.5), [0.693147, 1.0, 4.160461]),\n  ('regression: leading zeros', ([0, 0, 1, 3, 5, 12], 7.0, 0.6), [0.796555, 0.8702, 14.037592]),\n  ('regression: no latency', ([10, 13, 17, 22, 28], 5.0, 0.0), [0.258533, 2.6811, 2.292666]),\n  ('regression: two points', ([5, 9], 4.5, 0.25), [0.587787, 1.1792, 4.956834])]]\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-epidemic-growth-rate-r-stage-split","generated_at":"2026-09-29T14:47:31.409294+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Compartmental epidemic calculations drive outbreak forecasts, vaccine targets and hospital planning; a single wrong flow, rate conversion or boundary silently changes every downstream number.","root_cause":"The infectious stage duration is not reduced by the latent stage.","sha256":"ed9438970a50a134845fb07d7f5d677485374f4b8a1d322ee5cb31abbf444263","title":"Epidemic growth rate, doubling time and R: stage split · 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":40.327,"exit_code":1,"observations":[{"actual":[0.372323,1.8617,2.719006],"check":"regression: noisy growth","expected":[0.372323,1.8617,3.693365],"passed":false},{"actual":[0.437065,1.5859,3.826406],"check":"regression: with reporting gap zero","expected":[0.437065,1.5859,5.341617],"passed":false},{"actual":[-0.246645,null,0.460924],"check":"regression: declining","expected":[-0.246645,null,0.217822],"passed":false},{"actual":[0.0,null,1.0],"check":"control: flat","expected":[0.0,null,1.0],"passed":true},{"actual":null,"check":"control: too few positives","expected":null,"passed":true},{"actual":[0.693147,1.0,3.100091],"check":"regression: exact doubling per day","expected":[0.693147,1.0,4.160461],"passed":false},{"actual":[0.796555,0.8702,9.191561],"check":"regression: leading zeros","expected":[0.796555,0.8702,14.037592],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: noisy growth\", \"actual\": [0.372323, 1.8617, 2.719006], \"expected\": [0.372323, 1.8617, 3.693365], \"passed\": false}, {\"check\": \"regression: with reporting gap zero\", \"actual\": [0.437065, 1.5859, 3.826406], \"expected\": [0.437065, 1.5859, 5.341617], \"passed\": false}, {\"check\": \"regression: declining\", \"actual\": [-0.246645, null, 0.460924], \"expected\": [-0.246645, null, 0.217822], \"passed\": false}, {\"check\": \"control: flat\", \"actual\": [0.0, null, 1.0], \"expected\": [0.0, null, 1.0], \"passed\": true}, {\"check\": \"control: too few positives\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"regression: exact doubling per day\", \"actual\": [0.693147, 1.0, 3.100091], \"expected\": [0.693147, 1.0, 4.160461], \"passed\": false}, {\"check\": \"regression: leading zeros\", \"actual\": [0.796555, 0.8702, 9.191561], \"expected\": [0.796555, 0.8702, 14.037592], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.336,"exit_code":1,"observations":[{"actual":[0.372323,1.8617,4.992511],"check":"regression: noisy growth","expected":[0.372323,1.8617,3.693365],"passed":false},{"actual":[0.437065,1.5859,8.372041],"check":"regression: with reporting gap zero","expected":[0.437065,1.5859,5.341617],"passed":false},{"actual":[-0.246645,null,0.009449],"check":"regression: declining","expected":[-0.246645,null,0.217822],"passed":false},{"actual":[0.0,null,1.0],"check":"control: flat","expected":[0.0,null,1.0],"passed":true},{"actual":null,"check":"control: too few positives","expected":null,"passed":true},{"actual":[0.693147,1.0,6.281201],"check":"regression: exact doubling per day","expected":[0.693147,1.0,4.160461],"passed":false},{"actual":[0.796555,0.8702,28.575686],"check":"regression: leading zeros","expected":[0.796555,0.8702,14.037592],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: noisy growth\", \"actual\": [0.372323, 1.8617, 4.992511], \"expected\": [0.372323, 1.8617, 3.693365], \"passed\": false}, {\"check\": \"regression: with reporting gap zero\", \"actual\": [0.437065, 1.5859, 8.372041], \"expected\": [0.437065, 1.5859, 5.341617], \"passed\": false}, {\"check\": \"regression: declining\", \"actual\": [-0.246645, null, 0.009449], \"expected\": [-0.246645, null, 0.217822], \"passed\": false}, {\"check\": \"control: flat\", \"actual\": [0.0, null, 1.0], \"expected\": [0.0, null, 1.0], \"passed\": true}, {\"check\": \"control: too few positives\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"regression: exact doubling per day\", \"actual\": [0.693147, 1.0, 6.281201], \"expected\": [0.693147, 1.0, 4.160461], \"passed\": false}, {\"check\": \"regression: leading zeros\", \"actual\": [0.796555, 0.8702, 28.575686], \"expected\": [0.796555, 0.8702, 14.037592], \"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."}}