{"abstract":"Multi-symbol errors are \"corrected\" at a wrapped position.","category":"Error-correcting codes","checks":8,"contract":"Correct at most one symbol error in a Reed-Solomon codeword with two parity symbols over GF(2^8) (0x11D, roots alpha^0 and alpha^1, alpha = 2). msg lists coefficients highest degree first, so index n-1-i holds degree i. With S0 = msg(1) and S1 = msg(alpha): both zero -> clean; one zero -> uncorrectable; else the error degree is log(S1/S0), which must be < n, and the error value is S0. Return [corrected symbols or None, status].","evaluation_group":"w2-error_correcting_codes-rs-single-error","failed_approach":"Allowing loc == n still wraps to the last symbol.","family":"w2-error_correcting_codes-rs-single-error-locator-range","id":"FA-72021","implementations":{"attempt":{"sha256":"4e64bb63a9c8140e617edafd57485c96b0127e36569f65500c320e054075a6c7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(msg):\n    EXP, LOG = [0] * 512, [0] * 256\n    x = 1\n    for i in range(255):\n        EXP[i] = EXP[i + 255] = x\n        LOG[x] = i\n        x <<= 1\n        if x & 0x100:\n            x ^= 0x11D\n    def mul(a, b):\n        return 0 if a == 0 or b == 0 else EXP[LOG[a] + LOG[b]]\n    \n    n = len(msg)\n    def ev(root):\n        v = 0\n        for coef in msg:\n            v = mul(v, root) ^ coef\n        return v\n    s0, s1 = ev(1), ev(2)\n    if s0 == 0 and s1 == 0:\n        return [list(msg), 'clean']\n    if s0 == 0 or s1 == 0:\n        return [None, 'uncorrectable']\n    loc = (LOG[s1] - LOG[s0]) % 255\n    if loc > n:\n        return [None, 'uncorrectable']\n    out = list(msg)\n    out[n - 1 - loc] ^= s0\n    return [out, 'corrected']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [[101, 113, 37, 242, 195, 183, 157, 181, 211, 30, 108, 98, 222]]', [[101, 113, 37, 242, 195, 183, 157, 181, 211, 30, 108, 98, 222]], [None, 'uncorrectable']], ['regression [[178, 163, 216, 203, 246, 61, 83, 52, 85, 245, 59, 90, 113, 95]]', [[178, 163, 216, 203, 246, 61, 83, 52, 85, 245, 59, 90, 113, 95]], [None, 'uncorrectable']], ['partial-repair [[207, 121, 195, 225]]', [[207, 121, 195, 225]], [None, 'uncorrectable']], ['partial-repair [[177, 230, 201, 198, 207, 184, 216]]', [[177, 230, 201, 198, 207, 184, 216]], [None, 'uncorrectable']], ['control [[197, 174, 1, 105, 3]]', [[197, 174, 1, 105, 3]], [[197, 174, 1, 105, 3], 'clean']], ['control [[197, 174, 1, 72, 3]]', [[197, 174, 1, 72, 3]], [[197, 174, 1, 105, 3], 'corrected']], ['control [[246, 174, 1, 105, 3]]', [[246, 174, 1, 105, 3]], [[197, 174, 1, 105, 3], 'corrected']], ['control [[170, 170, 73, 201, 214, 86]]', [[170, 170, 73, 201, 214, 86]], [[170, 170, 73, 201, 214, 86], 'clean']]], [['regression [[5, 251, 11, 179, 254, 41, 48, 5, 217, 18, 31]]', [[5, 251, 11, 179, 254, 41, 48, 5, 217, 18, 31]], [None, 'uncorrectable']], ['regression [[234, 110, 32, 238, 251, 206, 1, 255, 255, 76, 117]]', [[234, 110, 32, 238, 251, 206, 1, 255, 255, 76, 117]], [None, 'uncorrectable']], ['partial-repair [[207, 121, 195, 225]]', [[207, 121, 195, 225]], [None, 'uncorrectable']], ['partial-repair [[177, 230, 201, 198, 207, 184, 216]]', [[177, 230, 201, 198, 207, 184, 216]], [None, 'uncorrectable']], ['control [[159, 170, 73, 201, 214, 86]]', [[159, 170, 73, 201, 214, 86]], [[170, 170, 73, 201, 214, 86], 'corrected']], ['control [[95, 129, 216, 244, 158, 37, 73]]', [[95, 129, 216, 244, 158, 37, 73]], [[95, 129, 216, 244, 158, 37, 73], 'clean']], ['control [[95, 129, 216, 244, 184, 37, 73]]', [[95, 129, 216, 244, 184, 37, 73]], [[95, 129, 216, 244, 158, 37, 73], 'corrected']], ['control [[100, 129, 216, 244, 158, 37, 73]]', [[100, 129, 216, 244, 158, 37, 73]], [[95, 129, 216, 244, 158, 37, 73], 'corrected']]], [['regression [[177, 230, 201, 198, 207, 184, 216]]', [[177, 230, 201, 198, 207, 184, 216]], [None, 'uncorrectable']], ['regression [[47, 164, 158, 90, 100, 125, 111]]', [[47, 164, 158, 90, 100, 125, 111]], [None, 'uncorrectable']], ['partial-repair [[207, 121, 195, 225]]', [[207, 121, 195, 225]], [None, 'uncorrectable']], ['control [[29, 68, 82, 251, 193, 203, 215, 101]]', [[29, 68, 82, 251, 193, 203, 215, 101]], [[29, 68, 82, 179, 193, 203, 215, 101], 'corrected']], ['control [[160, 68, 82, 179, 193, 203, 215, 101]]', [[160, 68, 82, 179, 193, 203, 215, 101]], [[29, 68, 82, 179, 193, 203, 215, 101], 'corrected']], ['control [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249]]', [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249]], [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249], 'clean']], ['control [[249, 14, 133, 199, 50, 207, 133, 156, 190, 249]]', [[249, 14, 133, 199, 50, 207, 133, 156, 190, 249]], [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249], 'corrected']], ['control [[101, 14, 133, 199, 50, 217, 133, 156, 190, 249]]', [[101, 14, 133, 199, 50, 217, 133, 156, 190, 249]], [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249], 'corrected']]], [['regression [[178, 163, 216, 203, 246, 61, 83, 52, 85, 245, 59, 90, 113, 95]]', [[178, 163, 216, 203, 246, 61, 83, 52, 85, 245, 59, 90, 113, 95]], [None, 'uncorrectable']], ['regression [[168, 112, 224, 76, 56, 53, 214, 250, 9, 141, 18]]', [[168, 112, 224, 76, 56, 53, 214, 250, 9, 141, 18]], [None, 'uncorrectable']], ['partial-repair [[207, 121, 195, 225]]', [[207, 121, 195, 225]], [None, 'uncorrectable']], ['partial-repair [[177, 230, 201, 198, 207, 184, 216]]', [[177, 230, 201, 198, 207, 184, 216]], [None, 'uncorrectable']], ['control [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]]', [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]], [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52], 'clean']], ['control [[11, 173, 115, 26, 153, 95, 50, 118, 184, 32, 84, 52]]', [[11, 173, 115, 26, 153, 95, 50, 118, 184, 32, 84, 52]], [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52], 'corrected']], ['control [[215, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]]', [[215, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]], [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52], 'corrected']], ['control [[83, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142]]', [[83, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142]], [[83, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142], 'clean']]], [['regression [[234, 110, 32, 238, 251, 206, 1, 255, 255, 76, 117]]', [[234, 110, 32, 238, 251, 206, 1, 255, 255, 76, 117]], [None, 'uncorrectable']], ['regression [[207, 121, 195, 225]]', [[207, 121, 195, 225]], [None, 'uncorrectable']], ['partial-repair [[177, 230, 201, 198, 207, 184, 216]]', [[177, 230, 201, 198, 207, 184, 216]], [None, 'uncorrectable']], ['control [[25, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142]]', [[25, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142]], [[83, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142], 'corrected']], ['control [[161, 66, 213, 76, 223, 165]]', [[161, 66, 213, 76, 223, 165]], [[161, 66, 213, 76, 223, 165], 'clean']], ['control [[161, 66, 213, 76, 66, 165]]', [[161, 66, 213, 76, 66, 165]], [[161, 66, 213, 76, 223, 165], 'corrected']], ['control [[194, 66, 213, 76, 223, 165]]', [[194, 66, 213, 76, 223, 165]], [[161, 66, 213, 76, 223, 165], 'corrected']], ['control [[161, 66, 213, 86, 235, 165]]', [[161, 66, 213, 86, 235, 165]], [None, 'uncorrectable']]]]\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":"7ba562b982b5a2831b2778fd20d46d769bc329649da78ce42f7304510f7bda11","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(msg):\n    EXP, LOG = [0] * 512, [0] * 256\n    x = 1\n    for i in range(255):\n        EXP[i] = EXP[i + 255] = x\n        LOG[x] = i\n        x <<= 1\n        if x & 0x100:\n            x ^= 0x11D\n    def mul(a, b):\n        return 0 if a == 0 or b == 0 else EXP[LOG[a] + LOG[b]]\n    \n    n = len(msg)\n    def ev(root):\n        v = 0\n        for coef in msg:\n            v = mul(v, root) ^ coef\n        return v\n    s0, s1 = ev(1), ev(2)\n    if s0 == 0 and s1 == 0:\n        return [list(msg), 'clean']\n    if s0 == 0 or s1 == 0:\n        return [None, 'uncorrectable']\n    loc = (LOG[s1] - LOG[s0]) % 255\n    out = list(msg)\n    out[n - 1 - loc] ^= s0\n    return [out, 'corrected']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [[101, 113, 37, 242, 195, 183, 157, 181, 211, 30, 108, 98, 222]]', [[101, 113, 37, 242, 195, 183, 157, 181, 211, 30, 108, 98, 222]], [None, 'uncorrectable']], ['regression [[178, 163, 216, 203, 246, 61, 83, 52, 85, 245, 59, 90, 113, 95]]', [[178, 163, 216, 203, 246, 61, 83, 52, 85, 245, 59, 90, 113, 95]], [None, 'uncorrectable']], ['partial-repair [[207, 121, 195, 225]]', [[207, 121, 195, 225]], [None, 'uncorrectable']], ['partial-repair [[177, 230, 201, 198, 207, 184, 216]]', [[177, 230, 201, 198, 207, 184, 216]], [None, 'uncorrectable']], ['control [[197, 174, 1, 105, 3]]', [[197, 174, 1, 105, 3]], [[197, 174, 1, 105, 3], 'clean']], ['control [[197, 174, 1, 72, 3]]', [[197, 174, 1, 72, 3]], [[197, 174, 1, 105, 3], 'corrected']], ['control [[246, 174, 1, 105, 3]]', [[246, 174, 1, 105, 3]], [[197, 174, 1, 105, 3], 'corrected']], ['control [[170, 170, 73, 201, 214, 86]]', [[170, 170, 73, 201, 214, 86]], [[170, 170, 73, 201, 214, 86], 'clean']]], [['regression [[5, 251, 11, 179, 254, 41, 48, 5, 217, 18, 31]]', [[5, 251, 11, 179, 254, 41, 48, 5, 217, 18, 31]], [None, 'uncorrectable']], ['regression [[234, 110, 32, 238, 251, 206, 1, 255, 255, 76, 117]]', [[234, 110, 32, 238, 251, 206, 1, 255, 255, 76, 117]], [None, 'uncorrectable']], ['partial-repair [[207, 121, 195, 225]]', [[207, 121, 195, 225]], [None, 'uncorrectable']], ['partial-repair [[177, 230, 201, 198, 207, 184, 216]]', [[177, 230, 201, 198, 207, 184, 216]], [None, 'uncorrectable']], ['control [[159, 170, 73, 201, 214, 86]]', [[159, 170, 73, 201, 214, 86]], [[170, 170, 73, 201, 214, 86], 'corrected']], ['control [[95, 129, 216, 244, 158, 37, 73]]', [[95, 129, 216, 244, 158, 37, 73]], [[95, 129, 216, 244, 158, 37, 73], 'clean']], ['control [[95, 129, 216, 244, 184, 37, 73]]', [[95, 129, 216, 244, 184, 37, 73]], [[95, 129, 216, 244, 158, 37, 73], 'corrected']], ['control [[100, 129, 216, 244, 158, 37, 73]]', [[100, 129, 216, 244, 158, 37, 73]], [[95, 129, 216, 244, 158, 37, 73], 'corrected']]], [['regression [[177, 230, 201, 198, 207, 184, 216]]', [[177, 230, 201, 198, 207, 184, 216]], [None, 'uncorrectable']], ['regression [[47, 164, 158, 90, 100, 125, 111]]', [[47, 164, 158, 90, 100, 125, 111]], [None, 'uncorrectable']], ['partial-repair [[207, 121, 195, 225]]', [[207, 121, 195, 225]], [None, 'uncorrectable']], ['control [[29, 68, 82, 251, 193, 203, 215, 101]]', [[29, 68, 82, 251, 193, 203, 215, 101]], [[29, 68, 82, 179, 193, 203, 215, 101], 'corrected']], ['control [[160, 68, 82, 179, 193, 203, 215, 101]]', [[160, 68, 82, 179, 193, 203, 215, 101]], [[29, 68, 82, 179, 193, 203, 215, 101], 'corrected']], ['control [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249]]', [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249]], [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249], 'clean']], ['control [[249, 14, 133, 199, 50, 207, 133, 156, 190, 249]]', [[249, 14, 133, 199, 50, 207, 133, 156, 190, 249]], [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249], 'corrected']], ['control [[101, 14, 133, 199, 50, 217, 133, 156, 190, 249]]', [[101, 14, 133, 199, 50, 217, 133, 156, 190, 249]], [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249], 'corrected']]], [['regression [[178, 163, 216, 203, 246, 61, 83, 52, 85, 245, 59, 90, 113, 95]]', [[178, 163, 216, 203, 246, 61, 83, 52, 85, 245, 59, 90, 113, 95]], [None, 'uncorrectable']], ['regression [[168, 112, 224, 76, 56, 53, 214, 250, 9, 141, 18]]', [[168, 112, 224, 76, 56, 53, 214, 250, 9, 141, 18]], [None, 'uncorrectable']], ['partial-repair [[207, 121, 195, 225]]', [[207, 121, 195, 225]], [None, 'uncorrectable']], ['partial-repair [[177, 230, 201, 198, 207, 184, 216]]', [[177, 230, 201, 198, 207, 184, 216]], [None, 'uncorrectable']], ['control [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]]', [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]], [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52], 'clean']], ['control [[11, 173, 115, 26, 153, 95, 50, 118, 184, 32, 84, 52]]', [[11, 173, 115, 26, 153, 95, 50, 118, 184, 32, 84, 52]], [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52], 'corrected']], ['control [[215, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]]', [[215, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]], [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52], 'corrected']], ['control [[83, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142]]', [[83, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142]], [[83, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142], 'clean']]], [['regression [[234, 110, 32, 238, 251, 206, 1, 255, 255, 76, 117]]', [[234, 110, 32, 238, 251, 206, 1, 255, 255, 76, 117]], [None, 'uncorrectable']], ['regression [[207, 121, 195, 225]]', [[207, 121, 195, 225]], [None, 'uncorrectable']], ['partial-repair [[177, 230, 201, 198, 207, 184, 216]]', [[177, 230, 201, 198, 207, 184, 216]], [None, 'uncorrectable']], ['control [[25, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142]]', [[25, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142]], [[83, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142], 'corrected']], ['control [[161, 66, 213, 76, 223, 165]]', [[161, 66, 213, 76, 223, 165]], [[161, 66, 213, 76, 223, 165], 'clean']], ['control [[161, 66, 213, 76, 66, 165]]', [[161, 66, 213, 76, 66, 165]], [[161, 66, 213, 76, 223, 165], 'corrected']], ['control [[194, 66, 213, 76, 223, 165]]', [[194, 66, 213, 76, 223, 165]], [[161, 66, 213, 76, 223, 165], 'corrected']], ['control [[161, 66, 213, 86, 235, 165]]', [[161, 66, 213, 86, 235, 165]], [None, 'uncorrectable']]]]\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"},"fixed":{"sha256":"52bb395d8afb6d8c759aa1499d63680cca89a05860309e6aa5f9b9ba4691a41a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(msg):\n    EXP, LOG = [0] * 512, [0] * 256\n    x = 1\n    for i in range(255):\n        EXP[i] = EXP[i + 255] = x\n        LOG[x] = i\n        x <<= 1\n        if x & 0x100:\n            x ^= 0x11D\n    def mul(a, b):\n        return 0 if a == 0 or b == 0 else EXP[LOG[a] + LOG[b]]\n    \n    n = len(msg)\n    def ev(root):\n        v = 0\n        for coef in msg:\n            v = mul(v, root) ^ coef\n        return v\n    s0, s1 = ev(1), ev(2)\n    if s0 == 0 and s1 == 0:\n        return [list(msg), 'clean']\n    if s0 == 0 or s1 == 0:\n        return [None, 'uncorrectable']\n    loc = (LOG[s1] - LOG[s0]) % 255\n    if loc >= n:\n        return [None, 'uncorrectable']\n    out = list(msg)\n    out[n - 1 - loc] ^= s0\n    return [out, 'corrected']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [[101, 113, 37, 242, 195, 183, 157, 181, 211, 30, 108, 98, 222]]', [[101, 113, 37, 242, 195, 183, 157, 181, 211, 30, 108, 98, 222]], [None, 'uncorrectable']], ['regression [[178, 163, 216, 203, 246, 61, 83, 52, 85, 245, 59, 90, 113, 95]]', [[178, 163, 216, 203, 246, 61, 83, 52, 85, 245, 59, 90, 113, 95]], [None, 'uncorrectable']], ['partial-repair [[207, 121, 195, 225]]', [[207, 121, 195, 225]], [None, 'uncorrectable']], ['partial-repair [[177, 230, 201, 198, 207, 184, 216]]', [[177, 230, 201, 198, 207, 184, 216]], [None, 'uncorrectable']], ['control [[197, 174, 1, 105, 3]]', [[197, 174, 1, 105, 3]], [[197, 174, 1, 105, 3], 'clean']], ['control [[197, 174, 1, 72, 3]]', [[197, 174, 1, 72, 3]], [[197, 174, 1, 105, 3], 'corrected']], ['control [[246, 174, 1, 105, 3]]', [[246, 174, 1, 105, 3]], [[197, 174, 1, 105, 3], 'corrected']], ['control [[170, 170, 73, 201, 214, 86]]', [[170, 170, 73, 201, 214, 86]], [[170, 170, 73, 201, 214, 86], 'clean']]], [['regression [[5, 251, 11, 179, 254, 41, 48, 5, 217, 18, 31]]', [[5, 251, 11, 179, 254, 41, 48, 5, 217, 18, 31]], [None, 'uncorrectable']], ['regression [[234, 110, 32, 238, 251, 206, 1, 255, 255, 76, 117]]', [[234, 110, 32, 238, 251, 206, 1, 255, 255, 76, 117]], [None, 'uncorrectable']], ['partial-repair [[207, 121, 195, 225]]', [[207, 121, 195, 225]], [None, 'uncorrectable']], ['partial-repair [[177, 230, 201, 198, 207, 184, 216]]', [[177, 230, 201, 198, 207, 184, 216]], [None, 'uncorrectable']], ['control [[159, 170, 73, 201, 214, 86]]', [[159, 170, 73, 201, 214, 86]], [[170, 170, 73, 201, 214, 86], 'corrected']], ['control [[95, 129, 216, 244, 158, 37, 73]]', [[95, 129, 216, 244, 158, 37, 73]], [[95, 129, 216, 244, 158, 37, 73], 'clean']], ['control [[95, 129, 216, 244, 184, 37, 73]]', [[95, 129, 216, 244, 184, 37, 73]], [[95, 129, 216, 244, 158, 37, 73], 'corrected']], ['control [[100, 129, 216, 244, 158, 37, 73]]', [[100, 129, 216, 244, 158, 37, 73]], [[95, 129, 216, 244, 158, 37, 73], 'corrected']]], [['regression [[177, 230, 201, 198, 207, 184, 216]]', [[177, 230, 201, 198, 207, 184, 216]], [None, 'uncorrectable']], ['regression [[47, 164, 158, 90, 100, 125, 111]]', [[47, 164, 158, 90, 100, 125, 111]], [None, 'uncorrectable']], ['partial-repair [[207, 121, 195, 225]]', [[207, 121, 195, 225]], [None, 'uncorrectable']], ['control [[29, 68, 82, 251, 193, 203, 215, 101]]', [[29, 68, 82, 251, 193, 203, 215, 101]], [[29, 68, 82, 179, 193, 203, 215, 101], 'corrected']], ['control [[160, 68, 82, 179, 193, 203, 215, 101]]', [[160, 68, 82, 179, 193, 203, 215, 101]], [[29, 68, 82, 179, 193, 203, 215, 101], 'corrected']], ['control [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249]]', [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249]], [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249], 'clean']], ['control [[249, 14, 133, 199, 50, 207, 133, 156, 190, 249]]', [[249, 14, 133, 199, 50, 207, 133, 156, 190, 249]], [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249], 'corrected']], ['control [[101, 14, 133, 199, 50, 217, 133, 156, 190, 249]]', [[101, 14, 133, 199, 50, 217, 133, 156, 190, 249]], [[249, 14, 133, 199, 50, 217, 133, 156, 190, 249], 'corrected']]], [['regression [[178, 163, 216, 203, 246, 61, 83, 52, 85, 245, 59, 90, 113, 95]]', [[178, 163, 216, 203, 246, 61, 83, 52, 85, 245, 59, 90, 113, 95]], [None, 'uncorrectable']], ['regression [[168, 112, 224, 76, 56, 53, 214, 250, 9, 141, 18]]', [[168, 112, 224, 76, 56, 53, 214, 250, 9, 141, 18]], [None, 'uncorrectable']], ['partial-repair [[207, 121, 195, 225]]', [[207, 121, 195, 225]], [None, 'uncorrectable']], ['partial-repair [[177, 230, 201, 198, 207, 184, 216]]', [[177, 230, 201, 198, 207, 184, 216]], [None, 'uncorrectable']], ['control [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]]', [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]], [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52], 'clean']], ['control [[11, 173, 115, 26, 153, 95, 50, 118, 184, 32, 84, 52]]', [[11, 173, 115, 26, 153, 95, 50, 118, 184, 32, 84, 52]], [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52], 'corrected']], ['control [[215, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]]', [[215, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52]], [[11, 173, 115, 26, 44, 95, 50, 118, 184, 32, 84, 52], 'corrected']], ['control [[83, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142]]', [[83, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142]], [[83, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142], 'clean']]], [['regression [[234, 110, 32, 238, 251, 206, 1, 255, 255, 76, 117]]', [[234, 110, 32, 238, 251, 206, 1, 255, 255, 76, 117]], [None, 'uncorrectable']], ['regression [[207, 121, 195, 225]]', [[207, 121, 195, 225]], [None, 'uncorrectable']], ['partial-repair [[177, 230, 201, 198, 207, 184, 216]]', [[177, 230, 201, 198, 207, 184, 216]], [None, 'uncorrectable']], ['control [[25, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142]]', [[25, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142]], [[83, 135, 139, 74, 148, 233, 28, 230, 113, 155, 213, 155, 184, 142], 'corrected']], ['control [[161, 66, 213, 76, 223, 165]]', [[161, 66, 213, 76, 223, 165]], [[161, 66, 213, 76, 223, 165], 'clean']], ['control [[161, 66, 213, 76, 66, 165]]', [[161, 66, 213, 76, 66, 165]], [[161, 66, 213, 76, 223, 165], 'corrected']], ['control [[194, 66, 213, 76, 223, 165]]', [[194, 66, 213, 76, 223, 165]], [[161, 66, 213, 76, 223, 165], 'corrected']], ['control [[161, 66, 213, 86, 235, 165]]', [[161, 66, 213, 86, 235, 165]], [None, 'uncorrectable']]]]\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-single-error-locator-range","generated_at":"2026-09-29T14:48:34.803247+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Short-block RS codes in barcodes and radio headers correct a single corrupted symbol cheaply.","repair":"Treat a locator degree >= n as uncorrectable.","root_cause":"The locator range check is missing, so negative indices wrap around.","sha256":"6455851595907b8f5e71da99320c1b0d3696b54416cf861ab1cd510bd53c103f","title":"RS single-error correction accepts a locator beyond the block · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.143,"exit_code":1,"observations":[{"actual":[null,"uncorrectable"],"check":"regression [[101, 113, 37, 242, 195, 183, 157, 181, 211, 30, 108, 98, 222]]","expected":[null,"uncorrectable"],"passed":true},{"actual":[null,"uncorrectable"],"check":"regression [[178, 163, 216, 203, 246, 61, 83, 52, 85, 245, 59, 90, 113, 95]]","expected":[null,"uncorrectable"],"passed":true},{"actual":[[207,121,195,117],"corrected"],"check":"partial-repair [[207, 121, 195, 225]]","expected":[null,"uncorrectable"],"passed":false},{"actual":[[177,230,201,198,207,184,47],"corrected"],"check":"partial-repair [[177, 230, 201, 198, 207, 184, 216]]","expected":[null,"uncorrectable"],"passed":false},{"actual":[[197,174,1,105,3],"clean"],"check":"control [[197, 174, 1, 105, 3]]","expected":[[197,174,1,105,3],"clean"],"passed":true},{"actual":[[197,174,1,105,3],"corrected"],"check":"control [[197, 174, 1, 72, 3]]","expected":[[197,174,1,105,3],"corrected"],"passed":true},{"actual":[[197,174,1,105,3],"corrected"],"check":"control [[246, 174, 1, 105, 3]]","expected":[[197,174,1,105,3],"corrected"],"passed":true},{"actual":[[170,170,73,201,214,86],"clean"],"check":"control [[170, 170, 73, 201, 214, 86]]","expected":[[170,170,73,201,214,86],"clean"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [[101, 113, 37, 242, 195, 183, 157, 181, 211, 30, 108, 98, 222]]\", \"actual\": [null, \"uncorrectable\"], \"expected\": [null, \"uncorrectable\"], \"passed\": true}, {\"check\": \"regression [[178, 163, 216, 203, 246, 61, 83, 52, 85, 245, 59, 90, 113, 95]]\", \"actual\": [null, \"uncorrectable\"], \"expected\": [null, \"uncorrectable\"], \"passed\": true}, {\"check\": \"partial-repair [[207, 121, 195, 225]]\", \"actual\": [[207, 121, 195, 117], \"corrected\"], \"expected\": [null, \"uncorrectable\"], \"passed\": false}, {\"check\": \"partial-repair [[177, 230, 201, 198, 207, 184, 216]]\", \"actual\": [[177, 230, 201, 198, 207, 184, 47], \"corrected\"], \"expected\": [null, \"uncorrectable\"], \"passed\": false}, {\"check\": \"control [[197, 174, 1, 105, 3]]\", \"actual\": [[197, 174, 1, 105, 3], \"clean\"], \"expected\": [[197, 174, 1, 105, 3], \"clean\"], \"passed\": true}, {\"check\": \"control [[197, 174, 1, 72, 3]]\", \"actual\": [[197, 174, 1, 105, 3], \"corrected\"], \"expected\": [[197, 174, 1, 105, 3], \"corrected\"], \"passed\": true}, {\"check\": \"control [[246, 174, 1, 105, 3]]\", \"actual\": [[197, 174, 1, 105, 3], \"corrected\"], \"expected\": [[197, 174, 1, 105, 3], \"corrected\"], \"passed\": true}, {\"check\": \"control [[170, 170, 73, 201, 214, 86]]\", \"actual\": [[170, 170, 73, 201, 214, 86], \"clean\"], \"expected\": [[170, 170, 73, 201, 214, 86], \"clean\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.772,"exit_code":1,"observations":[{"actual":[[101,113,37,242,195,183,157,181,211,30,238,98,222],"corrected"],"check":"regression [[101, 113, 37, 242, 195, 183, 157, 181, 211, 30, 108, 98, 222]]","expected":[null,"uncorrectable"],"passed":false},{"actual":[[178,226,216,203,246,61,83,52,85,245,59,90,113,95],"corrected"],"check":"regression [[178, 163, 216, 203, 246, 61, 83, 52, 85, 245, 59, 90, 113, 95]]","expected":[null,"uncorrectable"],"passed":false},{"actual":[[207,121,195,117],"corrected"],"check":"partial-repair [[207, 121, 195, 225]]","expected":[null,"uncorrectable"],"passed":false},{"actual":[[177,230,201,198,207,184,47],"corrected"],"check":"partial-repair [[177, 230, 201, 198, 207, 184, 216]]","expected":[null,"uncorrectable"],"passed":false},{"actual":[[197,174,1,105,3],"clean"],"check":"control [[197, 174, 1, 105, 3]]","expected":[[197,174,1,105,3],"clean"],"passed":true},{"actual":[[197,174,1,105,3],"corrected"],"check":"control [[197, 174, 1, 72, 3]]","expected":[[197,174,1,105,3],"corrected"],"passed":true},{"actual":[[197,174,1,105,3],"corrected"],"check":"control [[246, 174, 1, 105, 3]]","expected":[[197,174,1,105,3],"corrected"],"passed":true},{"actual":[[170,170,73,201,214,86],"clean"],"check":"control [[170, 170, 73, 201, 214, 86]]","expected":[[170,170,73,201,214,86],"clean"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [[101, 113, 37, 242, 195, 183, 157, 181, 211, 30, 108, 98, 222]]\", \"actual\": [[101, 113, 37, 242, 195, 183, 157, 181, 211, 30, 238, 98, 222], \"corrected\"], \"expected\": [null, \"uncorrectable\"], \"passed\": false}, {\"check\": \"regression [[178, 163, 216, 203, 246, 61, 83, 52, 85, 245, 59, 90, 113, 95]]\", \"actual\": [[178, 226, 216, 203, 246, 61, 83, 52, 85, 245, 59, 90, 113, 95], \"corrected\"], \"expected\": [null, \"uncorrectable\"], \"passed\": false}, {\"check\": \"partial-repair [[207, 121, 195, 225]]\", \"actual\": [[207, 121, 195, 117], \"corrected\"], \"expected\": [null, \"uncorrectable\"], \"passed\": false}, {\"check\": \"partial-repair [[177, 230, 201, 198, 207, 184, 216]]\", \"actual\": [[177, 230, 201, 198, 207, 184, 47], \"corrected\"], \"expected\": [null, \"uncorrectable\"], \"passed\": false}, {\"check\": \"control [[197, 174, 1, 105, 3]]\", \"actual\": [[197, 174, 1, 105, 3], \"clean\"], \"expected\": [[197, 174, 1, 105, 3], \"clean\"], \"passed\": true}, {\"check\": \"control [[197, 174, 1, 72, 3]]\", \"actual\": [[197, 174, 1, 105, 3], \"corrected\"], \"expected\": [[197, 174, 1, 105, 3], \"corrected\"], \"passed\": true}, {\"check\": \"control [[246, 174, 1, 105, 3]]\", \"actual\": [[197, 174, 1, 105, 3], \"corrected\"], \"expected\": [[197, 174, 1, 105, 3], \"corrected\"], \"passed\": true}, {\"check\": \"control [[170, 170, 73, 201, 214, 86]]\", \"actual\": [[170, 170, 73, 201, 214, 86], \"clean\"], \"expected\": [[170, 170, 73, 201, 214, 86], \"clean\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.313,"exit_code":0,"observations":[{"actual":[null,"uncorrectable"],"check":"regression [[101, 113, 37, 242, 195, 183, 157, 181, 211, 30, 108, 98, 222]]","expected":[null,"uncorrectable"],"passed":true},{"actual":[null,"uncorrectable"],"check":"regression [[178, 163, 216, 203, 246, 61, 83, 52, 85, 245, 59, 90, 113, 95]]","expected":[null,"uncorrectable"],"passed":true},{"actual":[null,"uncorrectable"],"check":"partial-repair [[207, 121, 195, 225]]","expected":[null,"uncorrectable"],"passed":true},{"actual":[null,"uncorrectable"],"check":"partial-repair [[177, 230, 201, 198, 207, 184, 216]]","expected":[null,"uncorrectable"],"passed":true},{"actual":[[197,174,1,105,3],"clean"],"check":"control [[197, 174, 1, 105, 3]]","expected":[[197,174,1,105,3],"clean"],"passed":true},{"actual":[[197,174,1,105,3],"corrected"],"check":"control [[197, 174, 1, 72, 3]]","expected":[[197,174,1,105,3],"corrected"],"passed":true},{"actual":[[197,174,1,105,3],"corrected"],"check":"control [[246, 174, 1, 105, 3]]","expected":[[197,174,1,105,3],"corrected"],"passed":true},{"actual":[[170,170,73,201,214,86],"clean"],"check":"control [[170, 170, 73, 201, 214, 86]]","expected":[[170,170,73,201,214,86],"clean"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [[101, 113, 37, 242, 195, 183, 157, 181, 211, 30, 108, 98, 222]]\", \"actual\": [null, \"uncorrectable\"], \"expected\": [null, \"uncorrectable\"], \"passed\": true}, {\"check\": \"regression [[178, 163, 216, 203, 246, 61, 83, 52, 85, 245, 59, 90, 113, 95]]\", \"actual\": [null, \"uncorrectable\"], \"expected\": [null, \"uncorrectable\"], \"passed\": true}, {\"check\": \"partial-repair [[207, 121, 195, 225]]\", \"actual\": [null, \"uncorrectable\"], \"expected\": [null, \"uncorrectable\"], \"passed\": true}, {\"check\": \"partial-repair [[177, 230, 201, 198, 207, 184, 216]]\", \"actual\": [null, \"uncorrectable\"], \"expected\": [null, \"uncorrectable\"], \"passed\": true}, {\"check\": \"control [[197, 174, 1, 105, 3]]\", \"actual\": [[197, 174, 1, 105, 3], \"clean\"], \"expected\": [[197, 174, 1, 105, 3], \"clean\"], \"passed\": true}, {\"check\": \"control [[197, 174, 1, 72, 3]]\", \"actual\": [[197, 174, 1, 105, 3], \"corrected\"], \"expected\": [[197, 174, 1, 105, 3], \"corrected\"], \"passed\": true}, {\"check\": \"control [[246, 174, 1, 105, 3]]\", \"actual\": [[197, 174, 1, 105, 3], \"corrected\"], \"expected\": [[197, 174, 1, 105, 3], \"corrected\"], \"passed\": true}, {\"check\": \"control [[170, 170, 73, 201, 214, 86]]\", \"actual\": [[170, 170, 73, 201, 214, 86], \"clean\"], \"expected\": [[170, 170, 73, 201, 214, 86], \"clean\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}