{"abstract":"Every valid IBAN fails and certain wrong ones pass.","category":"Check-digit algorithms","checks":8,"contract":"IBAN validation for the countries DE 22, GB 22, FR 27, NL 18, BE 16, NO 15, MT 31 (other countries: \"malformed\"). Spaces (print format) are removed and letters are upper-cased. The check digits must be 02..98. Move the first four characters to the end, replace letters with 10..35, and the IBAN is \"valid\" when the number is 1 mod 97.","contract_signature":"s","evaluation_group":"w2-check_digit_algorithms-iban-mod97","failed_approach":"Accepting remainder 0 or 1 admits IBANs whose check digits are off by one.","family":"w2-check_digit_algorithms-iban-mod97-remainder-target","id":"FA-72491","implementations":{"attempt":{"sha256":"6997b7888dd4e91e2e1d7acf2fb9d0e0ad274e9e42c4163fa6b4f4c7961fc7d7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(s):\n    LENGTHS = {'DE': 22, 'GB': 22, 'FR': 27, 'NL': 18, 'BE': 16, 'NO': 15, 'MT': 31}\n    t = s.replace(' ', '').upper()\n    if len(t) < 5 or not t.isascii() or not t.isalnum():\n        return 'malformed'\n    if not t[:2].isalpha() or not t[2:4].isdigit() or not 2 <= int(t[2:4]) <= 98:\n        return 'malformed'\n    if LENGTHS.get(t[:2]) != len(t):\n        return 'malformed'\n    r = t[4:] + t[:4]\n    n = ''.join(str(int(ch, 36)) for ch in r)\n    return 'valid' if int(n) % 97 in (0, 1) else 'invalid'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [\"DE59811903138375291124\"]', ['DE59811903138375291124'], 'valid'], ['regression [\"DE50296496123032354476\"]', ['DE50296496123032354476'], 'valid'], ['partial-repair [\"DE58811903138375291124\"]', ['DE58811903138375291124'], 'invalid'], ['partial-repair [\"DE49296496123032354476\"]', ['DE49296496123032354476'], 'invalid'], ['control [\"DE59811903138375291127\"]', ['DE59811903138375291127'], 'invalid'], ['control [\"DE50296496123032354477\"]', ['DE50296496123032354477'], 'invalid'], ['control [\"DE58862288567935243527\"]', ['DE58862288567935243527'], 'invalid'], ['control [\"GB12YUBO17171961366337\"]', ['GB12YUBO17171961366337'], 'invalid']], [['regression [\"GB12YUBO17171961366336\"]', ['GB12YUBO17171961366336'], 'valid'], ['regression [\"GB30TWRL09177880233695\"]', ['GB30TWRL09177880233695'], 'valid'], ['partial-repair [\"GB11YUBO17171961366336\"]', ['GB11YUBO17171961366336'], 'invalid'], ['partial-repair [\"GB29TWRL09177880233695\"]', ['GB29TWRL09177880233695'], 'invalid'], ['control [\"GB23HJGZ79203524065167\"]', ['GB23HJGZ79203524065167'], 'invalid'], ['control [\"DE00050434738327048798\"]', ['DE00050434738327048798'], 'malformed'], ['control [\"DE01819403115748858673\"]', ['DE01819403115748858673'], 'malformed'], ['control [\"DE01435241396484727591\"]', ['DE01435241396484727591'], 'malformed']], [['regression [\"FR88HIO0QY01NRB0VCRB14QO450\"]', ['FR88HIO0QY01NRB0VCRB14QO450'], 'valid'], ['regression [\"FR38Q7OJKEPW4X8D3YP3O6RO9CF\"]', ['FR38Q7OJKEPW4X8D3YP3O6RO9CF'], 'valid'], ['partial-repair [\"DE58811903138375291124\"]', ['DE58811903138375291124'], 'invalid'], ['partial-repair [\"DE49296496123032354476\"]', ['DE49296496123032354476'], 'invalid'], ['control [\"XX82WEST12345698765432\"]', ['XX82WEST12345698765432'], 'malformed'], ['control [\"US64SVBKUS6S3300958879\"]', ['US64SVBKUS6S3300958879'], 'malformed'], ['control [\"GB82WEST1234569876543\"]', ['GB82WEST1234569876543'], 'malformed'], ['control [\"GB82-WEST-1234\"]', ['GB82-WEST-1234'], 'malformed']], [['regression [\"NL34HYUK1800961826\"]', ['NL34HYUK1800961826'], 'valid'], ['regression [\"NL15KCEZ0926524218\"]', ['NL15KCEZ0926524218'], 'valid'], ['partial-repair [\"GB11YUBO17171961366336\"]', ['GB11YUBO17171961366336'], 'invalid'], ['partial-repair [\"GB29TWRL09177880233695\"]', ['GB29TWRL09177880233695'], 'invalid'], ['control [\"NO0886011117947\"]', ['NO0886011117947'], 'invalid'], ['control [\"DE59811903138375291127\"]', ['DE59811903138375291127'], 'invalid'], ['control [\"DE50296496123032354477\"]', ['DE50296496123032354477'], 'invalid'], ['control [\"DE58862288567935243527\"]', ['DE58862288567935243527'], 'invalid']], [['regression [\"BE73177155519075\"]', ['BE73177155519075'], 'valid'], ['regression [\"BE31287393626938\"]', ['BE31287393626938'], 'valid'], ['partial-repair [\"DE58811903138375291124\"]', ['DE58811903138375291124'], 'invalid'], ['partial-repair [\"DE49296496123032354476\"]', ['DE49296496123032354476'], 'invalid'], ['control [\"GB30TWRL09177880233697\"]', ['GB30TWRL09177880233697'], 'invalid'], ['control [\"GB23HJGZ79203524065167\"]', ['GB23HJGZ79203524065167'], 'invalid'], ['control [\"DE00050434738327048798\"]', ['DE00050434738327048798'], 'malformed'], ['control [\"DE01819403115748858673\"]', ['DE01819403115748858673'], '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":"17eb6cc595ffd63820ae7f49e852dc824f84e7b20143f4215be2f83a0c98a224","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(s):\n    LENGTHS = {'DE': 22, 'GB': 22, 'FR': 27, 'NL': 18, 'BE': 16, 'NO': 15, 'MT': 31}\n    t = s.replace(' ', '').upper()\n    if len(t) < 5 or not t.isascii() or not t.isalnum():\n        return 'malformed'\n    if not t[:2].isalpha() or not t[2:4].isdigit() or not 2 <= int(t[2:4]) <= 98:\n        return 'malformed'\n    if LENGTHS.get(t[:2]) != len(t):\n        return 'malformed'\n    r = t[4:] + t[:4]\n    n = ''.join(str(int(ch, 36)) for ch in r)\n    return 'valid' if int(n) % 97 == 0 else 'invalid'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [\"DE59811903138375291124\"]', ['DE59811903138375291124'], 'valid'], ['regression [\"DE50296496123032354476\"]', ['DE50296496123032354476'], 'valid'], ['partial-repair [\"DE58811903138375291124\"]', ['DE58811903138375291124'], 'invalid'], ['partial-repair [\"DE49296496123032354476\"]', ['DE49296496123032354476'], 'invalid'], ['control [\"DE59811903138375291127\"]', ['DE59811903138375291127'], 'invalid'], ['control [\"DE50296496123032354477\"]', ['DE50296496123032354477'], 'invalid'], ['control [\"DE58862288567935243527\"]', ['DE58862288567935243527'], 'invalid'], ['control [\"GB12YUBO17171961366337\"]', ['GB12YUBO17171961366337'], 'invalid']], [['regression [\"GB12YUBO17171961366336\"]', ['GB12YUBO17171961366336'], 'valid'], ['regression [\"GB30TWRL09177880233695\"]', ['GB30TWRL09177880233695'], 'valid'], ['partial-repair [\"GB11YUBO17171961366336\"]', ['GB11YUBO17171961366336'], 'invalid'], ['partial-repair [\"GB29TWRL09177880233695\"]', ['GB29TWRL09177880233695'], 'invalid'], ['control [\"GB23HJGZ79203524065167\"]', ['GB23HJGZ79203524065167'], 'invalid'], ['control [\"DE00050434738327048798\"]', ['DE00050434738327048798'], 'malformed'], ['control [\"DE01819403115748858673\"]', ['DE01819403115748858673'], 'malformed'], ['control [\"DE01435241396484727591\"]', ['DE01435241396484727591'], 'malformed']], [['regression [\"FR88HIO0QY01NRB0VCRB14QO450\"]', ['FR88HIO0QY01NRB0VCRB14QO450'], 'valid'], ['regression [\"FR38Q7OJKEPW4X8D3YP3O6RO9CF\"]', ['FR38Q7OJKEPW4X8D3YP3O6RO9CF'], 'valid'], ['partial-repair [\"DE58811903138375291124\"]', ['DE58811903138375291124'], 'invalid'], ['partial-repair [\"DE49296496123032354476\"]', ['DE49296496123032354476'], 'invalid'], ['control [\"XX82WEST12345698765432\"]', ['XX82WEST12345698765432'], 'malformed'], ['control [\"US64SVBKUS6S3300958879\"]', ['US64SVBKUS6S3300958879'], 'malformed'], ['control [\"GB82WEST1234569876543\"]', ['GB82WEST1234569876543'], 'malformed'], ['control [\"GB82-WEST-1234\"]', ['GB82-WEST-1234'], 'malformed']], [['regression [\"NL34HYUK1800961826\"]', ['NL34HYUK1800961826'], 'valid'], ['regression [\"NL15KCEZ0926524218\"]', ['NL15KCEZ0926524218'], 'valid'], ['partial-repair [\"GB11YUBO17171961366336\"]', ['GB11YUBO17171961366336'], 'invalid'], ['partial-repair [\"GB29TWRL09177880233695\"]', ['GB29TWRL09177880233695'], 'invalid'], ['control [\"NO0886011117947\"]', ['NO0886011117947'], 'invalid'], ['control [\"DE59811903138375291127\"]', ['DE59811903138375291127'], 'invalid'], ['control [\"DE50296496123032354477\"]', ['DE50296496123032354477'], 'invalid'], ['control [\"DE58862288567935243527\"]', ['DE58862288567935243527'], 'invalid']], [['regression [\"BE73177155519075\"]', ['BE73177155519075'], 'valid'], ['regression [\"BE31287393626938\"]', ['BE31287393626938'], 'valid'], ['partial-repair [\"DE58811903138375291124\"]', ['DE58811903138375291124'], 'invalid'], ['partial-repair [\"DE49296496123032354476\"]', ['DE49296496123032354476'], 'invalid'], ['control [\"GB30TWRL09177880233697\"]', ['GB30TWRL09177880233697'], 'invalid'], ['control [\"GB23HJGZ79203524065167\"]', ['GB23HJGZ79203524065167'], 'invalid'], ['control [\"DE00050434738327048798\"]', ['DE00050434738327048798'], 'malformed'], ['control [\"DE01819403115748858673\"]', ['DE01819403115748858673'], '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-iban-mod97-remainder-target","generated_at":"2026-09-29T14:48:39.037611+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Payment initiation rejects mistyped account identifiers before submitting transfers.","root_cause":"The rearranged number is tested for % 97 == 0; correct IBANs leave remainder 1.","sha256":"fa7977c38eb6d46ea6ae981282ec05efb725aa1dd4e41fd398fc6cb12d310e62","title":"IBAN validity expects remainder zero · 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":37.12,"exit_code":1,"observations":[{"actual":"valid","check":"regression [\"DE59811903138375291124\"]","expected":"valid","passed":true},{"actual":"valid","check":"regression [\"DE50296496123032354476\"]","expected":"valid","passed":true},{"actual":"valid","check":"partial-repair [\"DE58811903138375291124\"]","expected":"invalid","passed":false},{"actual":"valid","check":"partial-repair [\"DE49296496123032354476\"]","expected":"invalid","passed":false},{"actual":"invalid","check":"control [\"DE59811903138375291127\"]","expected":"invalid","passed":true},{"actual":"invalid","check":"control [\"DE50296496123032354477\"]","expected":"invalid","passed":true},{"actual":"invalid","check":"control [\"DE58862288567935243527\"]","expected":"invalid","passed":true},{"actual":"invalid","check":"control [\"GB12YUBO17171961366337\"]","expected":"invalid","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [\\\"DE59811903138375291124\\\"]\", \"actual\": \"valid\", \"expected\": \"valid\", \"passed\": true}, {\"check\": \"regression [\\\"DE50296496123032354476\\\"]\", \"actual\": \"valid\", \"expected\": \"valid\", \"passed\": true}, {\"check\": \"partial-repair [\\\"DE58811903138375291124\\\"]\", \"actual\": \"valid\", \"expected\": \"invalid\", \"passed\": false}, {\"check\": \"partial-repair [\\\"DE49296496123032354476\\\"]\", \"actual\": \"valid\", \"expected\": \"invalid\", \"passed\": false}, {\"check\": \"control [\\\"DE59811903138375291127\\\"]\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"control [\\\"DE50296496123032354477\\\"]\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"control [\\\"DE58862288567935243527\\\"]\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"control [\\\"GB12YUBO17171961366337\\\"]\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.644,"exit_code":1,"observations":[{"actual":"invalid","check":"regression [\"DE59811903138375291124\"]","expected":"valid","passed":false},{"actual":"invalid","check":"regression [\"DE50296496123032354476\"]","expected":"valid","passed":false},{"actual":"valid","check":"partial-repair [\"DE58811903138375291124\"]","expected":"invalid","passed":false},{"actual":"valid","check":"partial-repair [\"DE49296496123032354476\"]","expected":"invalid","passed":false},{"actual":"invalid","check":"control [\"DE59811903138375291127\"]","expected":"invalid","passed":true},{"actual":"invalid","check":"control [\"DE50296496123032354477\"]","expected":"invalid","passed":true},{"actual":"invalid","check":"control [\"DE58862288567935243527\"]","expected":"invalid","passed":true},{"actual":"invalid","check":"control [\"GB12YUBO17171961366337\"]","expected":"invalid","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [\\\"DE59811903138375291124\\\"]\", \"actual\": \"invalid\", \"expected\": \"valid\", \"passed\": false}, {\"check\": \"regression [\\\"DE50296496123032354476\\\"]\", \"actual\": \"invalid\", \"expected\": \"valid\", \"passed\": false}, {\"check\": \"partial-repair [\\\"DE58811903138375291124\\\"]\", \"actual\": \"valid\", \"expected\": \"invalid\", \"passed\": false}, {\"check\": \"partial-repair [\\\"DE49296496123032354476\\\"]\", \"actual\": \"valid\", \"expected\": \"invalid\", \"passed\": false}, {\"check\": \"control [\\\"DE59811903138375291127\\\"]\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"control [\\\"DE50296496123032354477\\\"]\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"control [\\\"DE58862288567935243527\\\"]\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"control [\\\"GB12YUBO17171961366337\\\"]\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"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."}}