{"abstract":"Outbreak size explodes with population size and susceptibles are exhausted within the first substep.","category":"Epidemic compartment models","checks":7,"contract":"Frequency-dependent SIR integrated with forward Euler at dt=1/substeps; new infections per substep are beta*S*I/pop*dt capped at S; peak prevalence and its day are sampled at day ends (day 0 is the seed); return [S, peak I, peak day, R] rounded to 3 decimals, or None for invalid input.","contract_signature":"beta, gamma, pop, i0, days, substeps","evaluation_group":"w2-epidemic-sir-substep","failed_approach":"Normalising by S+I ignores the recovered in the mixing pool, so late-epidemic force of infection is inflated.","family":"w2-epidemic-sir-substep-transmission-scaling","id":"FA-64841","implementations":{"attempt":{"sha256":"9148bdebb69a04adc4ab563fe8a88583409797c085ee07ead554c36fd7eae083","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(beta, gamma, pop, i0, days, substeps):\n    if pop <= 0 or i0 < 0 or i0 > pop or substeps < 1:\n        return None\n    dt = 1.0 / substeps\n    s = float(pop - i0)\n    i = float(i0)\n    r = 0.0\n    peak_i = i\n    peak_day = 0\n    for day in range(1, days + 1):\n        for _ in range(substeps):\n            new_inf = min(beta * s * i / (s + i) * dt, s)\n            new_rec = gamma * i * dt\n            s -= new_inf\n            i += new_inf - new_rec\n            r += new_rec\n        if i > peak_i:\n            peak_i = i\n            peak_day = day\n    return [round(s, 3), round(peak_i, 3), peak_day, round(r, 3)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: mild outbreak in 1000', (0.3, 0.1, 1000, 1, 60, 4), [85.915, 303.71, 39, 810.961]),\n  ('regression: fast outbreak daily steps', (0.9, 0.2, 500, 5, 40, 1), [2.433, 249.994, 10, 497.014]),\n  ('regression: subcritical seed decays', (0.08, 0.2, 1000, 10, 20, 2), [984.011, 10.0, 0, 15.167]),\n  ('control: overshoot-prone large beta single step', (3.0, 0.5, 100, 50, 5, 1), [0.0, 75.0, 1, 95.312]),\n  ('regression: overshoot-prone large beta two steps', (2.5, 0.3, 200, 80, 6, 2), [0.0, 156.8, 1, 166.339]),\n  ('control: boundary zero days', (0.5, 0.1, 100, 3, 0, 2), [97.0, 3.0, 0, 0.0]),\n  ('control: boundary no seed', (0.5, 0.1, 100, 0, 10, 2), [100.0, 0.0, 0, 0.0])],\n [('control: overshoot-prone large beta single step', (3.0, 0.5, 100, 50, 5, 1), [0.0, 75.0, 1, 95.312]),\n  ('regression: overshoot-prone large beta two steps', (2.5, 0.3, 200, 80, 6, 2), [0.0, 156.8, 1, 166.339]),\n  ('control: boundary zero days', (0.5, 0.1, 100, 3, 0, 2), [97.0, 3.0, 0, 0.0]),\n  ('control: boundary no seed', (0.5, 0.1, 100, 0, 10, 2), [100.0, 0.0, 0, 0.0]),\n  ('control: invalid seed above population', (0.5, 0.1, 100, 150, 10, 2), None),\n  ('control: invalid zero substeps', (0.5, 0.1, 100, 1, 10, 0), None),\n  ('regression: slow recovery long run', (0.25, 0.05, 2000, 2, 90, 3), [19.331, 965.817, 43, 1829.639])],\n [('control: boundary no seed', (0.5, 0.1, 100, 0, 10, 2), [100.0, 0.0, 0, 0.0]),\n  ('control: invalid seed above population', (0.5, 0.1, 100, 150, 10, 2), None),\n  ('control: invalid zero substeps', (0.5, 0.1, 100, 1, 10, 0), None),\n  ('regression: slow recovery long run', (0.25, 0.05, 2000, 2, 90, 3), [19.331, 965.817, 43, 1829.639]),\n  ('regression: large city fine steps',\n   (0.4, 0.15, 100000, 20, 50, 8),\n   [13105.196, 25867.476, 37, 75829.968]),\n  ('regression: small village', (0.6, 0.25, 50, 1, 30, 2), [5.845, 11.78, 12, 43.206]),\n  ('control: whole population seeded', (0.5, 0.2, 40, 40, 5, 2), [0.0, 40.0, 0, 26.053])],\n [('regression: mild outbreak in 1000', (0.3, 0.1, 1000, 1, 60, 4), [85.915, 303.71, 39, 810.961]),\n  ('control: overshoot-prone large beta single step', (3.0, 0.5, 100, 50, 5, 1), [0.0, 75.0, 1, 95.312]),\n  ('control: boundary zero days', (0.5, 0.1, 100, 3, 0, 2), [97.0, 3.0, 0, 0.0]),\n  ('regression: slow recovery long run', (0.25, 0.05, 2000, 2, 90, 3), [19.331, 965.817, 43, 1829.639]),\n  ('regression: large city fine steps',\n   (0.4, 0.15, 100000, 20, 50, 8),\n   [13105.196, 25867.476, 37, 75829.968]),\n  ('regression: small village', (0.6, 0.25, 50, 1, 30, 2), [5.845, 11.78, 12, 43.206]),\n  ('control: whole population seeded', (0.5, 0.2, 40, 40, 5, 2), [0.0, 40.0, 0, 26.053])],\n [('regression: mild outbreak in 1000', (0.3, 0.1, 1000, 1, 60, 4), [85.915, 303.71, 39, 810.961]),\n  ('regression: fast outbreak daily steps', (0.9, 0.2, 500, 5, 40, 1), [2.433, 249.994, 10, 497.014]),\n  ('regression: subcritical seed decays', (0.08, 0.2, 1000, 10, 20, 2), [984.011, 10.0, 0, 15.167]),\n  ('control: overshoot-prone large beta single step', (3.0, 0.5, 100, 50, 5, 1), [0.0, 75.0, 1, 95.312]),\n  ('regression: overshoot-prone large beta two steps', (2.5, 0.3, 200, 80, 6, 2), [0.0, 156.8, 1, 166.339]),\n  ('control: boundary zero days', (0.5, 0.1, 100, 3, 0, 2), [97.0, 3.0, 0, 0.0]),\n  ('control: whole population seeded', (0.5, 0.2, 40, 40, 5, 2), [0.0, 40.0, 0, 26.053])]]\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":"83d242804db02e19939c86282f6b519f796ab57071d4fdaf4c1ca35b48eaabe8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(beta, gamma, pop, i0, days, substeps):\n    if pop <= 0 or i0 < 0 or i0 > pop or substeps < 1:\n        return None\n    dt = 1.0 / substeps\n    s = float(pop - i0)\n    i = float(i0)\n    r = 0.0\n    peak_i = i\n    peak_day = 0\n    for day in range(1, days + 1):\n        for _ in range(substeps):\n            new_inf = min(beta * s * i * dt, s)\n            new_rec = gamma * i * dt\n            s -= new_inf\n            i += new_inf - new_rec\n            r += new_rec\n        if i > peak_i:\n            peak_i = i\n            peak_day = day\n    return [round(s, 3), round(peak_i, 3), peak_day, round(r, 3)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: mild outbreak in 1000', (0.3, 0.1, 1000, 1, 60, 4), [85.915, 303.71, 39, 810.961]),\n  ('regression: fast outbreak daily steps', (0.9, 0.2, 500, 5, 40, 1), [2.433, 249.994, 10, 497.014]),\n  ('regression: subcritical seed decays', (0.08, 0.2, 1000, 10, 20, 2), [984.011, 10.0, 0, 15.167]),\n  ('control: overshoot-prone large beta single step', (3.0, 0.5, 100, 50, 5, 1), [0.0, 75.0, 1, 95.312]),\n  ('regression: overshoot-prone large beta two steps', (2.5, 0.3, 200, 80, 6, 2), [0.0, 156.8, 1, 166.339]),\n  ('control: boundary zero days', (0.5, 0.1, 100, 3, 0, 2), [97.0, 3.0, 0, 0.0]),\n  ('control: boundary no seed', (0.5, 0.1, 100, 0, 10, 2), [100.0, 0.0, 0, 0.0])],\n [('control: overshoot-prone large beta single step', (3.0, 0.5, 100, 50, 5, 1), [0.0, 75.0, 1, 95.312]),\n  ('regression: overshoot-prone large beta two steps', (2.5, 0.3, 200, 80, 6, 2), [0.0, 156.8, 1, 166.339]),\n  ('control: boundary zero days', (0.5, 0.1, 100, 3, 0, 2), [97.0, 3.0, 0, 0.0]),\n  ('control: boundary no seed', (0.5, 0.1, 100, 0, 10, 2), [100.0, 0.0, 0, 0.0]),\n  ('control: invalid seed above population', (0.5, 0.1, 100, 150, 10, 2), None),\n  ('control: invalid zero substeps', (0.5, 0.1, 100, 1, 10, 0), None),\n  ('regression: slow recovery long run', (0.25, 0.05, 2000, 2, 90, 3), [19.331, 965.817, 43, 1829.639])],\n [('control: boundary no seed', (0.5, 0.1, 100, 0, 10, 2), [100.0, 0.0, 0, 0.0]),\n  ('control: invalid seed above population', (0.5, 0.1, 100, 150, 10, 2), None),\n  ('control: invalid zero substeps', (0.5, 0.1, 100, 1, 10, 0), None),\n  ('regression: slow recovery long run', (0.25, 0.05, 2000, 2, 90, 3), [19.331, 965.817, 43, 1829.639]),\n  ('regression: large city fine steps',\n   (0.4, 0.15, 100000, 20, 50, 8),\n   [13105.196, 25867.476, 37, 75829.968]),\n  ('regression: small village', (0.6, 0.25, 50, 1, 30, 2), [5.845, 11.78, 12, 43.206]),\n  ('control: whole population seeded', (0.5, 0.2, 40, 40, 5, 2), [0.0, 40.0, 0, 26.053])],\n [('regression: mild outbreak in 1000', (0.3, 0.1, 1000, 1, 60, 4), [85.915, 303.71, 39, 810.961]),\n  ('control: overshoot-prone large beta single step', (3.0, 0.5, 100, 50, 5, 1), [0.0, 75.0, 1, 95.312]),\n  ('control: boundary zero days', (0.5, 0.1, 100, 3, 0, 2), [97.0, 3.0, 0, 0.0]),\n  ('regression: slow recovery long run', (0.25, 0.05, 2000, 2, 90, 3), [19.331, 965.817, 43, 1829.639]),\n  ('regression: large city fine steps',\n   (0.4, 0.15, 100000, 20, 50, 8),\n   [13105.196, 25867.476, 37, 75829.968]),\n  ('regression: small village', (0.6, 0.25, 50, 1, 30, 2), [5.845, 11.78, 12, 43.206]),\n  ('control: whole population seeded', (0.5, 0.2, 40, 40, 5, 2), [0.0, 40.0, 0, 26.053])],\n [('regression: mild outbreak in 1000', (0.3, 0.1, 1000, 1, 60, 4), [85.915, 303.71, 39, 810.961]),\n  ('regression: fast outbreak daily steps', (0.9, 0.2, 500, 5, 40, 1), [2.433, 249.994, 10, 497.014]),\n  ('regression: subcritical seed decays', (0.08, 0.2, 1000, 10, 20, 2), [984.011, 10.0, 0, 15.167]),\n  ('control: overshoot-prone large beta single step', (3.0, 0.5, 100, 50, 5, 1), [0.0, 75.0, 1, 95.312]),\n  ('regression: overshoot-prone large beta two steps', (2.5, 0.3, 200, 80, 6, 2), [0.0, 156.8, 1, 166.339]),\n  ('control: boundary zero days', (0.5, 0.1, 100, 3, 0, 2), [97.0, 3.0, 0, 0.0]),\n  ('control: whole population seeded', (0.5, 0.2, 40, 40, 5, 2), [0.0, 40.0, 0, 26.053])]]\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-sir-substep-transmission-scaling","generated_at":"2026-09-29T14:47:28.279669+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":"Infections use density-dependent mass action beta*S*I instead of the frequency-dependent beta*S*I/pop.","sha256":"63108585ab4444095febb96dc94ca4071c2aee16cf632325d998a9707f88a3d7","title":"SIR Euler integrator with daily sampling: transmission scaling · 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":42.2,"exit_code":1,"observations":[{"actual":[0.453,387.948,39,918.98],"check":"regression: mild outbreak in 1000","expected":[85.915,303.71,39,810.961],"passed":false},{"actual":[0.0,281.911,10,499.584],"check":"regression: fast outbreak daily steps","expected":[2.433,249.994,10,497.014],"passed":false},{"actual":[983.948,10.0,0,15.216],"check":"regression: subcritical seed decays","expected":[984.011,10.0,0,15.167],"passed":false},{"actual":[0.0,75.0,1,95.312],"check":"control: overshoot-prone large beta single step","expected":[0.0,75.0,1,95.312],"passed":true},{"actual":[0.0,159.864,1,166.457],"check":"regression: overshoot-prone large beta two steps","expected":[0.0,156.8,1,166.339],"passed":false},{"actual":[97.0,3.0,0,0.0],"check":"control: boundary zero days","expected":[97.0,3.0,0,0.0],"passed":true},{"actual":[100.0,0.0,0,0.0],"check":"control: boundary no seed","expected":[100.0,0.0,0,0.0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: mild outbreak in 1000\", \"actual\": [0.453, 387.948, 39, 918.98], \"expected\": [85.915, 303.71, 39, 810.961], \"passed\": false}, {\"check\": \"regression: fast outbreak daily steps\", \"actual\": [0.0, 281.911, 10, 499.584], \"expected\": [2.433, 249.994, 10, 497.014], \"passed\": false}, {\"check\": \"regression: subcritical seed decays\", \"actual\": [983.948, 10.0, 0, 15.216], \"expected\": [984.011, 10.0, 0, 15.167], \"passed\": false}, {\"check\": \"control: overshoot-prone large beta single step\", \"actual\": [0.0, 75.0, 1, 95.312], \"expected\": [0.0, 75.0, 1, 95.312], \"passed\": true}, {\"check\": \"regression: overshoot-prone large beta two steps\", \"actual\": [0.0, 159.864, 1, 166.457], \"expected\": [0.0, 156.8, 1, 166.339], \"passed\": false}, {\"check\": \"control: boundary zero days\", \"actual\": [97.0, 3.0, 0, 0.0], \"expected\": [97.0, 3.0, 0, 0.0], \"passed\": true}, {\"check\": \"control: boundary no seed\", \"actual\": [100.0, 0.0, 0, 0.0], \"expected\": [100.0, 0.0, 0, 0.0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.652,"exit_code":1,"observations":[{"actual":[0.0,948.797,1,997.589],"check":"regression: mild outbreak in 1000","expected":[85.915,303.71,39,810.961],"passed":false},{"actual":[0.0,499.0,1,499.917],"check":"regression: fast outbreak daily steps","expected":[2.433,249.994,10,497.014],"passed":false},{"actual":[0.0,958.5,1,982.509],"check":"regression: subcritical seed decays","expected":[984.011,10.0,0,15.167],"passed":false},{"actual":[0.0,75.0,1,95.312],"check":"control: overshoot-prone large beta single step","expected":[0.0,75.0,1,95.312],"passed":true},{"actual":[0.0,159.8,1,168.539],"check":"regression: overshoot-prone large beta two steps","expected":[0.0,156.8,1,166.339],"passed":false},{"actual":[97.0,3.0,0,0.0],"check":"control: boundary zero days","expected":[97.0,3.0,0,0.0],"passed":true},{"actual":[100.0,0.0,0,0.0],"check":"control: boundary no seed","expected":[100.0,0.0,0,0.0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: mild outbreak in 1000\", \"actual\": [0.0, 948.797, 1, 997.589], \"expected\": [85.915, 303.71, 39, 810.961], \"passed\": false}, {\"check\": \"regression: fast outbreak daily steps\", \"actual\": [0.0, 499.0, 1, 499.917], \"expected\": [2.433, 249.994, 10, 497.014], \"passed\": false}, {\"check\": \"regression: subcritical seed decays\", \"actual\": [0.0, 958.5, 1, 982.509], \"expected\": [984.011, 10.0, 0, 15.167], \"passed\": false}, {\"check\": \"control: overshoot-prone large beta single step\", \"actual\": [0.0, 75.0, 1, 95.312], \"expected\": [0.0, 75.0, 1, 95.312], \"passed\": true}, {\"check\": \"regression: overshoot-prone large beta two steps\", \"actual\": [0.0, 159.8, 1, 168.539], \"expected\": [0.0, 156.8, 1, 166.339], \"passed\": false}, {\"check\": \"control: boundary zero days\", \"actual\": [97.0, 3.0, 0, 0.0], \"expected\": [97.0, 3.0, 0, 0.0], \"passed\": true}, {\"check\": \"control: boundary no seed\", \"actual\": [100.0, 0.0, 0, 0.0], \"expected\": [100.0, 0.0, 0, 0.0], \"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."}}