{"abstract":"Almost every VIN gets a wrong check digit.","category":"Check-digit algorithms","checks":8,"contract":"North American 17-character VIN check digit. Input must be 17 uppercase ASCII alphanumerics without I, O or Q (else \"malformed\"). Letters transliterate (A-H 1-8, J-N 1-5, P 7, R 9, S-Z 2-9); weights are 8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2 with weight 0 on the check position (9th). Remainder mod 11 is the check digit, 10 written X. Return [check character, whether position 9 matches].","contract_signature":"vin","evaluation_group":"w2-check_digit_algorithms-vin-check","failed_approach":"Restoring 17 weights but with 1 at the check position makes the check digit contribute to its own sum.","family":"w2-check_digit_algorithms-vin-check-zero-weight-alignment","id":"FA-72506","implementations":{"attempt":{"sha256":"d9b2febaef401ef36588f2a66a2e3e9e6c0e0fc893ef8060e551379f95514249","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(vin):\n    TR = {'A': 1, 'B': 2, 'C': 3, 'D': 4, 'E': 5, 'F': 6, 'G': 7, 'H': 8, 'J': 1, 'K': 2, 'L': 3, 'M': 4, 'N': 5, 'P': 7, 'R': 9, 'S': 2, 'T': 3, 'U': 4, 'V': 5, 'W': 6, 'X': 7, 'Y': 8, 'Z': 9}\n    W = [8, 7, 6, 5, 4, 3, 2, 10, 1, 9, 8, 7, 6, 5, 4, 3, 2]\n    if len(vin) != 17 or not vin.isascii() or not vin.isalnum() or vin != vin.upper():\n        return 'malformed'\n    if any(ch in 'IOQ' for ch in vin):\n        return 'malformed'\n    total = 0\n    for ch, w in zip(vin, W):\n        total += (int(ch) if ch.isdigit() else TR[ch]) * w\n    r = total % 11\n    check = 'X' if r == 10 else str(r)\n    return [check, vin[8] == check]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [\"7P852FPZ9AMB30TWM\"]', ['7P852FPZ9AMB30TWM'], ['1', False]], ['regression [\"5E80302J20HS0C2TB\"]', ['5E80302J20HS0C2TB'], ['X', False]], ['control [\"1M8GDM9AXKP04278\"]', ['1M8GDM9AXKP04278'], 'malformed'], ['control [\"1M8GDM9AXKP04278O\"]', ['1M8GDM9AXKP04278O'], 'malformed'], ['control [\"1m8gdm9axkp042788\"]', ['1m8gdm9axkp042788'], 'malformed'], ['control [\"802LPLKT5RR2033BP\"]', ['802LPLKT5RR2033BP'], ['2', False]], ['control [\"G9Y36GVM3T01TBX5P\"]', ['G9Y36GVM3T01TBX5P'], ['0', False]], ['control [\"J5KCLF4060VP1YCZT\"]', ['J5KCLF4060VP1YCZT'], ['2', False]]], [['regression [\"802LPLKT5RR2033BP\"]', ['802LPLKT5RR2033BP'], ['2', False]], ['regression [\"G9Y36GVM3T01TBX5P\"]', ['G9Y36GVM3T01TBX5P'], ['0', False]], ['control [\"1m8gdm9axkp042788\"]', ['1m8gdm9axkp042788'], 'malformed'], ['control [\"1M8GDM9AXKP04278\"]', ['1M8GDM9AXKP04278'], 'malformed'], ['control [\"1M8GDM9AXKP04278O\"]', ['1M8GDM9AXKP04278O'], 'malformed'], ['control [\"9D9WJN8Z6UAEAXNMY\"]', ['9D9WJN8Z6UAEAXNMY'], ['4', False]], ['control [\"G746XY1N49VVXVM2N\"]', ['G746XY1N49VVXVM2N'], ['1', False]], ['control [\"A2C3SUET4AT9FGY0N\"]', ['A2C3SUET4AT9FGY0N'], ['5', False]]], [['regression [\"7U176LUC2HMRHV49Y\"]', ['7U176LUC2HMRHV49Y'], ['0', False]], ['regression [\"T32AS501XMK3869UE\"]', ['T32AS501XMK3869UE'], ['7', False]], ['control [\"1M8GDM9AXKP04278O\"]', ['1M8GDM9AXKP04278O'], 'malformed'], ['control [\"1m8gdm9axkp042788\"]', ['1m8gdm9axkp042788'], 'malformed'], ['control [\"1M8GDM9AXKP04278\"]', ['1M8GDM9AXKP04278'], 'malformed'], ['control [\"466JDFJ71TZ0MJCXA\"]', ['466JDFJ71TZ0MJCXA'], ['X', False]], ['control [\"4E2898314S7811191\"]', ['4E2898314S7811191'], ['6', False]], ['control [\"952403649S86181S3\"]', ['952403649S86181S3'], ['1', False]]], [['regression [\"ZP4DXW7F59ZF0J6LD\"]', ['ZP4DXW7F59ZF0J6LD'], ['9', False]], ['regression [\"XASS3C3Z3KGD2JETV\"]', ['XASS3C3Z3KGD2JETV'], ['8', False]], ['partial-repair [\"G746XY1N49VVXVM2N\"]', ['G746XY1N49VVXVM2N'], ['1', False]], ['partial-repair [\"A2C3SUET4AT9FGY0N\"]', ['A2C3SUET4AT9FGY0N'], ['5', False]], ['control [\"1M8GDM9AXKP04278\"]', ['1M8GDM9AXKP04278'], 'malformed'], ['control [\"1M8GDM9AXKP04278O\"]', ['1M8GDM9AXKP04278O'], 'malformed'], ['control [\"1m8gdm9axkp042788\"]', ['1m8gdm9axkp042788'], 'malformed'], ['control [\"1M8GDM9AXKP042788\"]', ['1M8GDM9AXKP042788'], ['X', True]]], [['regression [\"4E2898314S7811191\"]', ['4E2898314S7811191'], ['6', False]], ['regression [\"952403649S86181S3\"]', ['952403649S86181S3'], ['1', False]], ['partial-repair [\"XASS3C3Z3KGD2JETV\"]', ['XASS3C3Z3KGD2JETV'], ['8', False]], ['partial-repair [\"466JDFJ71TZ0MJCXA\"]', ['466JDFJ71TZ0MJCXA'], ['X', False]], ['control [\"1m8gdm9axkp042788\"]', ['1m8gdm9axkp042788'], 'malformed'], ['control [\"1M8GDM9AXKP04278\"]', ['1M8GDM9AXKP04278'], 'malformed'], ['control [\"1M8GDM9AXKP04278O\"]', ['1M8GDM9AXKP04278O'], 'malformed'], ['control [\"5YJSA1E14HF000001\"]', ['5YJSA1E14HF000001'], ['8', False]]]]\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":"41cd9f594b0c108bbbc81f587e16cd6f5b03ff48695b1664df8539fa710fb2bf","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(vin):\n    TR = {'A': 1, 'B': 2, 'C': 3, 'D': 4, 'E': 5, 'F': 6, 'G': 7, 'H': 8, 'J': 1, 'K': 2, 'L': 3, 'M': 4, 'N': 5, 'P': 7, 'R': 9, 'S': 2, 'T': 3, 'U': 4, 'V': 5, 'W': 6, 'X': 7, 'Y': 8, 'Z': 9}\n    W = [8, 7, 6, 5, 4, 3, 2, 10, 9, 8, 7, 6, 5, 4, 3, 2]\n    if len(vin) != 17 or not vin.isascii() or not vin.isalnum() or vin != vin.upper():\n        return 'malformed'\n    if any(ch in 'IOQ' for ch in vin):\n        return 'malformed'\n    total = 0\n    for ch, w in zip(vin, W):\n        total += (int(ch) if ch.isdigit() else TR[ch]) * w\n    r = total % 11\n    check = 'X' if r == 10 else str(r)\n    return [check, vin[8] == check]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [\"7P852FPZ9AMB30TWM\"]', ['7P852FPZ9AMB30TWM'], ['1', False]], ['regression [\"5E80302J20HS0C2TB\"]', ['5E80302J20HS0C2TB'], ['X', False]], ['control [\"1M8GDM9AXKP04278\"]', ['1M8GDM9AXKP04278'], 'malformed'], ['control [\"1M8GDM9AXKP04278O\"]', ['1M8GDM9AXKP04278O'], 'malformed'], ['control [\"1m8gdm9axkp042788\"]', ['1m8gdm9axkp042788'], 'malformed'], ['control [\"802LPLKT5RR2033BP\"]', ['802LPLKT5RR2033BP'], ['2', False]], ['control [\"G9Y36GVM3T01TBX5P\"]', ['G9Y36GVM3T01TBX5P'], ['0', False]], ['control [\"J5KCLF4060VP1YCZT\"]', ['J5KCLF4060VP1YCZT'], ['2', False]]], [['regression [\"802LPLKT5RR2033BP\"]', ['802LPLKT5RR2033BP'], ['2', False]], ['regression [\"G9Y36GVM3T01TBX5P\"]', ['G9Y36GVM3T01TBX5P'], ['0', False]], ['control [\"1m8gdm9axkp042788\"]', ['1m8gdm9axkp042788'], 'malformed'], ['control [\"1M8GDM9AXKP04278\"]', ['1M8GDM9AXKP04278'], 'malformed'], ['control [\"1M8GDM9AXKP04278O\"]', ['1M8GDM9AXKP04278O'], 'malformed'], ['control [\"9D9WJN8Z6UAEAXNMY\"]', ['9D9WJN8Z6UAEAXNMY'], ['4', False]], ['control [\"G746XY1N49VVXVM2N\"]', ['G746XY1N49VVXVM2N'], ['1', False]], ['control [\"A2C3SUET4AT9FGY0N\"]', ['A2C3SUET4AT9FGY0N'], ['5', False]]], [['regression [\"7U176LUC2HMRHV49Y\"]', ['7U176LUC2HMRHV49Y'], ['0', False]], ['regression [\"T32AS501XMK3869UE\"]', ['T32AS501XMK3869UE'], ['7', False]], ['control [\"1M8GDM9AXKP04278O\"]', ['1M8GDM9AXKP04278O'], 'malformed'], ['control [\"1m8gdm9axkp042788\"]', ['1m8gdm9axkp042788'], 'malformed'], ['control [\"1M8GDM9AXKP04278\"]', ['1M8GDM9AXKP04278'], 'malformed'], ['control [\"466JDFJ71TZ0MJCXA\"]', ['466JDFJ71TZ0MJCXA'], ['X', False]], ['control [\"4E2898314S7811191\"]', ['4E2898314S7811191'], ['6', False]], ['control [\"952403649S86181S3\"]', ['952403649S86181S3'], ['1', False]]], [['regression [\"ZP4DXW7F59ZF0J6LD\"]', ['ZP4DXW7F59ZF0J6LD'], ['9', False]], ['regression [\"XASS3C3Z3KGD2JETV\"]', ['XASS3C3Z3KGD2JETV'], ['8', False]], ['partial-repair [\"G746XY1N49VVXVM2N\"]', ['G746XY1N49VVXVM2N'], ['1', False]], ['partial-repair [\"A2C3SUET4AT9FGY0N\"]', ['A2C3SUET4AT9FGY0N'], ['5', False]], ['control [\"1M8GDM9AXKP04278\"]', ['1M8GDM9AXKP04278'], 'malformed'], ['control [\"1M8GDM9AXKP04278O\"]', ['1M8GDM9AXKP04278O'], 'malformed'], ['control [\"1m8gdm9axkp042788\"]', ['1m8gdm9axkp042788'], 'malformed'], ['control [\"1M8GDM9AXKP042788\"]', ['1M8GDM9AXKP042788'], ['X', True]]], [['regression [\"4E2898314S7811191\"]', ['4E2898314S7811191'], ['6', False]], ['regression [\"952403649S86181S3\"]', ['952403649S86181S3'], ['1', False]], ['partial-repair [\"XASS3C3Z3KGD2JETV\"]', ['XASS3C3Z3KGD2JETV'], ['8', False]], ['partial-repair [\"466JDFJ71TZ0MJCXA\"]', ['466JDFJ71TZ0MJCXA'], ['X', False]], ['control [\"1m8gdm9axkp042788\"]', ['1m8gdm9axkp042788'], 'malformed'], ['control [\"1M8GDM9AXKP04278\"]', ['1M8GDM9AXKP04278'], 'malformed'], ['control [\"1M8GDM9AXKP04278O\"]', ['1M8GDM9AXKP04278O'], 'malformed'], ['control [\"5YJSA1E14HF000001\"]', ['5YJSA1E14HF000001'], ['8', False]]]]\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 scheme under the stated contract; not a certified validator. 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-check_digit_algorithms-vin-check-zero-weight-alignment","generated_at":"2026-09-29T14:48:39.121603+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Vehicle registration and recall systems reject VINs with a bad check digit.","root_cause":"The weight list omits the 0 for position 9, so every later weight shifts one position left.","sha256":"524b323cbc64b5601ba40d9b87b29fab2184d913a703f4b4f12dc433e23507f0","title":"VIN weights drop the zero weight at the check position · 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":39.268,"exit_code":1,"observations":[{"actual":["X",false],"check":"regression [\"7P852FPZ9AMB30TWM\"]","expected":["1",false],"passed":false},{"actual":["1",false],"check":"regression [\"5E80302J20HS0C2TB\"]","expected":["X",false],"passed":false},{"actual":"malformed","check":"control [\"1M8GDM9AXKP04278\"]","expected":"malformed","passed":true},{"actual":"malformed","check":"control [\"1M8GDM9AXKP04278O\"]","expected":"malformed","passed":true},{"actual":"malformed","check":"control [\"1m8gdm9axkp042788\"]","expected":"malformed","passed":true},{"actual":["7",false],"check":"control [\"802LPLKT5RR2033BP\"]","expected":["2",false],"passed":false},{"actual":["3",true],"check":"control [\"G9Y36GVM3T01TBX5P\"]","expected":["0",false],"passed":false},{"actual":["8",false],"check":"control [\"J5KCLF4060VP1YCZT\"]","expected":["2",false],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [\\\"7P852FPZ9AMB30TWM\\\"]\", \"actual\": [\"X\", false], \"expected\": [\"1\", false], \"passed\": false}, {\"check\": \"regression [\\\"5E80302J20HS0C2TB\\\"]\", \"actual\": [\"1\", false], \"expected\": [\"X\", false], \"passed\": false}, {\"check\": \"control [\\\"1M8GDM9AXKP04278\\\"]\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}, {\"check\": \"control [\\\"1M8GDM9AXKP04278O\\\"]\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}, {\"check\": \"control [\\\"1m8gdm9axkp042788\\\"]\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}, {\"check\": \"control [\\\"802LPLKT5RR2033BP\\\"]\", \"actual\": [\"7\", false], \"expected\": [\"2\", false], \"passed\": false}, {\"check\": \"control [\\\"G9Y36GVM3T01TBX5P\\\"]\", \"actual\": [\"3\", true], \"expected\": [\"0\", false], \"passed\": false}, {\"check\": \"control [\\\"J5KCLF4060VP1YCZT\\\"]\", \"actual\": [\"8\", false], \"expected\": [\"2\", false], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.564,"exit_code":1,"observations":[{"actual":["0",false],"check":"regression [\"7P852FPZ9AMB30TWM\"]","expected":["1",false],"passed":false},{"actual":["6",false],"check":"regression [\"5E80302J20HS0C2TB\"]","expected":["X",false],"passed":false},{"actual":"malformed","check":"control [\"1M8GDM9AXKP04278\"]","expected":"malformed","passed":true},{"actual":"malformed","check":"control [\"1M8GDM9AXKP04278O\"]","expected":"malformed","passed":true},{"actual":"malformed","check":"control [\"1m8gdm9axkp042788\"]","expected":"malformed","passed":true},{"actual":["5",true],"check":"control [\"802LPLKT5RR2033BP\"]","expected":["2",false],"passed":false},{"actual":["3",true],"check":"control [\"G9Y36GVM3T01TBX5P\"]","expected":["0",false],"passed":false},{"actual":["6",true],"check":"control [\"J5KCLF4060VP1YCZT\"]","expected":["2",false],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [\\\"7P852FPZ9AMB30TWM\\\"]\", \"actual\": [\"0\", false], \"expected\": [\"1\", false], \"passed\": false}, {\"check\": \"regression [\\\"5E80302J20HS0C2TB\\\"]\", \"actual\": [\"6\", false], \"expected\": [\"X\", false], \"passed\": false}, {\"check\": \"control [\\\"1M8GDM9AXKP04278\\\"]\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}, {\"check\": \"control [\\\"1M8GDM9AXKP04278O\\\"]\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}, {\"check\": \"control [\\\"1m8gdm9axkp042788\\\"]\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}, {\"check\": \"control [\\\"802LPLKT5RR2033BP\\\"]\", \"actual\": [\"5\", true], \"expected\": [\"2\", false], \"passed\": false}, {\"check\": \"control [\\\"G9Y36GVM3T01TBX5P\\\"]\", \"actual\": [\"3\", true], \"expected\": [\"0\", false], \"passed\": false}, {\"check\": \"control [\\\"J5KCLF4060VP1YCZT\\\"]\", \"actual\": [\"6\", true], \"expected\": [\"2\", false], \"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."}}