{"abstract":"Recovered symbols are wrong whenever k - 1 is odd.","category":"Error-correcting codes","checks":8,"contract":"Systematic Reed-Solomon erasure code over GF(257): the k data symbols are the values of a degree < k polynomial at x = 1..k, and any symbol is its value at another x. Given surviving shares [x, y] (duplicates allowed if they agree; conflicting duplicates return None; y is reduced mod 257), recover the k data symbols by Lagrange interpolation over the k shares with the smallest x. Fewer than k distinct x values returns None.","contract_signature":"shares, k","evaluation_group":"w2-error_correcting_codes-rs-erasure-gf257","failed_approach":"Taking the absolute difference drops the sign that GF(p) arithmetic needs.","family":"w2-error_correcting_codes-rs-erasure-gf257-lagrange-denominator","id":"FA-72241","implementations":{"attempt":{"sha256":"a1a0859c34d814a606f56a3ef9308535c098cdbf247571b142d17f2920e2aac2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shares, k):\n    p = 257\n    pts = {}\n    for x, y in shares:\n        if x in pts and pts[x] != y % p:\n            return None\n        pts[x] = y % p\n    if len(pts) < k:\n        return None\n    use = sorted(pts.items())[:k]\n    out = []\n    for t in range(1, k + 1):\n        total = 0\n        for i, (xi, yi) in enumerate(use):\n            num, den = 1, 1\n            for j, (xj, _) in enumerate(use):\n                if j != i:\n                    num = num * (t - xj) % p\n                    den = den * abs(xi - xj) % p\n            total = (total + yi * num * pow(den, p - 2, p)) % p\n        out.append(total)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [[[1, 195], [2, 163]], 2]', [[[1, 195], [2, 163]], 2], [195, 163]], ['regression [[[1, 195], [2, 163], [6, 35]], 2]', [[[1, 195], [2, 163], [6, 35]], 2], [195, 163]], ['control [[[1, 195], [1, 195]], 2]', [[[1, 195], [1, 195]], 2], None], ['control [[[1, 195], [2, 163], [1, 196]], 2]', [[[1, 195], [2, 163], [1, 196]], 2], None], ['control [[[1, 191], [5, 97], [1, 191]], 3]', [[[1, 191], [5, 97], [1, 191]], 3], None], ['control [[[1, 191], [5, 97], [3, 23], [1, 192]], 3]', [[[1, 191], [5, 97], [3, 23], [1, 192]], 3], None], ['control [[[1, 224], [5, 68], [1, 224]], 3]', [[[1, 224], [5, 68], [1, 224]], 3], None], ['control [[[1, 224], [5, 68], [4, 8], [1, 225]], 3]', [[[1, 224], [5, 68], [4, 8], [1, 225]], 3], None]], [['regression [[[8, 25], [4, 191], [3, 238], [1, 28]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28]], 4], [28, 103, 238, 191]], ['regression [[[8, 25], [4, 191], [3, 238], [1, 28], [7, 136]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28], [7, 136]], 4], [28, 103, 238, 191]], ['partial-repair [[[1, 191], [5, 97], [3, 23]], 3]', [[[1, 191], [5, 97], [3, 23]], 3], [191, 141, 23]], ['partial-repair [[[1, 191], [5, 97], [3, 23], [4, 94]], 3]', [[[1, 191], [5, 97], [3, 23], [4, 94]], 3], [191, 141, 23]], ['control [[[1, 224], [5, 68], [4, 8], [1, 225]], 3]', [[[1, 224], [5, 68], [4, 8], [1, 225]], 3], None], ['control [[[8, 25], [4, 191], [3, 238], [8, 25]], 4]', [[[8, 25], [4, 191], [3, 238], [8, 25]], 4], None], ['control [[[8, 25], [4, 191], [3, 238], [1, 28], [8, 26]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28], [8, 26]], 4], None], ['control [[[4, 14], [5, 158], [7, 75], [4, 14]], 4]', [[[4, 14], [5, 158], [7, 75], [4, 14]], 4], None]], [['regression [[[4, 14], [5, 158], [7, 75], [8, 90]], 4]', [[[4, 14], [5, 158], [7, 75], [8, 90]], 4], [215, 35, 99, 14]], ['regression [[[4, 14], [5, 158], [7, 75], [8, 90], [1, 215]], 4]', [[[4, 14], [5, 158], [7, 75], [8, 90], [1, 215]], 4], [215, 35, 99, 14]], ['partial-repair [[[1, 224], [5, 68], [4, 8]], 3]', [[[1, 224], [5, 68], [4, 8]], 3], [224, 86, 14]], ['partial-repair [[[1, 224], [5, 68], [4, 8], [6, 194]], 3]', [[[1, 224], [5, 68], [4, 8], [6, 194]], 3], [224, 86, 14]], ['control [[[4, 122], [1, 54], [2, 149], [5, 153], [4, 122]], 5]', [[[4, 122], [1, 54], [2, 149], [5, 153], [4, 122]], 5], None], ['control [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70], [4, 123]], 5]', [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70], [4, 123]], 5], None], ['control [[[4, 127], [4, 127]], 2]', [[[4, 127], [4, 127]], 2], None], ['control [[[4, 127], [5, 207], [4, 128]], 2]', [[[4, 127], [5, 207], [4, 128]], 2], None]], [['regression [[[4, 127], [5, 207]], 2]', [[[4, 127], [5, 207]], 2], [144, 224]], ['regression [[[4, 127], [5, 207], [1, 144]], 2]', [[[4, 127], [5, 207], [1, 144]], 2], [144, 224]], ['partial-repair [[[8, 25], [4, 191], [3, 238], [1, 28]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28]], 4], [28, 103, 238, 191]], ['partial-repair [[[8, 25], [4, 191], [3, 238], [1, 28], [7, 136]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28], [7, 136]], 4], [28, 103, 238, 191]], ['control [[[1, 88], [7, 101], [3, 242], [1, 89]], 3]', [[[1, 88], [7, 101], [3, 242], [1, 89]], 3], None], ['control [[[3, 5]], 2]', [[[3, 5]], 2], None], ['control [[[1, 195], [1, 195]], 2]', [[[1, 195], [1, 195]], 2], None], ['control [[[1, 195], [2, 163], [1, 196]], 2]', [[[1, 195], [2, 163], [1, 196]], 2], None]], [['regression [[[1, 10], [2, 20]], 2]', [[[1, 10], [2, 20]], 2], [10, 20]], ['regression [[[1, 7], [1, 7], [2, 9]], 2]', [[[1, 7], [1, 7], [2, 9]], 2], [7, 9]], ['partial-repair [[[4, 14], [5, 158], [7, 75], [8, 90]], 4]', [[[4, 14], [5, 158], [7, 75], [8, 90]], 4], [215, 35, 99, 14]], ['partial-repair [[[4, 14], [5, 158], [7, 75], [8, 90], [1, 215]], 4]', [[[4, 14], [5, 158], [7, 75], [8, 90], [1, 215]], 4], [215, 35, 99, 14]], ['control [[[1, 191], [5, 97], [3, 23], [1, 192]], 3]', [[[1, 191], [5, 97], [3, 23], [1, 192]], 3], None], ['control [[[1, 224], [5, 68], [1, 224]], 3]', [[[1, 224], [5, 68], [1, 224]], 3], None], ['control [[[1, 224], [5, 68], [4, 8], [1, 225]], 3]', [[[1, 224], [5, 68], [4, 8], [1, 225]], 3], None], ['control [[[8, 25], [4, 191], [3, 238], [8, 25]], 4]', [[[8, 25], [4, 191], [3, 238], [8, 25]], 4], None]]]\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":"df2adaebd6145a6b7251f3e5c7f285fa2b6d4c1ef1116a32adaaeeb06d2346ca","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(shares, k):\n    p = 257\n    pts = {}\n    for x, y in shares:\n        if x in pts and pts[x] != y % p:\n            return None\n        pts[x] = y % p\n    if len(pts) < k:\n        return None\n    use = sorted(pts.items())[:k]\n    out = []\n    for t in range(1, k + 1):\n        total = 0\n        for i, (xi, yi) in enumerate(use):\n            num, den = 1, 1\n            for j, (xj, _) in enumerate(use):\n                if j != i:\n                    num = num * (t - xj) % p\n                    den = den * (xj - xi) % p\n            total = (total + yi * num * pow(den, p - 2, p)) % p\n        out.append(total)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [[[1, 195], [2, 163]], 2]', [[[1, 195], [2, 163]], 2], [195, 163]], ['regression [[[1, 195], [2, 163], [6, 35]], 2]', [[[1, 195], [2, 163], [6, 35]], 2], [195, 163]], ['control [[[1, 195], [1, 195]], 2]', [[[1, 195], [1, 195]], 2], None], ['control [[[1, 195], [2, 163], [1, 196]], 2]', [[[1, 195], [2, 163], [1, 196]], 2], None], ['control [[[1, 191], [5, 97], [1, 191]], 3]', [[[1, 191], [5, 97], [1, 191]], 3], None], ['control [[[1, 191], [5, 97], [3, 23], [1, 192]], 3]', [[[1, 191], [5, 97], [3, 23], [1, 192]], 3], None], ['control [[[1, 224], [5, 68], [1, 224]], 3]', [[[1, 224], [5, 68], [1, 224]], 3], None], ['control [[[1, 224], [5, 68], [4, 8], [1, 225]], 3]', [[[1, 224], [5, 68], [4, 8], [1, 225]], 3], None]], [['regression [[[8, 25], [4, 191], [3, 238], [1, 28]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28]], 4], [28, 103, 238, 191]], ['regression [[[8, 25], [4, 191], [3, 238], [1, 28], [7, 136]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28], [7, 136]], 4], [28, 103, 238, 191]], ['partial-repair [[[1, 191], [5, 97], [3, 23]], 3]', [[[1, 191], [5, 97], [3, 23]], 3], [191, 141, 23]], ['partial-repair [[[1, 191], [5, 97], [3, 23], [4, 94]], 3]', [[[1, 191], [5, 97], [3, 23], [4, 94]], 3], [191, 141, 23]], ['control [[[1, 224], [5, 68], [4, 8], [1, 225]], 3]', [[[1, 224], [5, 68], [4, 8], [1, 225]], 3], None], ['control [[[8, 25], [4, 191], [3, 238], [8, 25]], 4]', [[[8, 25], [4, 191], [3, 238], [8, 25]], 4], None], ['control [[[8, 25], [4, 191], [3, 238], [1, 28], [8, 26]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28], [8, 26]], 4], None], ['control [[[4, 14], [5, 158], [7, 75], [4, 14]], 4]', [[[4, 14], [5, 158], [7, 75], [4, 14]], 4], None]], [['regression [[[4, 14], [5, 158], [7, 75], [8, 90]], 4]', [[[4, 14], [5, 158], [7, 75], [8, 90]], 4], [215, 35, 99, 14]], ['regression [[[4, 14], [5, 158], [7, 75], [8, 90], [1, 215]], 4]', [[[4, 14], [5, 158], [7, 75], [8, 90], [1, 215]], 4], [215, 35, 99, 14]], ['partial-repair [[[1, 224], [5, 68], [4, 8]], 3]', [[[1, 224], [5, 68], [4, 8]], 3], [224, 86, 14]], ['partial-repair [[[1, 224], [5, 68], [4, 8], [6, 194]], 3]', [[[1, 224], [5, 68], [4, 8], [6, 194]], 3], [224, 86, 14]], ['control [[[4, 122], [1, 54], [2, 149], [5, 153], [4, 122]], 5]', [[[4, 122], [1, 54], [2, 149], [5, 153], [4, 122]], 5], None], ['control [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70], [4, 123]], 5]', [[[4, 122], [1, 54], [2, 149], [5, 153], [3, 70], [4, 123]], 5], None], ['control [[[4, 127], [4, 127]], 2]', [[[4, 127], [4, 127]], 2], None], ['control [[[4, 127], [5, 207], [4, 128]], 2]', [[[4, 127], [5, 207], [4, 128]], 2], None]], [['regression [[[4, 127], [5, 207]], 2]', [[[4, 127], [5, 207]], 2], [144, 224]], ['regression [[[4, 127], [5, 207], [1, 144]], 2]', [[[4, 127], [5, 207], [1, 144]], 2], [144, 224]], ['partial-repair [[[8, 25], [4, 191], [3, 238], [1, 28]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28]], 4], [28, 103, 238, 191]], ['partial-repair [[[8, 25], [4, 191], [3, 238], [1, 28], [7, 136]], 4]', [[[8, 25], [4, 191], [3, 238], [1, 28], [7, 136]], 4], [28, 103, 238, 191]], ['control [[[1, 88], [7, 101], [3, 242], [1, 89]], 3]', [[[1, 88], [7, 101], [3, 242], [1, 89]], 3], None], ['control [[[3, 5]], 2]', [[[3, 5]], 2], None], ['control [[[1, 195], [1, 195]], 2]', [[[1, 195], [1, 195]], 2], None], ['control [[[1, 195], [2, 163], [1, 196]], 2]', [[[1, 195], [2, 163], [1, 196]], 2], None]], [['regression [[[1, 10], [2, 20]], 2]', [[[1, 10], [2, 20]], 2], [10, 20]], ['regression [[[1, 7], [1, 7], [2, 9]], 2]', [[[1, 7], [1, 7], [2, 9]], 2], [7, 9]], ['partial-repair [[[4, 14], [5, 158], [7, 75], [8, 90]], 4]', [[[4, 14], [5, 158], [7, 75], [8, 90]], 4], [215, 35, 99, 14]], ['partial-repair [[[4, 14], [5, 158], [7, 75], [8, 90], [1, 215]], 4]', [[[4, 14], [5, 158], [7, 75], [8, 90], [1, 215]], 4], [215, 35, 99, 14]], ['control [[[1, 191], [5, 97], [3, 23], [1, 192]], 3]', [[[1, 191], [5, 97], [3, 23], [1, 192]], 3], None], ['control [[[1, 224], [5, 68], [1, 224]], 3]', [[[1, 224], [5, 68], [1, 224]], 3], None], ['control [[[1, 224], [5, 68], [4, 8], [1, 225]], 3]', [[[1, 224], [5, 68], [4, 8], [1, 225]], 3], None], ['control [[[8, 25], [4, 191], [3, 238], [8, 25]], 4]', [[[8, 25], [4, 191], [3, 238], [8, 25]], 4], None]]]\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":"A deterministic, bounded teaching model of the named code under the stated contract; not a production codec. 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-error_correcting_codes-rs-erasure-gf257-lagrange-denominator","generated_at":"2026-09-29T14:48:36.678821+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Distributed storage rebuilds lost data fragments from any k surviving fragments.","root_cause":"The basis denominator uses (xj - xi) instead of (xi - xj).","sha256":"3b89b61ebd2650abeb24a22b4cc2b8069a86e02c475b53bec15cadde5723c75e","title":"RS erasure recovery flips the Lagrange denominator · 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.551,"exit_code":1,"observations":[{"actual":[62,163],"check":"regression [[[1, 195], [2, 163]], 2]","expected":[195,163],"passed":false},{"actual":[62,163],"check":"regression [[[1, 195], [2, 163], [6, 35]], 2]","expected":[195,163],"passed":false},{"actual":null,"check":"control [[[1, 195], [1, 195]], 2]","expected":null,"passed":true},{"actual":null,"check":"control [[[1, 195], [2, 163], [1, 196]], 2]","expected":null,"passed":true},{"actual":null,"check":"control [[[1, 191], [5, 97], [1, 191]], 3]","expected":null,"passed":true},{"actual":null,"check":"control [[[1, 191], [5, 97], [3, 23], [1, 192]], 3]","expected":null,"passed":true},{"actual":null,"check":"control [[[1, 224], [5, 68], [1, 224]], 3]","expected":null,"passed":true},{"actual":null,"check":"control [[[1, 224], [5, 68], [4, 8], [1, 225]], 3]","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [[[1, 195], [2, 163]], 2]\", \"actual\": [62, 163], \"expected\": [195, 163], \"passed\": false}, {\"check\": \"regression [[[1, 195], [2, 163], [6, 35]], 2]\", \"actual\": [62, 163], \"expected\": [195, 163], \"passed\": false}, {\"check\": \"control [[[1, 195], [1, 195]], 2]\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control [[[1, 195], [2, 163], [1, 196]], 2]\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control [[[1, 191], [5, 97], [1, 191]], 3]\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control [[[1, 191], [5, 97], [3, 23], [1, 192]], 3]\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control [[[1, 224], [5, 68], [1, 224]], 3]\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control [[[1, 224], [5, 68], [4, 8], [1, 225]], 3]\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.769,"exit_code":1,"observations":[{"actual":[62,94],"check":"regression [[[1, 195], [2, 163]], 2]","expected":[195,163],"passed":false},{"actual":[62,94],"check":"regression [[[1, 195], [2, 163], [6, 35]], 2]","expected":[195,163],"passed":false},{"actual":null,"check":"control [[[1, 195], [1, 195]], 2]","expected":null,"passed":true},{"actual":null,"check":"control [[[1, 195], [2, 163], [1, 196]], 2]","expected":null,"passed":true},{"actual":null,"check":"control [[[1, 191], [5, 97], [1, 191]], 3]","expected":null,"passed":true},{"actual":null,"check":"control [[[1, 191], [5, 97], [3, 23], [1, 192]], 3]","expected":null,"passed":true},{"actual":null,"check":"control [[[1, 224], [5, 68], [1, 224]], 3]","expected":null,"passed":true},{"actual":null,"check":"control [[[1, 224], [5, 68], [4, 8], [1, 225]], 3]","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [[[1, 195], [2, 163]], 2]\", \"actual\": [62, 94], \"expected\": [195, 163], \"passed\": false}, {\"check\": \"regression [[[1, 195], [2, 163], [6, 35]], 2]\", \"actual\": [62, 94], \"expected\": [195, 163], \"passed\": false}, {\"check\": \"control [[[1, 195], [1, 195]], 2]\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control [[[1, 195], [2, 163], [1, 196]], 2]\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control [[[1, 191], [5, 97], [1, 191]], 3]\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control [[[1, 191], [5, 97], [3, 23], [1, 192]], 3]\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control [[[1, 224], [5, 68], [1, 224]], 3]\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control [[[1, 224], [5, 68], [4, 8], [1, 225]], 3]\", \"actual\": null, \"expected\": null, \"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."}}