{"abstract":"Double-bit errors are \"corrected\" into wrong data and parity-bit errors are reported as double errors.","category":"Error-correcting codes","checks":8,"contract":"Extended Hamming (8,4) SECDED decoder. r[0] is the overall parity bit; r[1..7] are Hamming positions 1..7 with data at 3, 5, 6, 7. s is the XOR of set positions 1..7 and p the parity of all eight bits. s=0,p=0: \"clean\"; p=1: single error at position s (s=0 means the overall parity bit) - \"corrected\"; s!=0,p=0: [\"double\", None]. Return [status, data]. Non-binary or wrong-length input returns None.","evaluation_group":"w2-error_correcting_codes-secded-8-4","failed_approach":"Accepting either condition still miscorrects double errors.","family":"w2-error_correcting_codes-secded-8-4-double-detection","id":"FA-71871","implementations":{"attempt":{"sha256":"1f07089570d1fce817d9fe3505a524370d22b9c0e2acec8f8bdb0669ca49efda","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(r):\n    if len(r) != 8 or any(b not in (0, 1) for b in r):\n        return None\n    s = 0\n    for pos in range(1, 8):\n        if r[pos]:\n            s ^= pos\n    p = sum(r) % 2\n    c = list(r)\n    if s == 0 and p == 0:\n        status = 'clean'\n    elif p == 1 or s != 0:\n        status = 'corrected'\n        c[s] ^= 1\n    else:\n        return ['double', None]\n    return [status, [c[3], c[5], c[6], c[7]]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [[0, 0, 0, 0, 0, 0, 1, 1]]', [[0, 0, 0, 0, 0, 0, 1, 1]], ['double', None]], ['regression [[0, 1, 0, 1, 1, 0, 0, 1]]', [[0, 1, 0, 1, 1, 0, 0, 1]], ['double', None]], ['control [[0, 0, 0, 0, 0, 0, 0, 0]]', [[0, 0, 0, 0, 0, 0, 0, 0]], ['clean', [0, 0, 0, 0]]], ['control [[0, 1, 0, 0, 0, 0, 0, 0]]', [[0, 1, 0, 0, 0, 0, 0, 0]], ['corrected', [0, 0, 0, 0]]], ['control [[0, 1, 1, 0, 1, 0, 0, 1]]', [[0, 1, 1, 0, 1, 0, 0, 1]], ['clean', [0, 0, 0, 1]]], ['control [[0, 1, 1, 0, 1, 1, 0, 1]]', [[0, 1, 1, 0, 1, 1, 0, 1]], ['corrected', [0, 0, 0, 1]]], ['control [[1, 0, 1, 0, 1, 0, 1, 0]]', [[1, 0, 1, 0, 1, 0, 1, 0]], ['clean', [0, 0, 1, 0]]], ['control [[1, 0, 1, 0, 1, 1, 1, 0]]', [[1, 0, 1, 0, 1, 1, 1, 0]], ['corrected', [0, 0, 1, 0]]]], [['regression [[1, 1, 0, 1, 0, 0, 0, 1]]', [[1, 1, 0, 1, 0, 0, 0, 1]], ['double', None]], ['regression [[1, 0, 0, 0, 1, 0, 0, 0]]', [[1, 0, 0, 0, 1, 0, 0, 0]], ['double', None]], ['control [[1, 0, 1, 0, 1, 1, 1, 0]]', [[1, 0, 1, 0, 1, 1, 1, 0]], ['corrected', [0, 0, 1, 0]]], ['control [[1, 1, 0, 0, 0, 0, 1, 1]]', [[1, 1, 0, 0, 0, 0, 1, 1]], ['clean', [0, 0, 1, 1]]], ['control [[1, 1, 1, 0, 0, 0, 1, 1]]', [[1, 1, 1, 0, 0, 0, 1, 1]], ['corrected', [0, 0, 1, 1]]], ['control [[1, 1, 0, 0, 1, 1, 0, 0]]', [[1, 1, 0, 0, 1, 1, 0, 0]], ['clean', [0, 1, 0, 0]]], ['control [[1, 1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 1, 0, 1, 1, 0, 0]], ['corrected', [0, 1, 0, 0]]], ['control [[1, 0, 1, 0, 0, 1, 0, 1]]', [[1, 0, 1, 0, 0, 1, 0, 1]], ['clean', [0, 1, 0, 1]]]], [['regression [[0, 0, 1, 0, 0, 0, 1, 0]]', [[0, 0, 1, 0, 0, 0, 1, 0]], ['double', None]], ['regression [[0, 0, 0, 0, 0, 1, 1, 0]]', [[0, 0, 0, 0, 0, 1, 1, 0]], ['double', None]], ['control [[1, 0, 1, 0, 0, 1, 0, 1]]', [[1, 0, 1, 0, 0, 1, 0, 1]], ['clean', [0, 1, 0, 1]]], ['control [[1, 0, 1, 0, 0, 1, 1, 1]]', [[1, 0, 1, 0, 0, 1, 1, 1]], ['corrected', [0, 1, 0, 1]]], ['control [[0, 1, 1, 0, 0, 1, 1, 0]]', [[0, 1, 1, 0, 0, 1, 1, 0]], ['clean', [0, 1, 1, 0]]], ['control [[0, 1, 1, 0, 0, 0, 1, 0]]', [[0, 1, 1, 0, 0, 0, 1, 0]], ['corrected', [0, 1, 1, 0]]], ['control [[0, 0, 0, 0, 1, 1, 1, 1]]', [[0, 0, 0, 0, 1, 1, 1, 1]], ['clean', [0, 1, 1, 1]]], ['control [[0, 0, 0, 0, 1, 1, 1, 0]]', [[0, 0, 0, 0, 1, 1, 1, 0]], ['corrected', [0, 1, 1, 1]]]], [['regression [[1, 1, 0, 1, 0, 1, 0, 0]]', [[1, 1, 0, 1, 0, 1, 0, 0]], ['double', None]], ['regression [[1, 1, 0, 0, 1, 0, 0, 1]]', [[1, 1, 0, 0, 1, 0, 0, 1]], ['double', None]], ['partial-repair [[0, 1, 1, 1, 0, 0, 1, 0]]', [[0, 1, 1, 1, 0, 0, 1, 0]], ['double', None]], ['control [[0, 0, 0, 0, 1, 1, 1, 0]]', [[0, 0, 0, 0, 1, 1, 1, 0]], ['corrected', [0, 1, 1, 1]]], ['control [[1, 1, 1, 1, 0, 0, 0, 0]]', [[1, 1, 1, 1, 0, 0, 0, 0]], ['clean', [1, 0, 0, 0]]], ['control [[1, 0, 0, 1, 1, 0, 0, 1]]', [[1, 0, 0, 1, 1, 0, 0, 1]], ['clean', [1, 0, 0, 1]]], ['control [[1, 0, 0, 1, 1, 0, 0, 0]]', [[1, 0, 0, 1, 1, 0, 0, 0]], ['corrected', [1, 0, 0, 1]]], ['control [[0, 1, 0, 1, 1, 0, 1, 0]]', [[0, 1, 0, 1, 1, 0, 1, 0]], ['clean', [1, 0, 1, 0]]]], [['regression [[0, 0, 1, 1, 0, 1, 1, 0]]', [[0, 0, 1, 1, 0, 1, 1, 0]], ['double', None]], ['regression [[0, 0, 1, 0, 1, 0, 0, 0]]', [[0, 0, 1, 0, 1, 0, 0, 0]], ['double', None]], ['partial-repair [[0, 1, 1, 1, 0, 1, 0, 0]]', [[0, 1, 1, 1, 0, 1, 0, 0]], ['double', None]], ['control [[0, 1, 0, 0, 1, 0, 1, 0]]', [[0, 1, 0, 0, 1, 0, 1, 0]], ['corrected', [1, 0, 1, 0]]], ['control [[0, 0, 1, 1, 0, 0, 1, 1]]', [[0, 0, 1, 1, 0, 0, 1, 1]], ['clean', [1, 0, 1, 1]]], ['control [[0, 0, 1, 1, 0, 1, 1, 1]]', [[0, 0, 1, 1, 0, 1, 1, 1]], ['corrected', [1, 0, 1, 1]]], ['control [[0, 0, 1, 1, 1, 1, 0, 0]]', [[0, 0, 1, 1, 1, 1, 0, 0]], ['clean', [1, 1, 0, 0]]], ['control [[0, 1, 1, 1, 1, 1, 0, 0]]', [[0, 1, 1, 1, 1, 1, 0, 0]], ['corrected', [1, 1, 0, 0]]]]]\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":"b62e352abfe26aad245473ce35e2346fddb1498cf7bcf07b39b3c218a5230fd8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(r):\n    if len(r) != 8 or any(b not in (0, 1) for b in r):\n        return None\n    s = 0\n    for pos in range(1, 8):\n        if r[pos]:\n            s ^= pos\n    p = sum(r) % 2\n    c = list(r)\n    if s == 0 and p == 0:\n        status = 'clean'\n    elif s != 0:\n        status = 'corrected'\n        c[s] ^= 1\n    else:\n        return ['double', None]\n    return [status, [c[3], c[5], c[6], c[7]]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [[0, 0, 0, 0, 0, 0, 1, 1]]', [[0, 0, 0, 0, 0, 0, 1, 1]], ['double', None]], ['regression [[0, 1, 0, 1, 1, 0, 0, 1]]', [[0, 1, 0, 1, 1, 0, 0, 1]], ['double', None]], ['control [[0, 0, 0, 0, 0, 0, 0, 0]]', [[0, 0, 0, 0, 0, 0, 0, 0]], ['clean', [0, 0, 0, 0]]], ['control [[0, 1, 0, 0, 0, 0, 0, 0]]', [[0, 1, 0, 0, 0, 0, 0, 0]], ['corrected', [0, 0, 0, 0]]], ['control [[0, 1, 1, 0, 1, 0, 0, 1]]', [[0, 1, 1, 0, 1, 0, 0, 1]], ['clean', [0, 0, 0, 1]]], ['control [[0, 1, 1, 0, 1, 1, 0, 1]]', [[0, 1, 1, 0, 1, 1, 0, 1]], ['corrected', [0, 0, 0, 1]]], ['control [[1, 0, 1, 0, 1, 0, 1, 0]]', [[1, 0, 1, 0, 1, 0, 1, 0]], ['clean', [0, 0, 1, 0]]], ['control [[1, 0, 1, 0, 1, 1, 1, 0]]', [[1, 0, 1, 0, 1, 1, 1, 0]], ['corrected', [0, 0, 1, 0]]]], [['regression [[1, 1, 0, 1, 0, 0, 0, 1]]', [[1, 1, 0, 1, 0, 0, 0, 1]], ['double', None]], ['regression [[1, 0, 0, 0, 1, 0, 0, 0]]', [[1, 0, 0, 0, 1, 0, 0, 0]], ['double', None]], ['control [[1, 0, 1, 0, 1, 1, 1, 0]]', [[1, 0, 1, 0, 1, 1, 1, 0]], ['corrected', [0, 0, 1, 0]]], ['control [[1, 1, 0, 0, 0, 0, 1, 1]]', [[1, 1, 0, 0, 0, 0, 1, 1]], ['clean', [0, 0, 1, 1]]], ['control [[1, 1, 1, 0, 0, 0, 1, 1]]', [[1, 1, 1, 0, 0, 0, 1, 1]], ['corrected', [0, 0, 1, 1]]], ['control [[1, 1, 0, 0, 1, 1, 0, 0]]', [[1, 1, 0, 0, 1, 1, 0, 0]], ['clean', [0, 1, 0, 0]]], ['control [[1, 1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 1, 0, 1, 1, 0, 0]], ['corrected', [0, 1, 0, 0]]], ['control [[1, 0, 1, 0, 0, 1, 0, 1]]', [[1, 0, 1, 0, 0, 1, 0, 1]], ['clean', [0, 1, 0, 1]]]], [['regression [[0, 0, 1, 0, 0, 0, 1, 0]]', [[0, 0, 1, 0, 0, 0, 1, 0]], ['double', None]], ['regression [[0, 0, 0, 0, 0, 1, 1, 0]]', [[0, 0, 0, 0, 0, 1, 1, 0]], ['double', None]], ['control [[1, 0, 1, 0, 0, 1, 0, 1]]', [[1, 0, 1, 0, 0, 1, 0, 1]], ['clean', [0, 1, 0, 1]]], ['control [[1, 0, 1, 0, 0, 1, 1, 1]]', [[1, 0, 1, 0, 0, 1, 1, 1]], ['corrected', [0, 1, 0, 1]]], ['control [[0, 1, 1, 0, 0, 1, 1, 0]]', [[0, 1, 1, 0, 0, 1, 1, 0]], ['clean', [0, 1, 1, 0]]], ['control [[0, 1, 1, 0, 0, 0, 1, 0]]', [[0, 1, 1, 0, 0, 0, 1, 0]], ['corrected', [0, 1, 1, 0]]], ['control [[0, 0, 0, 0, 1, 1, 1, 1]]', [[0, 0, 0, 0, 1, 1, 1, 1]], ['clean', [0, 1, 1, 1]]], ['control [[0, 0, 0, 0, 1, 1, 1, 0]]', [[0, 0, 0, 0, 1, 1, 1, 0]], ['corrected', [0, 1, 1, 1]]]], [['regression [[1, 1, 0, 1, 0, 1, 0, 0]]', [[1, 1, 0, 1, 0, 1, 0, 0]], ['double', None]], ['regression [[1, 1, 0, 0, 1, 0, 0, 1]]', [[1, 1, 0, 0, 1, 0, 0, 1]], ['double', None]], ['partial-repair [[0, 1, 1, 1, 0, 0, 1, 0]]', [[0, 1, 1, 1, 0, 0, 1, 0]], ['double', None]], ['control [[0, 0, 0, 0, 1, 1, 1, 0]]', [[0, 0, 0, 0, 1, 1, 1, 0]], ['corrected', [0, 1, 1, 1]]], ['control [[1, 1, 1, 1, 0, 0, 0, 0]]', [[1, 1, 1, 1, 0, 0, 0, 0]], ['clean', [1, 0, 0, 0]]], ['control [[1, 0, 0, 1, 1, 0, 0, 1]]', [[1, 0, 0, 1, 1, 0, 0, 1]], ['clean', [1, 0, 0, 1]]], ['control [[1, 0, 0, 1, 1, 0, 0, 0]]', [[1, 0, 0, 1, 1, 0, 0, 0]], ['corrected', [1, 0, 0, 1]]], ['control [[0, 1, 0, 1, 1, 0, 1, 0]]', [[0, 1, 0, 1, 1, 0, 1, 0]], ['clean', [1, 0, 1, 0]]]], [['regression [[0, 0, 1, 1, 0, 1, 1, 0]]', [[0, 0, 1, 1, 0, 1, 1, 0]], ['double', None]], ['regression [[0, 0, 1, 0, 1, 0, 0, 0]]', [[0, 0, 1, 0, 1, 0, 0, 0]], ['double', None]], ['partial-repair [[0, 1, 1, 1, 0, 1, 0, 0]]', [[0, 1, 1, 1, 0, 1, 0, 0]], ['double', None]], ['control [[0, 1, 0, 0, 1, 0, 1, 0]]', [[0, 1, 0, 0, 1, 0, 1, 0]], ['corrected', [1, 0, 1, 0]]], ['control [[0, 0, 1, 1, 0, 0, 1, 1]]', [[0, 0, 1, 1, 0, 0, 1, 1]], ['clean', [1, 0, 1, 1]]], ['control [[0, 0, 1, 1, 0, 1, 1, 1]]', [[0, 0, 1, 1, 0, 1, 1, 1]], ['corrected', [1, 0, 1, 1]]], ['control [[0, 0, 1, 1, 1, 1, 0, 0]]', [[0, 0, 1, 1, 1, 1, 0, 0]], ['clean', [1, 1, 0, 0]]], ['control [[0, 1, 1, 1, 1, 1, 0, 0]]', [[0, 1, 1, 1, 1, 1, 0, 0]], ['corrected', [1, 1, 0, 0]]]]]\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":"63ec50f495488c76aa0dd4ab6f043b3d8e02ea0124dec7e62a5ac9df22866ab9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(r):\n    if len(r) != 8 or any(b not in (0, 1) for b in r):\n        return None\n    s = 0\n    for pos in range(1, 8):\n        if r[pos]:\n            s ^= pos\n    p = sum(r) % 2\n    c = list(r)\n    if s == 0 and p == 0:\n        status = 'clean'\n    elif p == 1:\n        status = 'corrected'\n        c[s] ^= 1\n    else:\n        return ['double', None]\n    return [status, [c[3], c[5], c[6], c[7]]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [[0, 0, 0, 0, 0, 0, 1, 1]]', [[0, 0, 0, 0, 0, 0, 1, 1]], ['double', None]], ['regression [[0, 1, 0, 1, 1, 0, 0, 1]]', [[0, 1, 0, 1, 1, 0, 0, 1]], ['double', None]], ['control [[0, 0, 0, 0, 0, 0, 0, 0]]', [[0, 0, 0, 0, 0, 0, 0, 0]], ['clean', [0, 0, 0, 0]]], ['control [[0, 1, 0, 0, 0, 0, 0, 0]]', [[0, 1, 0, 0, 0, 0, 0, 0]], ['corrected', [0, 0, 0, 0]]], ['control [[0, 1, 1, 0, 1, 0, 0, 1]]', [[0, 1, 1, 0, 1, 0, 0, 1]], ['clean', [0, 0, 0, 1]]], ['control [[0, 1, 1, 0, 1, 1, 0, 1]]', [[0, 1, 1, 0, 1, 1, 0, 1]], ['corrected', [0, 0, 0, 1]]], ['control [[1, 0, 1, 0, 1, 0, 1, 0]]', [[1, 0, 1, 0, 1, 0, 1, 0]], ['clean', [0, 0, 1, 0]]], ['control [[1, 0, 1, 0, 1, 1, 1, 0]]', [[1, 0, 1, 0, 1, 1, 1, 0]], ['corrected', [0, 0, 1, 0]]]], [['regression [[1, 1, 0, 1, 0, 0, 0, 1]]', [[1, 1, 0, 1, 0, 0, 0, 1]], ['double', None]], ['regression [[1, 0, 0, 0, 1, 0, 0, 0]]', [[1, 0, 0, 0, 1, 0, 0, 0]], ['double', None]], ['control [[1, 0, 1, 0, 1, 1, 1, 0]]', [[1, 0, 1, 0, 1, 1, 1, 0]], ['corrected', [0, 0, 1, 0]]], ['control [[1, 1, 0, 0, 0, 0, 1, 1]]', [[1, 1, 0, 0, 0, 0, 1, 1]], ['clean', [0, 0, 1, 1]]], ['control [[1, 1, 1, 0, 0, 0, 1, 1]]', [[1, 1, 1, 0, 0, 0, 1, 1]], ['corrected', [0, 0, 1, 1]]], ['control [[1, 1, 0, 0, 1, 1, 0, 0]]', [[1, 1, 0, 0, 1, 1, 0, 0]], ['clean', [0, 1, 0, 0]]], ['control [[1, 1, 1, 0, 1, 1, 0, 0]]', [[1, 1, 1, 0, 1, 1, 0, 0]], ['corrected', [0, 1, 0, 0]]], ['control [[1, 0, 1, 0, 0, 1, 0, 1]]', [[1, 0, 1, 0, 0, 1, 0, 1]], ['clean', [0, 1, 0, 1]]]], [['regression [[0, 0, 1, 0, 0, 0, 1, 0]]', [[0, 0, 1, 0, 0, 0, 1, 0]], ['double', None]], ['regression [[0, 0, 0, 0, 0, 1, 1, 0]]', [[0, 0, 0, 0, 0, 1, 1, 0]], ['double', None]], ['control [[1, 0, 1, 0, 0, 1, 0, 1]]', [[1, 0, 1, 0, 0, 1, 0, 1]], ['clean', [0, 1, 0, 1]]], ['control [[1, 0, 1, 0, 0, 1, 1, 1]]', [[1, 0, 1, 0, 0, 1, 1, 1]], ['corrected', [0, 1, 0, 1]]], ['control [[0, 1, 1, 0, 0, 1, 1, 0]]', [[0, 1, 1, 0, 0, 1, 1, 0]], ['clean', [0, 1, 1, 0]]], ['control [[0, 1, 1, 0, 0, 0, 1, 0]]', [[0, 1, 1, 0, 0, 0, 1, 0]], ['corrected', [0, 1, 1, 0]]], ['control [[0, 0, 0, 0, 1, 1, 1, 1]]', [[0, 0, 0, 0, 1, 1, 1, 1]], ['clean', [0, 1, 1, 1]]], ['control [[0, 0, 0, 0, 1, 1, 1, 0]]', [[0, 0, 0, 0, 1, 1, 1, 0]], ['corrected', [0, 1, 1, 1]]]], [['regression [[1, 1, 0, 1, 0, 1, 0, 0]]', [[1, 1, 0, 1, 0, 1, 0, 0]], ['double', None]], ['regression [[1, 1, 0, 0, 1, 0, 0, 1]]', [[1, 1, 0, 0, 1, 0, 0, 1]], ['double', None]], ['partial-repair [[0, 1, 1, 1, 0, 0, 1, 0]]', [[0, 1, 1, 1, 0, 0, 1, 0]], ['double', None]], ['control [[0, 0, 0, 0, 1, 1, 1, 0]]', [[0, 0, 0, 0, 1, 1, 1, 0]], ['corrected', [0, 1, 1, 1]]], ['control [[1, 1, 1, 1, 0, 0, 0, 0]]', [[1, 1, 1, 1, 0, 0, 0, 0]], ['clean', [1, 0, 0, 0]]], ['control [[1, 0, 0, 1, 1, 0, 0, 1]]', [[1, 0, 0, 1, 1, 0, 0, 1]], ['clean', [1, 0, 0, 1]]], ['control [[1, 0, 0, 1, 1, 0, 0, 0]]', [[1, 0, 0, 1, 1, 0, 0, 0]], ['corrected', [1, 0, 0, 1]]], ['control [[0, 1, 0, 1, 1, 0, 1, 0]]', [[0, 1, 0, 1, 1, 0, 1, 0]], ['clean', [1, 0, 1, 0]]]], [['regression [[0, 0, 1, 1, 0, 1, 1, 0]]', [[0, 0, 1, 1, 0, 1, 1, 0]], ['double', None]], ['regression [[0, 0, 1, 0, 1, 0, 0, 0]]', [[0, 0, 1, 0, 1, 0, 0, 0]], ['double', None]], ['partial-repair [[0, 1, 1, 1, 0, 1, 0, 0]]', [[0, 1, 1, 1, 0, 1, 0, 0]], ['double', None]], ['control [[0, 1, 0, 0, 1, 0, 1, 0]]', [[0, 1, 0, 0, 1, 0, 1, 0]], ['corrected', [1, 0, 1, 0]]], ['control [[0, 0, 1, 1, 0, 0, 1, 1]]', [[0, 0, 1, 1, 0, 0, 1, 1]], ['clean', [1, 0, 1, 1]]], ['control [[0, 0, 1, 1, 0, 1, 1, 1]]', [[0, 0, 1, 1, 0, 1, 1, 1]], ['corrected', [1, 0, 1, 1]]], ['control [[0, 0, 1, 1, 1, 1, 0, 0]]', [[0, 0, 1, 1, 1, 1, 0, 0]], ['clean', [1, 1, 0, 0]]], ['control [[0, 1, 1, 1, 1, 1, 0, 0]]', [[0, 1, 1, 1, 1, 1, 0, 0]], ['corrected', [1, 1, 0, 0]]]]]\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-secded-8-4-double-detection","generated_at":"2026-09-29T14:48:33.472272+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"ECC DRAM controllers must distinguish correctable single-bit errors from uncorrectable double-bit errors.","repair":"Use the overall parity to decide: odd means single (correctable), even with nonzero syndrome means double.","root_cause":"The branch is selected by s != 0 instead of the overall parity p == 1.","sha256":"36fb1c6b724031b7c8a841299066bdb1b4799890fa807d859e585de27f7cdb8c","title":"SECDED corrects on any nonzero syndrome · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":37.612,"exit_code":1,"observations":[{"actual":["corrected",[0,0,1,1]],"check":"regression [[0, 0, 0, 0, 0, 0, 1, 1]]","expected":["double",null],"passed":false},{"actual":["corrected",[1,0,0,1]],"check":"regression [[0, 1, 0, 1, 1, 0, 0, 1]]","expected":["double",null],"passed":false},{"actual":["clean",[0,0,0,0]],"check":"control [[0, 0, 0, 0, 0, 0, 0, 0]]","expected":["clean",[0,0,0,0]],"passed":true},{"actual":["corrected",[0,0,0,0]],"check":"control [[0, 1, 0, 0, 0, 0, 0, 0]]","expected":["corrected",[0,0,0,0]],"passed":true},{"actual":["clean",[0,0,0,1]],"check":"control [[0, 1, 1, 0, 1, 0, 0, 1]]","expected":["clean",[0,0,0,1]],"passed":true},{"actual":["corrected",[0,0,0,1]],"check":"control [[0, 1, 1, 0, 1, 1, 0, 1]]","expected":["corrected",[0,0,0,1]],"passed":true},{"actual":["clean",[0,0,1,0]],"check":"control [[1, 0, 1, 0, 1, 0, 1, 0]]","expected":["clean",[0,0,1,0]],"passed":true},{"actual":["corrected",[0,0,1,0]],"check":"control [[1, 0, 1, 0, 1, 1, 1, 0]]","expected":["corrected",[0,0,1,0]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [[0, 0, 0, 0, 0, 0, 1, 1]]\", \"actual\": [\"corrected\", [0, 0, 1, 1]], \"expected\": [\"double\", null], \"passed\": false}, {\"check\": \"regression [[0, 1, 0, 1, 1, 0, 0, 1]]\", \"actual\": [\"corrected\", [1, 0, 0, 1]], \"expected\": [\"double\", null], \"passed\": false}, {\"check\": \"control [[0, 0, 0, 0, 0, 0, 0, 0]]\", \"actual\": [\"clean\", [0, 0, 0, 0]], \"expected\": [\"clean\", [0, 0, 0, 0]], \"passed\": true}, {\"check\": \"control [[0, 1, 0, 0, 0, 0, 0, 0]]\", \"actual\": [\"corrected\", [0, 0, 0, 0]], \"expected\": [\"corrected\", [0, 0, 0, 0]], \"passed\": true}, {\"check\": \"control [[0, 1, 1, 0, 1, 0, 0, 1]]\", \"actual\": [\"clean\", [0, 0, 0, 1]], \"expected\": [\"clean\", [0, 0, 0, 1]], \"passed\": true}, {\"check\": \"control [[0, 1, 1, 0, 1, 1, 0, 1]]\", \"actual\": [\"corrected\", [0, 0, 0, 1]], \"expected\": [\"corrected\", [0, 0, 0, 1]], \"passed\": true}, {\"check\": \"control [[1, 0, 1, 0, 1, 0, 1, 0]]\", \"actual\": [\"clean\", [0, 0, 1, 0]], \"expected\": [\"clean\", [0, 0, 1, 0]], \"passed\": true}, {\"check\": \"control [[1, 0, 1, 0, 1, 1, 1, 0]]\", \"actual\": [\"corrected\", [0, 0, 1, 0]], \"expected\": [\"corrected\", [0, 0, 1, 0]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.786,"exit_code":1,"observations":[{"actual":["corrected",[0,0,1,1]],"check":"regression [[0, 0, 0, 0, 0, 0, 1, 1]]","expected":["double",null],"passed":false},{"actual":["corrected",[1,0,0,1]],"check":"regression [[0, 1, 0, 1, 1, 0, 0, 1]]","expected":["double",null],"passed":false},{"actual":["clean",[0,0,0,0]],"check":"control [[0, 0, 0, 0, 0, 0, 0, 0]]","expected":["clean",[0,0,0,0]],"passed":true},{"actual":["corrected",[0,0,0,0]],"check":"control [[0, 1, 0, 0, 0, 0, 0, 0]]","expected":["corrected",[0,0,0,0]],"passed":true},{"actual":["clean",[0,0,0,1]],"check":"control [[0, 1, 1, 0, 1, 0, 0, 1]]","expected":["clean",[0,0,0,1]],"passed":true},{"actual":["corrected",[0,0,0,1]],"check":"control [[0, 1, 1, 0, 1, 1, 0, 1]]","expected":["corrected",[0,0,0,1]],"passed":true},{"actual":["clean",[0,0,1,0]],"check":"control [[1, 0, 1, 0, 1, 0, 1, 0]]","expected":["clean",[0,0,1,0]],"passed":true},{"actual":["corrected",[0,0,1,0]],"check":"control [[1, 0, 1, 0, 1, 1, 1, 0]]","expected":["corrected",[0,0,1,0]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [[0, 0, 0, 0, 0, 0, 1, 1]]\", \"actual\": [\"corrected\", [0, 0, 1, 1]], \"expected\": [\"double\", null], \"passed\": false}, {\"check\": \"regression [[0, 1, 0, 1, 1, 0, 0, 1]]\", \"actual\": [\"corrected\", [1, 0, 0, 1]], \"expected\": [\"double\", null], \"passed\": false}, {\"check\": \"control [[0, 0, 0, 0, 0, 0, 0, 0]]\", \"actual\": [\"clean\", [0, 0, 0, 0]], \"expected\": [\"clean\", [0, 0, 0, 0]], \"passed\": true}, {\"check\": \"control [[0, 1, 0, 0, 0, 0, 0, 0]]\", \"actual\": [\"corrected\", [0, 0, 0, 0]], \"expected\": [\"corrected\", [0, 0, 0, 0]], \"passed\": true}, {\"check\": \"control [[0, 1, 1, 0, 1, 0, 0, 1]]\", \"actual\": [\"clean\", [0, 0, 0, 1]], \"expected\": [\"clean\", [0, 0, 0, 1]], \"passed\": true}, {\"check\": \"control [[0, 1, 1, 0, 1, 1, 0, 1]]\", \"actual\": [\"corrected\", [0, 0, 0, 1]], \"expected\": [\"corrected\", [0, 0, 0, 1]], \"passed\": true}, {\"check\": \"control [[1, 0, 1, 0, 1, 0, 1, 0]]\", \"actual\": [\"clean\", [0, 0, 1, 0]], \"expected\": [\"clean\", [0, 0, 1, 0]], \"passed\": true}, {\"check\": \"control [[1, 0, 1, 0, 1, 1, 1, 0]]\", \"actual\": [\"corrected\", [0, 0, 1, 0]], \"expected\": [\"corrected\", [0, 0, 1, 0]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.048,"exit_code":0,"observations":[{"actual":["double",null],"check":"regression [[0, 0, 0, 0, 0, 0, 1, 1]]","expected":["double",null],"passed":true},{"actual":["double",null],"check":"regression [[0, 1, 0, 1, 1, 0, 0, 1]]","expected":["double",null],"passed":true},{"actual":["clean",[0,0,0,0]],"check":"control [[0, 0, 0, 0, 0, 0, 0, 0]]","expected":["clean",[0,0,0,0]],"passed":true},{"actual":["corrected",[0,0,0,0]],"check":"control [[0, 1, 0, 0, 0, 0, 0, 0]]","expected":["corrected",[0,0,0,0]],"passed":true},{"actual":["clean",[0,0,0,1]],"check":"control [[0, 1, 1, 0, 1, 0, 0, 1]]","expected":["clean",[0,0,0,1]],"passed":true},{"actual":["corrected",[0,0,0,1]],"check":"control [[0, 1, 1, 0, 1, 1, 0, 1]]","expected":["corrected",[0,0,0,1]],"passed":true},{"actual":["clean",[0,0,1,0]],"check":"control [[1, 0, 1, 0, 1, 0, 1, 0]]","expected":["clean",[0,0,1,0]],"passed":true},{"actual":["corrected",[0,0,1,0]],"check":"control [[1, 0, 1, 0, 1, 1, 1, 0]]","expected":["corrected",[0,0,1,0]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [[0, 0, 0, 0, 0, 0, 1, 1]]\", \"actual\": [\"double\", null], \"expected\": [\"double\", null], \"passed\": true}, {\"check\": \"regression [[0, 1, 0, 1, 1, 0, 0, 1]]\", \"actual\": [\"double\", null], \"expected\": [\"double\", null], \"passed\": true}, {\"check\": \"control [[0, 0, 0, 0, 0, 0, 0, 0]]\", \"actual\": [\"clean\", [0, 0, 0, 0]], \"expected\": [\"clean\", [0, 0, 0, 0]], \"passed\": true}, {\"check\": \"control [[0, 1, 0, 0, 0, 0, 0, 0]]\", \"actual\": [\"corrected\", [0, 0, 0, 0]], \"expected\": [\"corrected\", [0, 0, 0, 0]], \"passed\": true}, {\"check\": \"control [[0, 1, 1, 0, 1, 0, 0, 1]]\", \"actual\": [\"clean\", [0, 0, 0, 1]], \"expected\": [\"clean\", [0, 0, 0, 1]], \"passed\": true}, {\"check\": \"control [[0, 1, 1, 0, 1, 1, 0, 1]]\", \"actual\": [\"corrected\", [0, 0, 0, 1]], \"expected\": [\"corrected\", [0, 0, 0, 1]], \"passed\": true}, {\"check\": \"control [[1, 0, 1, 0, 1, 0, 1, 0]]\", \"actual\": [\"clean\", [0, 0, 1, 0]], \"expected\": [\"clean\", [0, 0, 1, 0]], \"passed\": true}, {\"check\": \"control [[1, 0, 1, 0, 1, 1, 1, 0]]\", \"actual\": [\"corrected\", [0, 0, 1, 0]], \"expected\": [\"corrected\", [0, 0, 1, 0]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}