{"abstract":"Early-window Rt is biased upward and unnormalised weights distort all estimates.","category":"Epidemic compartment models","checks":7,"contract":"weights[s-1] is the serial-interval weight at lag s>=1 (unnormalised); daily infection pressure Lambda_k = sum_s w_s*I[k-s]/sum of available weights (lags reaching before day 0 dropped); Rt = sum_{k=t-window+1..t} I_k / sum Lambda_k; None if the window reaches day 0, t is out of range or the denominator is zero; result rounded 6.","contract_signature":"incidence, weights, t, window","evaluation_group":"w2-epidemic-renewal-rt","failed_approach":"Normalising by the full weight sum ignores truncation near the start of the series.","family":"w2-epidemic-renewal-rt-truncated-weight-renormalisation","id":"FA-65121","implementations":{"attempt":{"sha256":"2aa763887f26fd84492a6ccdfedd4d61f273df360a112acca3f912025cb1f7f7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(incidence, weights, t, window):\n    if window < 1 or t - window + 1 < 1 or t >= len(incidence):\n        return None\n    num = 0.0\n    den = 0.0\n    for k in range(t - window + 1, t + 1):\n        pressure = 0.0\n        mass = 0.0\n        for s in range(1, len(weights) + 1):\n            if k - s < 0:\n                break\n            pressure += weights[s - 1] * incidence[k - s]\n            mass += weights[s - 1]\n        pressure /= sum(weights)\n        num += incidence[k]\n        den += pressure\n    if den <= 0:\n        return None\n    return round(num / den, 6)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control: growing outbreak', ([1, 2, 4, 7, 12, 20, 33, 50, 80], [0.2, 0.5, 0.3], 8, 3), 2.515432),\n  ('control: declining outbreak', ([90, 80, 60, 45, 30, 20, 12, 8], [0.3, 0.4, 0.3], 7, 2), 0.383877),\n  ('regression: unnormalised weights', ([5, 6, 8, 9, 11, 14, 16], [2, 3, 1], 6, 2), 1.417323),\n  ('regression: early window truncation', ([3, 5, 9, 14, 20], [0.1, 0.2, 0.3, 0.4], 3, 2), 2.76),\n  ('control: boundary window reaching day 0', ([4, 6, 9, 12], [0.5, 0.5], 2, 3), None),\n  ('regression: window starting on day 1', ([4, 6, 9, 12], [0.5, 0.5], 2, 2), 1.666667),\n  ('control: single day window at day 1', ([3, 5, 8], [1.0], 1, 1), 1.666667)],\n [('regression: early window truncation', ([3, 5, 9, 14, 20], [0.1, 0.2, 0.3, 0.4], 3, 2), 2.76),\n  ('control: boundary window reaching day 0', ([4, 6, 9, 12], [0.5, 0.5], 2, 3), None),\n  ('regression: window starting on day 1', ([4, 6, 9, 12], [0.5, 0.5], 2, 2), 1.666667),\n  ('control: single day window at day 1', ([3, 5, 8], [1.0], 1, 1), 1.666667),\n  ('control: t out of range', ([4, 6, 9], [0.5, 0.5], 3, 1), None),\n  ('control: zero history', ([0, 0, 0, 5, 7], [0.6, 0.4], 3, 2), None),\n  ('control: single day window', ([10, 12, 15, 17, 22, 25], [0.25, 0.5, 0.25], 5, 1), 1.408451)],\n [('regression: unnormalised weights', ([5, 6, 8, 9, 11, 14, 16], [2, 3, 1], 6, 2), 1.417323),\n  ('regression: early window truncation', ([3, 5, 9, 14, 20], [0.1, 0.2, 0.3, 0.4], 3, 2), 2.76),\n  ('control: single day window at day 1', ([3, 5, 8], [1.0], 1, 1), 1.666667),\n  ('control: t out of range', ([4, 6, 9], [0.5, 0.5], 3, 1), None),\n  ('control: zero history', ([0, 0, 0, 5, 7], [0.6, 0.4], 3, 2), None),\n  ('control: single day window', ([10, 12, 15, 17, 22, 25], [0.25, 0.5, 0.25], 5, 1), 1.408451),\n  ('control: long serial interval',\n   ([2, 3, 5, 8, 11, 15, 19, 24, 30, 36], [0.1, 0.15, 0.2, 0.25, 0.3], 9, 4),\n   2.289916)],\n [('control: growing outbreak', ([1, 2, 4, 7, 12, 20, 33, 50, 80], [0.2, 0.5, 0.3], 8, 3), 2.515432),\n  ('control: declining outbreak', ([90, 80, 60, 45, 30, 20, 12, 8], [0.3, 0.4, 0.3], 7, 2), 0.383877),\n  ('regression: unnormalised weights', ([5, 6, 8, 9, 11, 14, 16], [2, 3, 1], 6, 2), 1.417323),\n  ('regression: early window truncation', ([3, 5, 9, 14, 20], [0.1, 0.2, 0.3, 0.4], 3, 2), 2.76),\n  ('control: single day window', ([10, 12, 15, 17, 22, 25], [0.25, 0.5, 0.25], 5, 1), 1.408451),\n  ('control: long serial interval',\n   ([2, 3, 5, 8, 11, 15, 19, 24, 30, 36], [0.1, 0.15, 0.2, 0.25, 0.3], 9, 4),\n   2.289916),\n  ('control: flat incidence', ([10, 10, 10, 10, 10, 10], [0.5, 0.3, 0.2], 5, 3), 1.0)],\n [('control: growing outbreak', ([1, 2, 4, 7, 12, 20, 33, 50, 80], [0.2, 0.5, 0.3], 8, 3), 2.515432),\n  ('control: declining outbreak', ([90, 80, 60, 45, 30, 20, 12, 8], [0.3, 0.4, 0.3], 7, 2), 0.383877),\n  ('regression: unnormalised weights', ([5, 6, 8, 9, 11, 14, 16], [2, 3, 1], 6, 2), 1.417323),\n  ('regression: early window truncation', ([3, 5, 9, 14, 20], [0.1, 0.2, 0.3, 0.4], 3, 2), 2.76),\n  ('control: boundary window reaching day 0', ([4, 6, 9, 12], [0.5, 0.5], 2, 3), None),\n  ('regression: window starting on day 1', ([4, 6, 9, 12], [0.5, 0.5], 2, 2), 1.666667),\n  ('control: single day window at day 1', ([3, 5, 8], [1.0], 1, 1), 1.666667)]]\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":"0e6cb068a3e75a53070a97c97f94636955b9880d18934d81e89aa8f1b990e19d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(incidence, weights, t, window):\n    if window < 1 or t - window + 1 < 1 or t >= len(incidence):\n        return None\n    num = 0.0\n    den = 0.0\n    for k in range(t - window + 1, t + 1):\n        pressure = 0.0\n        mass = 0.0\n        for s in range(1, len(weights) + 1):\n            if k - s < 0:\n                break\n            pressure += weights[s - 1] * incidence[k - s]\n            mass += weights[s - 1]\n        num += incidence[k]\n        den += pressure\n    if den <= 0:\n        return None\n    return round(num / den, 6)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control: growing outbreak', ([1, 2, 4, 7, 12, 20, 33, 50, 80], [0.2, 0.5, 0.3], 8, 3), 2.515432),\n  ('control: declining outbreak', ([90, 80, 60, 45, 30, 20, 12, 8], [0.3, 0.4, 0.3], 7, 2), 0.383877),\n  ('regression: unnormalised weights', ([5, 6, 8, 9, 11, 14, 16], [2, 3, 1], 6, 2), 1.417323),\n  ('regression: early window truncation', ([3, 5, 9, 14, 20], [0.1, 0.2, 0.3, 0.4], 3, 2), 2.76),\n  ('control: boundary window reaching day 0', ([4, 6, 9, 12], [0.5, 0.5], 2, 3), None),\n  ('regression: window starting on day 1', ([4, 6, 9, 12], [0.5, 0.5], 2, 2), 1.666667),\n  ('control: single day window at day 1', ([3, 5, 8], [1.0], 1, 1), 1.666667)],\n [('regression: early window truncation', ([3, 5, 9, 14, 20], [0.1, 0.2, 0.3, 0.4], 3, 2), 2.76),\n  ('control: boundary window reaching day 0', ([4, 6, 9, 12], [0.5, 0.5], 2, 3), None),\n  ('regression: window starting on day 1', ([4, 6, 9, 12], [0.5, 0.5], 2, 2), 1.666667),\n  ('control: single day window at day 1', ([3, 5, 8], [1.0], 1, 1), 1.666667),\n  ('control: t out of range', ([4, 6, 9], [0.5, 0.5], 3, 1), None),\n  ('control: zero history', ([0, 0, 0, 5, 7], [0.6, 0.4], 3, 2), None),\n  ('control: single day window', ([10, 12, 15, 17, 22, 25], [0.25, 0.5, 0.25], 5, 1), 1.408451)],\n [('regression: unnormalised weights', ([5, 6, 8, 9, 11, 14, 16], [2, 3, 1], 6, 2), 1.417323),\n  ('regression: early window truncation', ([3, 5, 9, 14, 20], [0.1, 0.2, 0.3, 0.4], 3, 2), 2.76),\n  ('control: single day window at day 1', ([3, 5, 8], [1.0], 1, 1), 1.666667),\n  ('control: t out of range', ([4, 6, 9], [0.5, 0.5], 3, 1), None),\n  ('control: zero history', ([0, 0, 0, 5, 7], [0.6, 0.4], 3, 2), None),\n  ('control: single day window', ([10, 12, 15, 17, 22, 25], [0.25, 0.5, 0.25], 5, 1), 1.408451),\n  ('control: long serial interval',\n   ([2, 3, 5, 8, 11, 15, 19, 24, 30, 36], [0.1, 0.15, 0.2, 0.25, 0.3], 9, 4),\n   2.289916)],\n [('control: growing outbreak', ([1, 2, 4, 7, 12, 20, 33, 50, 80], [0.2, 0.5, 0.3], 8, 3), 2.515432),\n  ('control: declining outbreak', ([90, 80, 60, 45, 30, 20, 12, 8], [0.3, 0.4, 0.3], 7, 2), 0.383877),\n  ('regression: unnormalised weights', ([5, 6, 8, 9, 11, 14, 16], [2, 3, 1], 6, 2), 1.417323),\n  ('regression: early window truncation', ([3, 5, 9, 14, 20], [0.1, 0.2, 0.3, 0.4], 3, 2), 2.76),\n  ('control: single day window', ([10, 12, 15, 17, 22, 25], [0.25, 0.5, 0.25], 5, 1), 1.408451),\n  ('control: long serial interval',\n   ([2, 3, 5, 8, 11, 15, 19, 24, 30, 36], [0.1, 0.15, 0.2, 0.25, 0.3], 9, 4),\n   2.289916),\n  ('control: flat incidence', ([10, 10, 10, 10, 10, 10], [0.5, 0.3, 0.2], 5, 3), 1.0)],\n [('control: growing outbreak', ([1, 2, 4, 7, 12, 20, 33, 50, 80], [0.2, 0.5, 0.3], 8, 3), 2.515432),\n  ('control: declining outbreak', ([90, 80, 60, 45, 30, 20, 12, 8], [0.3, 0.4, 0.3], 7, 2), 0.383877),\n  ('regression: unnormalised weights', ([5, 6, 8, 9, 11, 14, 16], [2, 3, 1], 6, 2), 1.417323),\n  ('regression: early window truncation', ([3, 5, 9, 14, 20], [0.1, 0.2, 0.3, 0.4], 3, 2), 2.76),\n  ('control: boundary window reaching day 0', ([4, 6, 9, 12], [0.5, 0.5], 2, 3), None),\n  ('regression: window starting on day 1', ([4, 6, 9, 12], [0.5, 0.5], 2, 2), 1.666667),\n  ('control: single day window at day 1', ([3, 5, 8], [1.0], 1, 1), 1.666667)]]\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-renewal-rt-truncated-weight-renormalisation","generated_at":"2026-09-29T14:47:30.855272+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":"Infection pressure is not divided by the available serial-interval mass.","sha256":"bad963980008775cc5b70fb5c374292f0fb8286d609076a1bb485f4ba47da5c8","title":"Windowed renewal-equation Rt estimate: truncated weight renormalisation · 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":38.63,"exit_code":1,"observations":[{"actual":2.515432,"check":"control: growing outbreak","expected":2.515432,"passed":true},{"actual":0.383877,"check":"control: declining outbreak","expected":0.383877,"passed":true},{"actual":1.417323,"check":"regression: unnormalised weights","expected":1.417323,"passed":true},{"actual":5.897436,"check":"regression: early window truncation","expected":2.76,"passed":false},{"actual":null,"check":"control: boundary window reaching day 0","expected":null,"passed":true},{"actual":2.142857,"check":"regression: window starting on day 1","expected":1.666667,"passed":false},{"actual":1.666667,"check":"control: single day window at day 1","expected":1.666667,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control: growing outbreak\", \"actual\": 2.515432, \"expected\": 2.515432, \"passed\": true}, {\"check\": \"control: declining outbreak\", \"actual\": 0.383877, \"expected\": 0.383877, \"passed\": true}, {\"check\": \"regression: unnormalised weights\", \"actual\": 1.417323, \"expected\": 1.417323, \"passed\": true}, {\"check\": \"regression: early window truncation\", \"actual\": 5.897436, \"expected\": 2.76, \"passed\": false}, {\"check\": \"control: boundary window reaching day 0\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"regression: window starting on day 1\", \"actual\": 2.142857, \"expected\": 1.666667, \"passed\": false}, {\"check\": \"control: single day window at day 1\", \"actual\": 1.666667, \"expected\": 1.666667, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.867,"exit_code":1,"observations":[{"actual":2.515432,"check":"control: growing outbreak","expected":2.515432,"passed":true},{"actual":0.383877,"check":"control: declining outbreak","expected":0.383877,"passed":true},{"actual":0.23622,"check":"regression: unnormalised weights","expected":1.417323,"passed":false},{"actual":5.897436,"check":"regression: early window truncation","expected":2.76,"passed":false},{"actual":null,"check":"control: boundary window reaching day 0","expected":null,"passed":true},{"actual":2.142857,"check":"regression: window starting on day 1","expected":1.666667,"passed":false},{"actual":1.666667,"check":"control: single day window at day 1","expected":1.666667,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control: growing outbreak\", \"actual\": 2.515432, \"expected\": 2.515432, \"passed\": true}, {\"check\": \"control: declining outbreak\", \"actual\": 0.383877, \"expected\": 0.383877, \"passed\": true}, {\"check\": \"regression: unnormalised weights\", \"actual\": 0.23622, \"expected\": 1.417323, \"passed\": false}, {\"check\": \"regression: early window truncation\", \"actual\": 5.897436, \"expected\": 2.76, \"passed\": false}, {\"check\": \"control: boundary window reaching day 0\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"regression: window starting on day 1\", \"actual\": 2.142857, \"expected\": 1.666667, \"passed\": false}, {\"check\": \"control: single day window at day 1\", \"actual\": 1.666667, \"expected\": 1.666667, \"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."}}