{"abstract":"Computed ISIN check digits disagree with issued identifiers.","category":"Check-digit algorithms","checks":8,"contract":"Input a 12-character ISIN: two uppercase ASCII letters (country), nine uppercase alphanumerics, one check digit; anything else is \"malformed\". Letters expand to two digits (A=10 .. Z=35), then Luhn doubling starts at the rightmost digit of the expanded 11-character payload. Return [computed check digit, whether it matches].","evaluation_group":"w2-check_digit_algorithms-isin-check","failed_approach":"Counting doubling positions from the left is only correct when the expanded payload has an odd length.","family":"w2-check_digit_algorithms-isin-check-payload-doubling-parity","id":"FA-72371","implementations":{"attempt":{"sha256":"9c2fdd9d37cb663e4a4b6824de28e1158a285306d45a96d7308caafc10b64737","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(s):\n    if len(s) != 12 or not s.isascii() or not s[:2].isalpha() or not s[:2].isupper():\n        return 'malformed'\n    if not s[2:11].isalnum() or s[2:11] != s[2:11].upper() or not s[11].isdigit():\n        return 'malformed'\n    digits = ''\n    for ch in s[:11]:\n        digits += ch if ch.isdigit() else str(ord(ch) - 55)\n    total = 0\n    for i, ch in enumerate(reversed(digits)):\n        d = int(ch)\n        if (len(digits) - 1 - i) % 2 == 0:\n            d *= 2\n            if d > 9:\n                d -= 9\n        total += d\n    check = (10 - total % 10) % 10\n    return [check, check == int(s[11])]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [\"US4V5PGS4IX8\"]', ['US4V5PGS4IX8'], [0, False]], ['regression [\"DEC85GG2TSS1\"]', ['DEC85GG2TSS1'], [4, False]], ['partial-repair [\"CHXVXSVIT016\"]', ['CHXVXSVIT016'], [1, False]], ['partial-repair [\"XS0K4JDSXBN1\"]', ['XS0K4JDSXBN1'], [4, False]], ['control [\"GBOV8F5J6090\"]', ['GBOV8F5J6090'], [7, False]], ['control [\"US6754047769\"]', ['US6754047769'], [8, False]], ['control [\"US037833100\"]', ['US037833100'], 'malformed'], ['control [\"us0378331005\"]', ['us0378331005'], 'malformed']], [['regression [\"CHXVXSVIT016\"]', ['CHXVXSVIT016'], [1, False]], ['regression [\"FRLWNIYHPT37\"]', ['FRLWNIYHPT37'], [5, False]], ['partial-repair [\"AU0000XVGZA3\"]', ['AU0000XVGZA3'], [3, True]], ['partial-repair [\"DE000BAY0017\"]', ['DE000BAY0017'], [7, True]], ['control [\"12Q037833100\"]', ['12Q037833100'], 'malformed'], ['control [\"1S0378331005\"]', ['1S0378331005'], 'malformed'], ['control [\"U10378331005\"]', ['U10378331005'], 'malformed'], ['control [\"XS2021832634\"]', ['XS2021832634'], [4, True]]], [['regression [\"NL5BVKR8BB60\"]', ['NL5BVKR8BB60'], [3, False]], ['regression [\"AUKWRNHD2XR3\"]', ['AUKWRNHD2XR3'], [8, False]], ['partial-repair [\"CA0000ABCDE0\"]', ['CA0000ABCDE0'], [9, False]], ['partial-repair [\"CHXVXSVIT016\"]', ['CHXVXSVIT016'], [1, False]], ['control [\"GBOV8F5J6090\"]', ['GBOV8F5J6090'], [7, False]], ['control [\"US6754047769\"]', ['US6754047769'], [8, False]], ['control [\"US037833100\"]', ['US037833100'], 'malformed'], ['control [\"us0378331005\"]', ['us0378331005'], 'malformed']], [['regression [\"IE9141151847\"]', ['IE9141151847'], [0, False]], ['regression [\"LU7763909076\"]', ['LU7763909076'], [8, False]], ['partial-repair [\"CA3CKMM2IAN8\"]', ['CA3CKMM2IAN8'], [0, False]], ['partial-repair [\"AU0000XVGZA3\"]', ['AU0000XVGZA3'], [3, True]], ['control [\"12Q037833100\"]', ['12Q037833100'], 'malformed'], ['control [\"1S0378331005\"]', ['1S0378331005'], 'malformed'], ['control [\"U10378331005\"]', ['U10378331005'], 'malformed'], ['control [\"XS2021832634\"]', ['XS2021832634'], [4, True]]], [['regression [\"BM9170095145\"]', ['BM9170095145'], [7, False]], ['regression [\"US0378331005\"]', ['US0378331005'], [5, True]], ['partial-repair [\"US38259P5089\"]', ['US38259P5089'], [9, True]], ['partial-repair [\"CA0000ABCDE0\"]', ['CA0000ABCDE0'], [9, False]], ['control [\"GBOV8F5J6090\"]', ['GBOV8F5J6090'], [7, False]], ['control [\"US6754047769\"]', ['US6754047769'], [8, False]], ['control [\"US037833100\"]', ['US037833100'], 'malformed'], ['control [\"us0378331005\"]', ['us0378331005'], 'malformed']]]\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":"781864c2438dc0eb9c3a1130a0694c4e5f404b9957ef7af90d917ceb14e79291","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(s):\n    if len(s) != 12 or not s.isascii() or not s[:2].isalpha() or not s[:2].isupper():\n        return 'malformed'\n    if not s[2:11].isalnum() or s[2:11] != s[2:11].upper() or not s[11].isdigit():\n        return 'malformed'\n    digits = ''\n    for ch in s[:11]:\n        digits += ch if ch.isdigit() else str(ord(ch) - 55)\n    total = 0\n    for i, ch in enumerate(reversed(digits)):\n        d = int(ch)\n        if i % 2 == 1:\n            d *= 2\n            if d > 9:\n                d -= 9\n        total += d\n    check = (10 - total % 10) % 10\n    return [check, check == int(s[11])]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [\"US4V5PGS4IX8\"]', ['US4V5PGS4IX8'], [0, False]], ['regression [\"DEC85GG2TSS1\"]', ['DEC85GG2TSS1'], [4, False]], ['partial-repair [\"CHXVXSVIT016\"]', ['CHXVXSVIT016'], [1, False]], ['partial-repair [\"XS0K4JDSXBN1\"]', ['XS0K4JDSXBN1'], [4, False]], ['control [\"GBOV8F5J6090\"]', ['GBOV8F5J6090'], [7, False]], ['control [\"US6754047769\"]', ['US6754047769'], [8, False]], ['control [\"US037833100\"]', ['US037833100'], 'malformed'], ['control [\"us0378331005\"]', ['us0378331005'], 'malformed']], [['regression [\"CHXVXSVIT016\"]', ['CHXVXSVIT016'], [1, False]], ['regression [\"FRLWNIYHPT37\"]', ['FRLWNIYHPT37'], [5, False]], ['partial-repair [\"AU0000XVGZA3\"]', ['AU0000XVGZA3'], [3, True]], ['partial-repair [\"DE000BAY0017\"]', ['DE000BAY0017'], [7, True]], ['control [\"12Q037833100\"]', ['12Q037833100'], 'malformed'], ['control [\"1S0378331005\"]', ['1S0378331005'], 'malformed'], ['control [\"U10378331005\"]', ['U10378331005'], 'malformed'], ['control [\"XS2021832634\"]', ['XS2021832634'], [4, True]]], [['regression [\"NL5BVKR8BB60\"]', ['NL5BVKR8BB60'], [3, False]], ['regression [\"AUKWRNHD2XR3\"]', ['AUKWRNHD2XR3'], [8, False]], ['partial-repair [\"CA0000ABCDE0\"]', ['CA0000ABCDE0'], [9, False]], ['partial-repair [\"CHXVXSVIT016\"]', ['CHXVXSVIT016'], [1, False]], ['control [\"GBOV8F5J6090\"]', ['GBOV8F5J6090'], [7, False]], ['control [\"US6754047769\"]', ['US6754047769'], [8, False]], ['control [\"US037833100\"]', ['US037833100'], 'malformed'], ['control [\"us0378331005\"]', ['us0378331005'], 'malformed']], [['regression [\"IE9141151847\"]', ['IE9141151847'], [0, False]], ['regression [\"LU7763909076\"]', ['LU7763909076'], [8, False]], ['partial-repair [\"CA3CKMM2IAN8\"]', ['CA3CKMM2IAN8'], [0, False]], ['partial-repair [\"AU0000XVGZA3\"]', ['AU0000XVGZA3'], [3, True]], ['control [\"12Q037833100\"]', ['12Q037833100'], 'malformed'], ['control [\"1S0378331005\"]', ['1S0378331005'], 'malformed'], ['control [\"U10378331005\"]', ['U10378331005'], 'malformed'], ['control [\"XS2021832634\"]', ['XS2021832634'], [4, True]]], [['regression [\"BM9170095145\"]', ['BM9170095145'], [7, False]], ['regression [\"US0378331005\"]', ['US0378331005'], [5, True]], ['partial-repair [\"US38259P5089\"]', ['US38259P5089'], [9, True]], ['partial-repair [\"CA0000ABCDE0\"]', ['CA0000ABCDE0'], [9, False]], ['control [\"GBOV8F5J6090\"]', ['GBOV8F5J6090'], [7, False]], ['control [\"US6754047769\"]', ['US6754047769'], [8, False]], ['control [\"US037833100\"]', ['US037833100'], 'malformed'], ['control [\"us0378331005\"]', ['us0378331005'], 'malformed']]]\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":"8b5177b5decdee4843d67f6a4823b91da0b81f179723abd6e33acfe04086fe55","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(s):\n    if len(s) != 12 or not s.isascii() or not s[:2].isalpha() or not s[:2].isupper():\n        return 'malformed'\n    if not s[2:11].isalnum() or s[2:11] != s[2:11].upper() or not s[11].isdigit():\n        return 'malformed'\n    digits = ''\n    for ch in s[:11]:\n        digits += ch if ch.isdigit() else str(ord(ch) - 55)\n    total = 0\n    for i, ch in enumerate(reversed(digits)):\n        d = int(ch)\n        if i % 2 == 0:\n            d *= 2\n            if d > 9:\n                d -= 9\n        total += d\n    check = (10 - total % 10) % 10\n    return [check, check == int(s[11])]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [\"US4V5PGS4IX8\"]', ['US4V5PGS4IX8'], [0, False]], ['regression [\"DEC85GG2TSS1\"]', ['DEC85GG2TSS1'], [4, False]], ['partial-repair [\"CHXVXSVIT016\"]', ['CHXVXSVIT016'], [1, False]], ['partial-repair [\"XS0K4JDSXBN1\"]', ['XS0K4JDSXBN1'], [4, False]], ['control [\"GBOV8F5J6090\"]', ['GBOV8F5J6090'], [7, False]], ['control [\"US6754047769\"]', ['US6754047769'], [8, False]], ['control [\"US037833100\"]', ['US037833100'], 'malformed'], ['control [\"us0378331005\"]', ['us0378331005'], 'malformed']], [['regression [\"CHXVXSVIT016\"]', ['CHXVXSVIT016'], [1, False]], ['regression [\"FRLWNIYHPT37\"]', ['FRLWNIYHPT37'], [5, False]], ['partial-repair [\"AU0000XVGZA3\"]', ['AU0000XVGZA3'], [3, True]], ['partial-repair [\"DE000BAY0017\"]', ['DE000BAY0017'], [7, True]], ['control [\"12Q037833100\"]', ['12Q037833100'], 'malformed'], ['control [\"1S0378331005\"]', ['1S0378331005'], 'malformed'], ['control [\"U10378331005\"]', ['U10378331005'], 'malformed'], ['control [\"XS2021832634\"]', ['XS2021832634'], [4, True]]], [['regression [\"NL5BVKR8BB60\"]', ['NL5BVKR8BB60'], [3, False]], ['regression [\"AUKWRNHD2XR3\"]', ['AUKWRNHD2XR3'], [8, False]], ['partial-repair [\"CA0000ABCDE0\"]', ['CA0000ABCDE0'], [9, False]], ['partial-repair [\"CHXVXSVIT016\"]', ['CHXVXSVIT016'], [1, False]], ['control [\"GBOV8F5J6090\"]', ['GBOV8F5J6090'], [7, False]], ['control [\"US6754047769\"]', ['US6754047769'], [8, False]], ['control [\"US037833100\"]', ['US037833100'], 'malformed'], ['control [\"us0378331005\"]', ['us0378331005'], 'malformed']], [['regression [\"IE9141151847\"]', ['IE9141151847'], [0, False]], ['regression [\"LU7763909076\"]', ['LU7763909076'], [8, False]], ['partial-repair [\"CA3CKMM2IAN8\"]', ['CA3CKMM2IAN8'], [0, False]], ['partial-repair [\"AU0000XVGZA3\"]', ['AU0000XVGZA3'], [3, True]], ['control [\"12Q037833100\"]', ['12Q037833100'], 'malformed'], ['control [\"1S0378331005\"]', ['1S0378331005'], 'malformed'], ['control [\"U10378331005\"]', ['U10378331005'], 'malformed'], ['control [\"XS2021832634\"]', ['XS2021832634'], [4, True]]], [['regression [\"BM9170095145\"]', ['BM9170095145'], [7, False]], ['regression [\"US0378331005\"]', ['US0378331005'], [5, True]], ['partial-repair [\"US38259P5089\"]', ['US38259P5089'], [9, True]], ['partial-repair [\"CA0000ABCDE0\"]', ['CA0000ABCDE0'], [9, False]], ['control [\"GBOV8F5J6090\"]', ['GBOV8F5J6090'], [7, False]], ['control [\"US6754047769\"]', ['US6754047769'], [8, False]], ['control [\"US037833100\"]', ['US037833100'], 'malformed'], ['control [\"us0378331005\"]', ['us0378331005'], 'malformed']]]\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-isin-check-payload-doubling-parity","generated_at":"2026-09-29T14:48:37.933135+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Securities settlement systems reject ISINs whose check digit does not match before routing trades.","repair":"When generating from the payload, double the rightmost expanded payload digit (even offsets).","root_cause":"The generator doubles digits at odd offsets (validation parity) even though the check digit is absent from the payload.","sha256":"4f871a9e7d9bef1e359d1d1f2b88eaec457a963030b2057ab58809de800d1ed5","title":"ISIN generation doubles with validation parity · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.657,"exit_code":1,"observations":[{"actual":[0,false],"check":"regression [\"US4V5PGS4IX8\"]","expected":[0,false],"passed":true},{"actual":[4,false],"check":"regression [\"DEC85GG2TSS1\"]","expected":[4,false],"passed":true},{"actual":[9,false],"check":"partial-repair [\"CHXVXSVIT016\"]","expected":[1,false],"passed":false},{"actual":[6,false],"check":"partial-repair [\"XS0K4JDSXBN1\"]","expected":[4,false],"passed":false},{"actual":[7,false],"check":"control [\"GBOV8F5J6090\"]","expected":[7,false],"passed":true},{"actual":[8,false],"check":"control [\"US6754047769\"]","expected":[8,false],"passed":true},{"actual":"malformed","check":"control [\"US037833100\"]","expected":"malformed","passed":true},{"actual":"malformed","check":"control [\"us0378331005\"]","expected":"malformed","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [\\\"US4V5PGS4IX8\\\"]\", \"actual\": [0, false], \"expected\": [0, false], \"passed\": true}, {\"check\": \"regression [\\\"DEC85GG2TSS1\\\"]\", \"actual\": [4, false], \"expected\": [4, false], \"passed\": true}, {\"check\": \"partial-repair [\\\"CHXVXSVIT016\\\"]\", \"actual\": [9, false], \"expected\": [1, false], \"passed\": false}, {\"check\": \"partial-repair [\\\"XS0K4JDSXBN1\\\"]\", \"actual\": [6, false], \"expected\": [4, false], \"passed\": false}, {\"check\": \"control [\\\"GBOV8F5J6090\\\"]\", \"actual\": [7, false], \"expected\": [7, false], \"passed\": true}, {\"check\": \"control [\\\"US6754047769\\\"]\", \"actual\": [8, false], \"expected\": [8, false], \"passed\": true}, {\"check\": \"control [\\\"US037833100\\\"]\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}, {\"check\": \"control [\\\"us0378331005\\\"]\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.594,"exit_code":1,"observations":[{"actual":[7,false],"check":"regression [\"US4V5PGS4IX8\"]","expected":[0,false],"passed":false},{"actual":[3,false],"check":"regression [\"DEC85GG2TSS1\"]","expected":[4,false],"passed":false},{"actual":[9,false],"check":"partial-repair [\"CHXVXSVIT016\"]","expected":[1,false],"passed":false},{"actual":[6,false],"check":"partial-repair [\"XS0K4JDSXBN1\"]","expected":[4,false],"passed":false},{"actual":[7,false],"check":"control [\"GBOV8F5J6090\"]","expected":[7,false],"passed":true},{"actual":[8,false],"check":"control [\"US6754047769\"]","expected":[8,false],"passed":true},{"actual":"malformed","check":"control [\"US037833100\"]","expected":"malformed","passed":true},{"actual":"malformed","check":"control [\"us0378331005\"]","expected":"malformed","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [\\\"US4V5PGS4IX8\\\"]\", \"actual\": [7, false], \"expected\": [0, false], \"passed\": false}, {\"check\": \"regression [\\\"DEC85GG2TSS1\\\"]\", \"actual\": [3, false], \"expected\": [4, false], \"passed\": false}, {\"check\": \"partial-repair [\\\"CHXVXSVIT016\\\"]\", \"actual\": [9, false], \"expected\": [1, false], \"passed\": false}, {\"check\": \"partial-repair [\\\"XS0K4JDSXBN1\\\"]\", \"actual\": [6, false], \"expected\": [4, false], \"passed\": false}, {\"check\": \"control [\\\"GBOV8F5J6090\\\"]\", \"actual\": [7, false], \"expected\": [7, false], \"passed\": true}, {\"check\": \"control [\\\"US6754047769\\\"]\", \"actual\": [8, false], \"expected\": [8, false], \"passed\": true}, {\"check\": \"control [\\\"US037833100\\\"]\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}, {\"check\": \"control [\\\"us0378331005\\\"]\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.998,"exit_code":0,"observations":[{"actual":[0,false],"check":"regression [\"US4V5PGS4IX8\"]","expected":[0,false],"passed":true},{"actual":[4,false],"check":"regression [\"DEC85GG2TSS1\"]","expected":[4,false],"passed":true},{"actual":[1,false],"check":"partial-repair [\"CHXVXSVIT016\"]","expected":[1,false],"passed":true},{"actual":[4,false],"check":"partial-repair [\"XS0K4JDSXBN1\"]","expected":[4,false],"passed":true},{"actual":[7,false],"check":"control [\"GBOV8F5J6090\"]","expected":[7,false],"passed":true},{"actual":[8,false],"check":"control [\"US6754047769\"]","expected":[8,false],"passed":true},{"actual":"malformed","check":"control [\"US037833100\"]","expected":"malformed","passed":true},{"actual":"malformed","check":"control [\"us0378331005\"]","expected":"malformed","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [\\\"US4V5PGS4IX8\\\"]\", \"actual\": [0, false], \"expected\": [0, false], \"passed\": true}, {\"check\": \"regression [\\\"DEC85GG2TSS1\\\"]\", \"actual\": [4, false], \"expected\": [4, false], \"passed\": true}, {\"check\": \"partial-repair [\\\"CHXVXSVIT016\\\"]\", \"actual\": [1, false], \"expected\": [1, false], \"passed\": true}, {\"check\": \"partial-repair [\\\"XS0K4JDSXBN1\\\"]\", \"actual\": [4, false], \"expected\": [4, false], \"passed\": true}, {\"check\": \"control [\\\"GBOV8F5J6090\\\"]\", \"actual\": [7, false], \"expected\": [7, false], \"passed\": true}, {\"check\": \"control [\\\"US6754047769\\\"]\", \"actual\": [8, false], \"expected\": [8, false], \"passed\": true}, {\"check\": \"control [\\\"US037833100\\\"]\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}, {\"check\": \"control [\\\"us0378331005\\\"]\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}