{"abstract":"Records with long pre-event buffers yield inflated durations.","category":"Seismic magnitude estimation","checks":8,"contract":"envelope is a list of amplitude samples, dt s per sample, p_index the P pick sample, noise the pre-event noise level. From the peak at or after the pick (first maximum), the coda ends at the first sample with amplitude <= 2*noise. tau = (end - p_index)*dt; Md = -0.87 + 2.0 log10(tau) + 0.0035 epi_km. Return [tau rounded 0.01, Md rounded 0.01] or None when no end or tau <= 0.","contract_signature":"envelope, dt, p_index, noise, epi_km","evaluation_group":"w2-seismic_magnitude_estimation-coda-duration-md","failed_approach":"Measuring from the peak drops the P-to-peak portion.","family":"w2-seismic_magnitude_estimation-coda-duration-md-duration-origin","id":"FA-71471","implementations":{"attempt":{"sha256":"bb42d13b9f093f603c3c531878b2aa8b7142f85d551b088e206b9c783f130704","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(envelope, dt, p_index, noise, epi_km):\n    if p_index >= len(envelope):\n        return None\n    peak = max(range(p_index, len(envelope)), key=lambda i: envelope[i])\n    end = None\n    for i in range(peak, len(envelope)):\n        if envelope[i] <= 2 * noise:\n            end = i\n            break\n    if end is None:\n        return None\n    tau = (end - peak) * dt\n    if tau <= 0:\n        return None\n    md = -0.87 + 2.0 * math.log10(tau) + 0.0035 * epi_km\n    return [round(tau, 2), round(md, 2)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['coda 0', [[1, 0, 1, 1, 19, 59, 29, 23, 13, 6, 4, 2, 1], 1.0, 4, 1, 30], [7.0, 0.93]], ['coda 1', [[0, 1, 3, 3, 1, 23, 70, 49, 39, 31, 21, 14, 7, 4, 2, 3, 3, 1], 0.5, 5, 3, 5], [4.0, 0.35]], ['coda 2', [[0, 2, 26, 78, 39, 27, 21, 14, 8, 4, 2, 0], 0.5, 2, 3, 5], [3.5, 0.24]], ['coda 3', [[0, 2, 2, 0, 1, 14, 44, 30, 21, 14, 9, 7, 5, 3, 1, 2, 0, 2], 0.5, 5, 2, 5], [4.0, 0.35]], ['coda 4', [[0, 1, 1, 19, 59, 35, 21, 12, 7, 5, 2, 1], 0.5, 3, 1, 5], [3.5, 0.24]], ['coda 5', [[2, 0, 0, 24, 72, 43, 25, 17, 13, 9, 4, 3, 1, 1, 1, 1], 2.0, 3, 2, 120], [14.0, 1.84]], ['coda 6', [[1, 1, 0, 1, 0, 20, 61, 30, 24, 19, 15, 12, 8, 6, 3, 2, 1, 0, 1, 1], 2.0, 5, 1, 120], [20.0, 2.15]], ['coda 7', [[0, 0, 1, 0, 0, 16, 50, 35, 21, 12, 8, 4, 2, 1, 1], 1.0, 5, 1, 30], [7.0, 0.93]]], [['coda 3', [[0, 2, 2, 0, 1, 14, 44, 30, 21, 14, 9, 7, 5, 3, 1, 2, 0, 2], 0.5, 5, 2, 5], [4.0, 0.35]], ['coda 6', [[1, 1, 0, 1, 0, 20, 61, 30, 24, 19, 15, 12, 8, 6, 3, 2, 1, 0, 1, 1], 2.0, 5, 1, 120], [20.0, 2.15]], ['coda 7', [[0, 0, 1, 0, 0, 16, 50, 35, 21, 12, 8, 4, 2, 1, 1], 1.0, 5, 1, 30], [7.0, 0.93]], ['coda 8', [[0, 0, 1, 2, 9, 27, 18, 10, 7, 4, 2], 0.5, 4, 2, 5], [2.5, -0.06]], ['coda 9', [[1, 1, 17, 53, 42, 29, 23, 18, 14, 9, 6, 4, 2, 1, 1, 1, 1], 1.0, 2, 1, 30], [10.0, 1.23]], ['coda 10', [[1, 2, 0, 2, 10, 30, 18, 12, 7, 5, 2, 0, 1], 2.0, 4, 2, 120], [12.0, 1.71]], ['coda 11', [[1, 0, 10, 31, 24, 16, 8, 4, 2, 1, 0], 1.0, 2, 1, 30], [6.0, 0.79]], ['coda 12', [[2, 1, 9, 28, 22, 13, 9, 7, 5, 4, 2, 2], 1.0, 2, 2, 30], [7.0, 0.93]]], [['coda 6', [[1, 1, 0, 1, 0, 20, 61, 30, 24, 19, 15, 12, 8, 6, 3, 2, 1, 0, 1, 1], 2.0, 5, 1, 120], [20.0, 2.15]], ['coda 11', [[1, 0, 10, 31, 24, 16, 8, 4, 2, 1, 0], 1.0, 2, 1, 30], [6.0, 0.79]], ['coda 14', [[0, 1, 0, 25, 75, 45, 36, 25, 17, 13, 6, 4, 2, 1, 0, 0], 0.5, 3, 1, 5], [4.5, 0.45]], ['coda 15', [[2, 1, 2, 1, 1, 25, 75, 60, 42, 25, 15, 12, 6, 3, 0], 0.5, 5, 3, 5], [3.5, 0.24]], ['coda 16', [[0, 1, 1, 1, 0, 23, 69, 55, 27, 21, 10, 6, 3, 1, 0], 1.0, 5, 1, 30], [8.0, 1.04]], ['coda 17', [[1, 2, 22, 68, 40, 28, 19, 15, 12, 8, 6, 4, 2, 0, 2], 2.0, 2, 2, 120], [18.0, 2.06]], ['coda 18', [[1, 1, 1, 1, 10, 31, 24, 12, 9, 7, 4, 2, 1, 1, 0, 1], 0.5, 4, 1, 5], [3.5, 0.24]], ['coda 19', [[1, 1, 11, 33, 16, 12, 6, 3, 2, 1], 2.0, 2, 3, 120], [8.0, 1.36]]], [['coda 9', [[1, 1, 17, 53, 42, 29, 23, 18, 14, 9, 6, 4, 2, 1, 1, 1, 1], 1.0, 2, 1, 30], [10.0, 1.23]], ['coda 16', [[0, 1, 1, 1, 0, 23, 69, 55, 27, 21, 10, 6, 3, 1, 0], 1.0, 5, 1, 30], [8.0, 1.04]], ['coda 21', [[0, 1, 0, 8, 26, 18, 10, 6, 3, 2, 1], 0.5, 3, 1, 5], [3.0, 0.1]], ['coda 22', [[1, 1, 0, 0, 1, 23, 69, 34, 23, 13, 9, 5, 4, 3, 2, 1, 1, 0], 0.5, 5, 1, 5], [4.5, 0.45]], ['coda 23', [[0, 2, 0, 2, 1, 16, 48, 28, 19, 15, 9, 4, 3, 1, 1, 2], 1.0, 5, 2, 30], [6.0, 0.79]], ['coda 24', [[1, 0, 1, 1, 0, 11, 35, 24, 19, 15, 9, 7, 5, 3, 2, 1, 1, 1, 0], 2.0, 5, 1, 120], [18.0, 2.06]], ['coda 25', [[1, 0, 12, 36, 18, 14, 8, 4, 3, 1, 1, 1], 1.0, 2, 2, 30], [5.0, 0.63]], ['coda 26', [[0, 0, 1, 11, 34, 17, 11, 7, 3, 1], 2.0, 3, 1, 120], [12.0, 1.71]]], [['coda 12', [[2, 1, 9, 28, 22, 13, 9, 7, 5, 4, 2, 2], 1.0, 2, 2, 30], [7.0, 0.93]], ['coda 21', [[0, 1, 0, 8, 26, 18, 10, 6, 3, 2, 1], 0.5, 3, 1, 5], [3.0, 0.1]], ['coda 28', [[1, 2, 3, 7, 21, 16, 12, 9, 5, 3, 1, 0, 0], 0.5, 3, 3, 5], [2.5, -0.06]], ['coda 29', [[0, 0, 1, 17, 53, 42, 33, 16, 12, 9, 6, 3, 2, 1], 2.0, 3, 1, 120], [18.0, 2.06]], ['coda 30', [[2, 2, 0, 1, 2, 19, 58, 34, 27, 16, 11, 7, 5, 4, 2, 1], 2.0, 5, 2, 120], [16.0, 1.96]], ['coda 31', [[2, 3, 1, 19, 59, 47, 23, 13, 10, 6, 3, 0, 1, 3], 0.5, 3, 3, 5], [3.0, 0.1]], ['coda 32', [[1, 0, 12, 38, 26, 15, 9, 4, 3, 2, 1], 0.5, 2, 2, 5], [2.5, -0.06]], ['coda 33', [[2, 0, 11, 34, 23, 16, 8, 4, 2, 1, 0, 3], 2.0, 2, 3, 120], [10.0, 1.55]]]]\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":"5ae62acaac89e754bc00326e5ab1acffdbd881b2a5df40c27e8c3873928ed48e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(envelope, dt, p_index, noise, epi_km):\n    if p_index >= len(envelope):\n        return None\n    peak = max(range(p_index, len(envelope)), key=lambda i: envelope[i])\n    end = None\n    for i in range(peak, len(envelope)):\n        if envelope[i] <= 2 * noise:\n            end = i\n            break\n    if end is None:\n        return None\n    tau = end * dt\n    if tau <= 0:\n        return None\n    md = -0.87 + 2.0 * math.log10(tau) + 0.0035 * epi_km\n    return [round(tau, 2), round(md, 2)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['coda 0', [[1, 0, 1, 1, 19, 59, 29, 23, 13, 6, 4, 2, 1], 1.0, 4, 1, 30], [7.0, 0.93]], ['coda 1', [[0, 1, 3, 3, 1, 23, 70, 49, 39, 31, 21, 14, 7, 4, 2, 3, 3, 1], 0.5, 5, 3, 5], [4.0, 0.35]], ['coda 2', [[0, 2, 26, 78, 39, 27, 21, 14, 8, 4, 2, 0], 0.5, 2, 3, 5], [3.5, 0.24]], ['coda 3', [[0, 2, 2, 0, 1, 14, 44, 30, 21, 14, 9, 7, 5, 3, 1, 2, 0, 2], 0.5, 5, 2, 5], [4.0, 0.35]], ['coda 4', [[0, 1, 1, 19, 59, 35, 21, 12, 7, 5, 2, 1], 0.5, 3, 1, 5], [3.5, 0.24]], ['coda 5', [[2, 0, 0, 24, 72, 43, 25, 17, 13, 9, 4, 3, 1, 1, 1, 1], 2.0, 3, 2, 120], [14.0, 1.84]], ['coda 6', [[1, 1, 0, 1, 0, 20, 61, 30, 24, 19, 15, 12, 8, 6, 3, 2, 1, 0, 1, 1], 2.0, 5, 1, 120], [20.0, 2.15]], ['coda 7', [[0, 0, 1, 0, 0, 16, 50, 35, 21, 12, 8, 4, 2, 1, 1], 1.0, 5, 1, 30], [7.0, 0.93]]], [['coda 3', [[0, 2, 2, 0, 1, 14, 44, 30, 21, 14, 9, 7, 5, 3, 1, 2, 0, 2], 0.5, 5, 2, 5], [4.0, 0.35]], ['coda 6', [[1, 1, 0, 1, 0, 20, 61, 30, 24, 19, 15, 12, 8, 6, 3, 2, 1, 0, 1, 1], 2.0, 5, 1, 120], [20.0, 2.15]], ['coda 7', [[0, 0, 1, 0, 0, 16, 50, 35, 21, 12, 8, 4, 2, 1, 1], 1.0, 5, 1, 30], [7.0, 0.93]], ['coda 8', [[0, 0, 1, 2, 9, 27, 18, 10, 7, 4, 2], 0.5, 4, 2, 5], [2.5, -0.06]], ['coda 9', [[1, 1, 17, 53, 42, 29, 23, 18, 14, 9, 6, 4, 2, 1, 1, 1, 1], 1.0, 2, 1, 30], [10.0, 1.23]], ['coda 10', [[1, 2, 0, 2, 10, 30, 18, 12, 7, 5, 2, 0, 1], 2.0, 4, 2, 120], [12.0, 1.71]], ['coda 11', [[1, 0, 10, 31, 24, 16, 8, 4, 2, 1, 0], 1.0, 2, 1, 30], [6.0, 0.79]], ['coda 12', [[2, 1, 9, 28, 22, 13, 9, 7, 5, 4, 2, 2], 1.0, 2, 2, 30], [7.0, 0.93]]], [['coda 6', [[1, 1, 0, 1, 0, 20, 61, 30, 24, 19, 15, 12, 8, 6, 3, 2, 1, 0, 1, 1], 2.0, 5, 1, 120], [20.0, 2.15]], ['coda 11', [[1, 0, 10, 31, 24, 16, 8, 4, 2, 1, 0], 1.0, 2, 1, 30], [6.0, 0.79]], ['coda 14', [[0, 1, 0, 25, 75, 45, 36, 25, 17, 13, 6, 4, 2, 1, 0, 0], 0.5, 3, 1, 5], [4.5, 0.45]], ['coda 15', [[2, 1, 2, 1, 1, 25, 75, 60, 42, 25, 15, 12, 6, 3, 0], 0.5, 5, 3, 5], [3.5, 0.24]], ['coda 16', [[0, 1, 1, 1, 0, 23, 69, 55, 27, 21, 10, 6, 3, 1, 0], 1.0, 5, 1, 30], [8.0, 1.04]], ['coda 17', [[1, 2, 22, 68, 40, 28, 19, 15, 12, 8, 6, 4, 2, 0, 2], 2.0, 2, 2, 120], [18.0, 2.06]], ['coda 18', [[1, 1, 1, 1, 10, 31, 24, 12, 9, 7, 4, 2, 1, 1, 0, 1], 0.5, 4, 1, 5], [3.5, 0.24]], ['coda 19', [[1, 1, 11, 33, 16, 12, 6, 3, 2, 1], 2.0, 2, 3, 120], [8.0, 1.36]]], [['coda 9', [[1, 1, 17, 53, 42, 29, 23, 18, 14, 9, 6, 4, 2, 1, 1, 1, 1], 1.0, 2, 1, 30], [10.0, 1.23]], ['coda 16', [[0, 1, 1, 1, 0, 23, 69, 55, 27, 21, 10, 6, 3, 1, 0], 1.0, 5, 1, 30], [8.0, 1.04]], ['coda 21', [[0, 1, 0, 8, 26, 18, 10, 6, 3, 2, 1], 0.5, 3, 1, 5], [3.0, 0.1]], ['coda 22', [[1, 1, 0, 0, 1, 23, 69, 34, 23, 13, 9, 5, 4, 3, 2, 1, 1, 0], 0.5, 5, 1, 5], [4.5, 0.45]], ['coda 23', [[0, 2, 0, 2, 1, 16, 48, 28, 19, 15, 9, 4, 3, 1, 1, 2], 1.0, 5, 2, 30], [6.0, 0.79]], ['coda 24', [[1, 0, 1, 1, 0, 11, 35, 24, 19, 15, 9, 7, 5, 3, 2, 1, 1, 1, 0], 2.0, 5, 1, 120], [18.0, 2.06]], ['coda 25', [[1, 0, 12, 36, 18, 14, 8, 4, 3, 1, 1, 1], 1.0, 2, 2, 30], [5.0, 0.63]], ['coda 26', [[0, 0, 1, 11, 34, 17, 11, 7, 3, 1], 2.0, 3, 1, 120], [12.0, 1.71]]], [['coda 12', [[2, 1, 9, 28, 22, 13, 9, 7, 5, 4, 2, 2], 1.0, 2, 2, 30], [7.0, 0.93]], ['coda 21', [[0, 1, 0, 8, 26, 18, 10, 6, 3, 2, 1], 0.5, 3, 1, 5], [3.0, 0.1]], ['coda 28', [[1, 2, 3, 7, 21, 16, 12, 9, 5, 3, 1, 0, 0], 0.5, 3, 3, 5], [2.5, -0.06]], ['coda 29', [[0, 0, 1, 17, 53, 42, 33, 16, 12, 9, 6, 3, 2, 1], 2.0, 3, 1, 120], [18.0, 2.06]], ['coda 30', [[2, 2, 0, 1, 2, 19, 58, 34, 27, 16, 11, 7, 5, 4, 2, 1], 2.0, 5, 2, 120], [16.0, 1.96]], ['coda 31', [[2, 3, 1, 19, 59, 47, 23, 13, 10, 6, 3, 0, 1, 3], 0.5, 3, 3, 5], [3.0, 0.1]], ['coda 32', [[1, 0, 12, 38, 26, 15, 9, 4, 3, 2, 1], 0.5, 2, 2, 5], [2.5, -0.06]], ['coda 33', [[2, 0, 11, 34, 23, 16, 8, 4, 2, 1, 0, 3], 2.0, 2, 3, 120], [10.0, 1.55]]]]\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":"Stipulated deterministic teaching model of a seismological magnitude procedure; constants and tables are fixed by the contract and no claim of agency or standards conformance is made. 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-seismic_magnitude_estimation-coda-duration-md-duration-origin","generated_at":"2026-09-29T14:48:29.877991+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Duration magnitude is robust for small events with clipped or noisy amplitudes.","root_cause":"Duration is measured from the start of the record instead of the P pick.","sha256":"78b683e5048be451775214d78e4b2f036f6a8c5c1f13f459b0cb7c064c4502a4","title":"Coda duration magnitude: duration origin · 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.867,"exit_code":1,"observations":[{"actual":[6.0,0.79],"check":"coda 0","expected":[7.0,0.93],"passed":false},{"actual":[3.5,0.24],"check":"coda 1","expected":[4.0,0.35],"passed":false},{"actual":[3.0,0.1],"check":"coda 2","expected":[3.5,0.24],"passed":false},{"actual":[3.5,0.24],"check":"coda 3","expected":[4.0,0.35],"passed":false},{"actual":[3.0,0.1],"check":"coda 4","expected":[3.5,0.24],"passed":false},{"actual":[12.0,1.71],"check":"coda 5","expected":[14.0,1.84],"passed":false},{"actual":[18.0,2.06],"check":"coda 6","expected":[20.0,2.15],"passed":false},{"actual":[6.0,0.79],"check":"coda 7","expected":[7.0,0.93],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"coda 0\", \"actual\": [6.0, 0.79], \"expected\": [7.0, 0.93], \"passed\": false}, {\"check\": \"coda 1\", \"actual\": [3.5, 0.24], \"expected\": [4.0, 0.35], \"passed\": false}, {\"check\": \"coda 2\", \"actual\": [3.0, 0.1], \"expected\": [3.5, 0.24], \"passed\": false}, {\"check\": \"coda 3\", \"actual\": [3.5, 0.24], \"expected\": [4.0, 0.35], \"passed\": false}, {\"check\": \"coda 4\", \"actual\": [3.0, 0.1], \"expected\": [3.5, 0.24], \"passed\": false}, {\"check\": \"coda 5\", \"actual\": [12.0, 1.71], \"expected\": [14.0, 1.84], \"passed\": false}, {\"check\": \"coda 6\", \"actual\": [18.0, 2.06], \"expected\": [20.0, 2.15], \"passed\": false}, {\"check\": \"coda 7\", \"actual\": [6.0, 0.79], \"expected\": [7.0, 0.93], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.612,"exit_code":1,"observations":[{"actual":[11.0,1.32],"check":"coda 0","expected":[7.0,0.93],"passed":false},{"actual":[6.5,0.77],"check":"coda 1","expected":[4.0,0.35],"passed":false},{"actual":[4.5,0.45],"check":"coda 2","expected":[3.5,0.24],"passed":false},{"actual":[6.5,0.77],"check":"coda 3","expected":[4.0,0.35],"passed":false},{"actual":[5.0,0.55],"check":"coda 4","expected":[3.5,0.24],"passed":false},{"actual":[20.0,2.15],"check":"coda 5","expected":[14.0,1.84],"passed":false},{"actual":[30.0,2.5],"check":"coda 6","expected":[20.0,2.15],"passed":false},{"actual":[12.0,1.39],"check":"coda 7","expected":[7.0,0.93],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"coda 0\", \"actual\": [11.0, 1.32], \"expected\": [7.0, 0.93], \"passed\": false}, {\"check\": \"coda 1\", \"actual\": [6.5, 0.77], \"expected\": [4.0, 0.35], \"passed\": false}, {\"check\": \"coda 2\", \"actual\": [4.5, 0.45], \"expected\": [3.5, 0.24], \"passed\": false}, {\"check\": \"coda 3\", \"actual\": [6.5, 0.77], \"expected\": [4.0, 0.35], \"passed\": false}, {\"check\": \"coda 4\", \"actual\": [5.0, 0.55], \"expected\": [3.5, 0.24], \"passed\": false}, {\"check\": \"coda 5\", \"actual\": [20.0, 2.15], \"expected\": [14.0, 1.84], \"passed\": false}, {\"check\": \"coda 6\", \"actual\": [30.0, 2.5], \"expected\": [20.0, 2.15], \"passed\": false}, {\"check\": \"coda 7\", \"actual\": [12.0, 1.39], \"expected\": [7.0, 0.93], \"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."}}