{"abstract":"Declining epidemics report a negative doubling time.","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":"Taking the absolute rate reports a halving time as a doubling time.","family":"w2-epidemic-growth-rate-r-declining-doubling-time","id":"FA-65151","implementations":{"attempt":{"sha256":"55996c876f888d38761321c63d7d9ac5d05569dff2bfdd48aa77c1fc7e6196ab","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) / abs(r), 4) if r != 0 else None\n    tl = latent_fraction * generation_mean\n    ti = generation_mean - tl\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 = [[('control: noisy growth', ([3, 5, 6, 10, 14, 19, 30], 5.0, 0.4), [0.372323, 1.8617, 3.693365]),\n  ('control: 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  ('control: exact doubling per day', ([1, 2, 4, 8, 16], 3.0, 0.5), [0.693147, 1.0, 4.160461]),\n  ('control: leading zeros', ([0, 0, 1, 3, 5, 12], 7.0, 0.6), [0.796555, 0.8702, 14.037592])],\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  ('control: exact doubling per day', ([1, 2, 4, 8, 16], 3.0, 0.5), [0.693147, 1.0, 4.160461]),\n  ('control: leading zeros', ([0, 0, 1, 3, 5, 12], 7.0, 0.6), [0.796555, 0.8702, 14.037592]),\n  ('control: no latency', ([10, 13, 17, 22, 28], 5.0, 0.0), [0.258533, 2.6811, 2.292666]),\n  ('control: two points', ([5, 9], 4.5, 0.25), [0.587787, 1.1792, 4.956834])],\n [('control: noisy growth', ([3, 5, 6, 10, 14, 19, 30], 5.0, 0.4), [0.372323, 1.8617, 3.693365]),\n  ('control: 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: leading zeros', ([0, 0, 1, 3, 5, 12], 7.0, 0.6), [0.796555, 0.8702, 14.037592]),\n  ('control: no latency', ([10, 13, 17, 22, 28], 5.0, 0.0), [0.258533, 2.6811, 2.292666]),\n  ('control: two points', ([5, 9], 4.5, 0.25), [0.587787, 1.1792, 4.956834])],\n [('control: noisy growth', ([3, 5, 6, 10, 14, 19, 30], 5.0, 0.4), [0.372323, 1.8617, 3.693365]),\n  ('control: 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  ('control: exact doubling per day', ([1, 2, 4, 8, 16], 3.0, 0.5), [0.693147, 1.0, 4.160461]),\n  ('control: leading zeros', ([0, 0, 1, 3, 5, 12], 7.0, 0.6), [0.796555, 0.8702, 14.037592])],\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  ('control: exact doubling per day', ([1, 2, 4, 8, 16], 3.0, 0.5), [0.693147, 1.0, 4.160461]),\n  ('control: leading zeros', ([0, 0, 1, 3, 5, 12], 7.0, 0.6), [0.796555, 0.8702, 14.037592]),\n  ('control: no latency', ([10, 13, 17, 22, 28], 5.0, 0.0), [0.258533, 2.6811, 2.292666]),\n  ('control: 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":"ef6fe1874b1b41bd2cd81539f5990b7ef9c5b69e616117c32bdf0dc8ca0ee554","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\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 = [[('control: noisy growth', ([3, 5, 6, 10, 14, 19, 30], 5.0, 0.4), [0.372323, 1.8617, 3.693365]),\n  ('control: 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  ('control: exact doubling per day', ([1, 2, 4, 8, 16], 3.0, 0.5), [0.693147, 1.0, 4.160461]),\n  ('control: leading zeros', ([0, 0, 1, 3, 5, 12], 7.0, 0.6), [0.796555, 0.8702, 14.037592])],\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  ('control: exact doubling per day', ([1, 2, 4, 8, 16], 3.0, 0.5), [0.693147, 1.0, 4.160461]),\n  ('control: leading zeros', ([0, 0, 1, 3, 5, 12], 7.0, 0.6), [0.796555, 0.8702, 14.037592]),\n  ('control: no latency', ([10, 13, 17, 22, 28], 5.0, 0.0), [0.258533, 2.6811, 2.292666]),\n  ('control: two points', ([5, 9], 4.5, 0.25), [0.587787, 1.1792, 4.956834])],\n [('control: noisy growth', ([3, 5, 6, 10, 14, 19, 30], 5.0, 0.4), [0.372323, 1.8617, 3.693365]),\n  ('control: 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: leading zeros', ([0, 0, 1, 3, 5, 12], 7.0, 0.6), [0.796555, 0.8702, 14.037592]),\n  ('control: no latency', ([10, 13, 17, 22, 28], 5.0, 0.0), [0.258533, 2.6811, 2.292666]),\n  ('control: two points', ([5, 9], 4.5, 0.25), [0.587787, 1.1792, 4.956834])],\n [('control: noisy growth', ([3, 5, 6, 10, 14, 19, 30], 5.0, 0.4), [0.372323, 1.8617, 3.693365]),\n  ('control: 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  ('control: exact doubling per day', ([1, 2, 4, 8, 16], 3.0, 0.5), [0.693147, 1.0, 4.160461]),\n  ('control: leading zeros', ([0, 0, 1, 3, 5, 12], 7.0, 0.6), [0.796555, 0.8702, 14.037592])],\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  ('control: exact doubling per day', ([1, 2, 4, 8, 16], 3.0, 0.5), [0.693147, 1.0, 4.160461]),\n  ('control: leading zeros', ([0, 0, 1, 3, 5, 12], 7.0, 0.6), [0.796555, 0.8702, 14.037592]),\n  ('control: no latency', ([10, 13, 17, 22, 28], 5.0, 0.0), [0.258533, 2.6811, 2.292666]),\n  ('control: 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-declining-doubling-time","generated_at":"2026-09-29T14:47:31.361779+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":"Doubling time is computed for any non-zero growth rate.","sha256":"8acddd750e99c1f15200e22e6ea26ed0ba1ad8743795fe163010d4d21eaf699e","title":"Epidemic growth rate, doubling time and R: declining doubling time · 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":41.213,"exit_code":1,"observations":[{"actual":[0.372323,1.8617,3.693365],"check":"control: noisy growth","expected":[0.372323,1.8617,3.693365],"passed":true},{"actual":[0.437065,1.5859,5.341617],"check":"control: with reporting gap zero","expected":[0.437065,1.5859,5.341617],"passed":true},{"actual":[-0.246645,2.8103,0.217822],"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,4.160461],"check":"control: exact doubling per day","expected":[0.693147,1.0,4.160461],"passed":true},{"actual":[0.796555,0.8702,14.037592],"check":"control: leading zeros","expected":[0.796555,0.8702,14.037592],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control: noisy growth\", \"actual\": [0.372323, 1.8617, 3.693365], \"expected\": [0.372323, 1.8617, 3.693365], \"passed\": true}, {\"check\": \"control: with reporting gap zero\", \"actual\": [0.437065, 1.5859, 5.341617], \"expected\": [0.437065, 1.5859, 5.341617], \"passed\": true}, {\"check\": \"regression: declining\", \"actual\": [-0.246645, 2.8103, 0.217822], \"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\": \"control: exact doubling per day\", \"actual\": [0.693147, 1.0, 4.160461], \"expected\": [0.693147, 1.0, 4.160461], \"passed\": true}, {\"check\": \"control: leading zeros\", \"actual\": [0.796555, 0.8702, 14.037592], \"expected\": [0.796555, 0.8702, 14.037592], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.643,"exit_code":1,"observations":[{"actual":[0.372323,1.8617,3.693365],"check":"control: noisy growth","expected":[0.372323,1.8617,3.693365],"passed":true},{"actual":[0.437065,1.5859,5.341617],"check":"control: with reporting gap zero","expected":[0.437065,1.5859,5.341617],"passed":true},{"actual":[-0.246645,-2.8103,0.217822],"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,4.160461],"check":"control: exact doubling per day","expected":[0.693147,1.0,4.160461],"passed":true},{"actual":[0.796555,0.8702,14.037592],"check":"control: leading zeros","expected":[0.796555,0.8702,14.037592],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control: noisy growth\", \"actual\": [0.372323, 1.8617, 3.693365], \"expected\": [0.372323, 1.8617, 3.693365], \"passed\": true}, {\"check\": \"control: with reporting gap zero\", \"actual\": [0.437065, 1.5859, 5.341617], \"expected\": [0.437065, 1.5859, 5.341617], \"passed\": true}, {\"check\": \"regression: declining\", \"actual\": [-0.246645, -2.8103, 0.217822], \"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\": \"control: exact doubling per day\", \"actual\": [0.693147, 1.0, 4.160461], \"expected\": [0.693147, 1.0, 4.160461], \"passed\": true}, {\"check\": \"control: leading zeros\", \"actual\": [0.796555, 0.8702, 14.037592], \"expected\": [0.796555, 0.8702, 14.037592], \"passed\": true}], \"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."}}