FA-71596 / Seismic magnitude estimation / Open access
Preferred magnitude selection: Ms saturation floor · case 01
An Ms of exactly 5.5 is passed over for ML or mb.
ROOT CAUSE
The Ms preference is exclusive at 5.5.
THE FAILURE
The Ms preference is exclusive at 5.5.
Unsuccessful approach: Lowering the floor to 5.0 prefers Ms where ML is authoritative.
Case contract
mags maps type to value (any value including 0 or negative is valid when the key is present). Choose in order: Mw; if depth > 70 km then mb; Ms if Ms >= 5.5; ML if delta <= 5 degrees; mb; Md; else None. Return [type, value].
Why this case matters
Catalogues publish one preferred magnitude chosen by a fixed authority ladder.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(mags, depth_km, delta_deg):
if "Mw" in mags:
return ["Mw", mags["Mw"]]
if depth_km > 70 and "mb" in mags:
return ["mb", mags["mb"]]
if "Ms" in mags and mags["Ms"] > 5.5:
return ["Ms", mags["Ms"]]
if delta_deg <= 5 and "ML" in mags:
return ["ML", mags["ML"]]
for t in ("mb", "Md"):
if t in mags:
return [t, mags[t]]
return None
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[["['Ms', 'Mw', 'mb'] depth 10 delta 1.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 10, 1.0], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 10 delta 5.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 10, 5.0], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 10 delta 5.5", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 10, 5.5], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 10 delta 30.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 10, 30.0], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 70 delta 1.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 70, 1.0], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 70 delta 5.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 70, 5.0], ['Mw', 6.1]], ["['ML', 'Ms', 'mb'] depth 10 delta 1.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 10, 1.0], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 10 delta 5.0", [{'Ms': 5.4, 'ML': 5.1, 'mb': 5.0}, 10, 5.0], ['ML', 5.1]]], [["['Ms', 'Mw', 'mb'] depth 70 delta 30.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 70, 30.0], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 71 delta 1.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 71, 1.0], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 71 delta 5.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 71, 5.0], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 71 delta 5.5", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 71, 5.5], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 71 delta 30.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 71, 30.0], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 300 delta 1.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 300, 1.0], ['Mw', 6.1]], ["['ML', 'Ms', 'mb'] depth 10 delta 30.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 10, 30.0], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 70 delta 5.5", [{'Ms': 5.4, 'ML': 5.1, 'mb': 5.0}, 70, 5.5], ['mb', 5.0]]], [["['Ms', 'Mw', 'mb'] depth 300 delta 5.5", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 300, 5.5], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 300 delta 30.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 300, 30.0], ['Mw', 6.1]], ["['ML', 'Ms', 'mb'] depth 10 delta 1.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 10, 1.0], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 10 delta 5.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 10, 5.0], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 10 delta 5.5", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 10, 5.5], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 10 delta 30.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 10, 30.0], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 70 delta 5.5", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 70, 5.5], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 10 delta 30.0", [{'Ms': 5.4, 'ML': 5.1, 'mb': 5.0}, 10, 30.0], ['mb', 5.0]]], [["['ML', 'Ms', 'mb'] depth 10 delta 5.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 10, 5.0], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 70 delta 5.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 70, 5.0], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 70 delta 5.5", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 70, 5.5], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 70 delta 30.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 70, 30.0], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 71 delta 1.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 71, 1.0], ['mb', 5.2]], ["['ML', 'Ms', 'mb'] depth 71 delta 5.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 71, 5.0], ['mb', 5.2]], ["['ML', 'Ms', 'mb'] depth 71 delta 5.5", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 71, 5.5], ['mb', 5.2]], ["['ML', 'Ms', 'mb'] depth 10 delta 1.0", [{'Ms': 5.4, 'ML': 5.1, 'mb': 5.0}, 10, 1.0], ['ML', 5.1]]], [["['ML', 'Ms', 'mb'] depth 70 delta 1.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 70, 1.0], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 300 delta 1.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 300, 1.0], ['mb', 5.2]], ["['ML', 'Ms', 'mb'] depth 300 delta 5.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 300, 5.0], ['mb', 5.2]], ["['ML', 'Ms', 'mb'] depth 300 delta 5.5", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 300, 5.5], ['mb', 5.2]], ["['ML', 'Ms', 'mb'] depth 300 delta 30.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 300, 30.0], ['mb', 5.2]], ["['ML', 'Ms', 'mb'] depth 10 delta 1.0", [{'Ms': 5.4, 'ML': 5.1, 'mb': 5.0}, 10, 1.0], ['ML', 5.1]], ["['ML', 'Ms', 'mb'] depth 10 delta 5.0", [{'Ms': 5.4, 'ML': 5.1, 'mb': 5.0}, 10, 5.0], ['ML', 5.1]], ["['ML', 'Ms', 'mb'] depth 70 delta 5.0", [{'Ms': 5.4, 'ML': 5.1, 'mb': 5.0}, 70, 5.0], ['ML', 5.1]]]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| ['Ms', 'Mw', 'mb'] depth 10 delta 1.0 | ['Mw', 6.1] | ['Mw', 6.1] | Passed |
| ['Ms', 'Mw', 'mb'] depth 10 delta 5.0 | ['Mw', 6.1] | ['Mw', 6.1] | Passed |
| ['Ms', 'Mw', 'mb'] depth 10 delta 5.5 | ['Mw', 6.1] | ['Mw', 6.1] | Passed |
| ['Ms', 'Mw', 'mb'] depth 10 delta 30.0 | ['Mw', 6.1] | ['Mw', 6.1] | Passed |
| ['Ms', 'Mw', 'mb'] depth 70 delta 1.0 | ['Mw', 6.1] | ['Mw', 6.1] | Passed |
| ['Ms', 'Mw', 'mb'] depth 70 delta 5.0 | ['Mw', 6.1] | ['Mw', 6.1] | Passed |
| ['ML', 'Ms', 'mb'] depth 10 delta 1.0 | ['ML', 5.4] | ['Ms', 5.5] | Failed |
| ['ML', 'Ms', 'mb'] depth 10 delta 5.0 | ['ML', 5.1] | ['ML', 5.1] | Passed |
SHA-256 / 6658fef4d4da26e53975512ea03d2a782e2e081721c9ba7b89433102e80a88c4
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(mags, depth_km, delta_deg):
if "Mw" in mags:
return ["Mw", mags["Mw"]]
if depth_km > 70 and "mb" in mags:
return ["mb", mags["mb"]]
if "Ms" in mags and mags["Ms"] >= 5.0:
return ["Ms", mags["Ms"]]
if delta_deg <= 5 and "ML" in mags:
return ["ML", mags["ML"]]
for t in ("mb", "Md"):
if t in mags:
return [t, mags[t]]
return None
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[["['Ms', 'Mw', 'mb'] depth 10 delta 1.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 10, 1.0], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 10 delta 5.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 10, 5.0], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 10 delta 5.5", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 10, 5.5], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 10 delta 30.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 10, 30.0], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 70 delta 1.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 70, 1.0], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 70 delta 5.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 70, 5.0], ['Mw', 6.1]], ["['ML', 'Ms', 'mb'] depth 10 delta 1.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 10, 1.0], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 10 delta 5.0", [{'Ms': 5.4, 'ML': 5.1, 'mb': 5.0}, 10, 5.0], ['ML', 5.1]]], [["['Ms', 'Mw', 'mb'] depth 70 delta 30.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 70, 30.0], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 71 delta 1.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 71, 1.0], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 71 delta 5.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 71, 5.0], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 71 delta 5.5", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 71, 5.5], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 71 delta 30.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 71, 30.0], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 300 delta 1.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 300, 1.0], ['Mw', 6.1]], ["['ML', 'Ms', 'mb'] depth 10 delta 30.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 10, 30.0], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 70 delta 5.5", [{'Ms': 5.4, 'ML': 5.1, 'mb': 5.0}, 70, 5.5], ['mb', 5.0]]], [["['Ms', 'Mw', 'mb'] depth 300 delta 5.5", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 300, 5.5], ['Mw', 6.1]], ["['Ms', 'Mw', 'mb'] depth 300 delta 30.0", [{'Mw': 6.1, 'Ms': 6.3, 'mb': 5.9}, 300, 30.0], ['Mw', 6.1]], ["['ML', 'Ms', 'mb'] depth 10 delta 1.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 10, 1.0], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 10 delta 5.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 10, 5.0], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 10 delta 5.5", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 10, 5.5], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 10 delta 30.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 10, 30.0], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 70 delta 5.5", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 70, 5.5], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 10 delta 30.0", [{'Ms': 5.4, 'ML': 5.1, 'mb': 5.0}, 10, 30.0], ['mb', 5.0]]], [["['ML', 'Ms', 'mb'] depth 10 delta 5.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 10, 5.0], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 70 delta 5.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 70, 5.0], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 70 delta 5.5", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 70, 5.5], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 70 delta 30.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 70, 30.0], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 71 delta 1.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 71, 1.0], ['mb', 5.2]], ["['ML', 'Ms', 'mb'] depth 71 delta 5.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 71, 5.0], ['mb', 5.2]], ["['ML', 'Ms', 'mb'] depth 71 delta 5.5", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 71, 5.5], ['mb', 5.2]], ["['ML', 'Ms', 'mb'] depth 10 delta 1.0", [{'Ms': 5.4, 'ML': 5.1, 'mb': 5.0}, 10, 1.0], ['ML', 5.1]]], [["['ML', 'Ms', 'mb'] depth 70 delta 1.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 70, 1.0], ['Ms', 5.5]], ["['ML', 'Ms', 'mb'] depth 300 delta 1.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 300, 1.0], ['mb', 5.2]], ["['ML', 'Ms', 'mb'] depth 300 delta 5.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 300, 5.0], ['mb', 5.2]], ["['ML', 'Ms', 'mb'] depth 300 delta 5.5", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 300, 5.5], ['mb', 5.2]], ["['ML', 'Ms', 'mb'] depth 300 delta 30.0", [{'Ms': 5.5, 'mb': 5.2, 'ML': 5.4}, 300, 30.0], ['mb', 5.2]], ["['ML', 'Ms', 'mb'] depth 10 delta 1.0", [{'Ms': 5.4, 'ML': 5.1, 'mb': 5.0}, 10, 1.0], ['ML', 5.1]], ["['ML', 'Ms', 'mb'] depth 10 delta 5.0", [{'Ms': 5.4, 'ML': 5.1, 'mb': 5.0}, 10, 5.0], ['ML', 5.1]], ["['ML', 'Ms', 'mb'] depth 70 delta 5.0", [{'Ms': 5.4, 'ML': 5.1, 'mb': 5.0}, 70, 5.0], ['ML', 5.1]]]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| ['Ms', 'Mw', 'mb'] depth 10 delta 1.0 | ['Mw', 6.1] | ['Mw', 6.1] | Passed |
| ['Ms', 'Mw', 'mb'] depth 10 delta 5.0 | ['Mw', 6.1] | ['Mw', 6.1] | Passed |
| ['Ms', 'Mw', 'mb'] depth 10 delta 5.5 | ['Mw', 6.1] | ['Mw', 6.1] | Passed |
| ['Ms', 'Mw', 'mb'] depth 10 delta 30.0 | ['Mw', 6.1] | ['Mw', 6.1] | Passed |
| ['Ms', 'Mw', 'mb'] depth 70 delta 1.0 | ['Mw', 6.1] | ['Mw', 6.1] | Passed |
| ['Ms', 'Mw', 'mb'] depth 70 delta 5.0 | ['Mw', 6.1] | ['Mw', 6.1] | Passed |
| ['ML', 'Ms', 'mb'] depth 10 delta 1.0 | ['Ms', 5.5] | ['Ms', 5.5] | Passed |
| ['ML', 'Ms', 'mb'] depth 10 delta 5.0 | ['Ms', 5.4] | ['ML', 5.1] | Failed |
SHA-256 / 7bd8a4ec5312d38304bc18c58c4426ef13ca05c4e172df94210097b7fa5d5186
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:48:31.046235+00:00.
Case digest / 17b40f49daa4804a4cc89cd737a64e2866b58770b24f889773c6dbe5368fa2a5