{"abstract":"Growth rates are scaled by a constant factor and R is understated.","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":"Base-2 logs still mis-scale r relative to ln2/r and the R mapping.","family":"w2-epidemic-growth-rate-r-log-base","id":"FA-65156","implementations":{"attempt":{"sha256":"0e299f5fef25cf9e097112f769a7dc8933442f85e9667416a6099cbbf6cbcf84","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.log2(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 = [[('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":"23d51a66956f6fa07dac335ee71dd3d12f788e57d1f75a33c3108aa1623649a0","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.log10(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 = [[('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-log-base","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":"Counts are log-transformed with base 10 instead of natural logs.","sha256":"a57f157aee6d9d18c160fa682ab302d8898c951ec4e9fa3712124cfd9fc4219d","title":"Epidemic growth rate, doubling time and R: log base · 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.562,"exit_code":1,"observations":[{"actual":[0.537149,1.2904,5.416921],"check":"regression: noisy growth","expected":[0.372323,1.8617,3.693365],"passed":false},{"actual":[0.630551,1.0993,8.361657],"check":"regression: with reporting gap zero","expected":[0.437065,1.5859,5.341617],"passed":false},{"actual":[-0.355833,null,0.002101],"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":[1.0,0.6931,6.25],"check":"regression: exact doubling per day","expected":[0.693147,1.0,4.160461],"passed":false},{"actual":[1.149185,0.6032,24.574869],"check":"regression: leading zeros","expected":[0.796555,0.8702,14.037592],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: noisy growth\", \"actual\": [0.537149, 1.2904, 5.416921], \"expected\": [0.372323, 1.8617, 3.693365], \"passed\": false}, {\"check\": \"regression: with reporting gap zero\", \"actual\": [0.630551, 1.0993, 8.361657], \"expected\": [0.437065, 1.5859, 5.341617], \"passed\": false}, {\"check\": \"regression: declining\", \"actual\": [-0.355833, null, 0.002101], \"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\": [1.0, 0.6931, 6.25], \"expected\": [0.693147, 1.0, 4.160461], \"passed\": false}, {\"check\": \"regression: leading zeros\", \"actual\": [1.149185, 0.6032, 24.574869], \"expected\": [0.796555, 0.8702, 14.037592], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.631,"exit_code":1,"observations":[{"actual":[0.161698,4.2867,1.965367],"check":"regression: noisy growth","expected":[0.372323,1.8617,3.693365],"passed":false},{"actual":[0.189815,3.6517,2.463155],"check":"regression: with reporting gap zero","expected":[0.437065,1.5859,5.341617],"passed":false},{"actual":[-0.107116,null,0.610087],"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.30103,2.3026,2.106983],"check":"regression: exact doubling per day","expected":[0.693147,1.0,4.160461],"passed":false},{"actual":[0.345939,2.0037,4.828941],"check":"regression: leading zeros","expected":[0.796555,0.8702,14.037592],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: noisy growth\", \"actual\": [0.161698, 4.2867, 1.965367], \"expected\": [0.372323, 1.8617, 3.693365], \"passed\": false}, {\"check\": \"regression: with reporting gap zero\", \"actual\": [0.189815, 3.6517, 2.463155], \"expected\": [0.437065, 1.5859, 5.341617], \"passed\": false}, {\"check\": \"regression: declining\", \"actual\": [-0.107116, null, 0.610087], \"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.30103, 2.3026, 2.106983], \"expected\": [0.693147, 1.0, 4.160461], \"passed\": false}, {\"check\": \"regression: leading zeros\", \"actual\": [0.345939, 2.0037, 4.828941], \"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."}}