{"abstract":"\"K1A4B1C\" is returned as \"K1A 4B1C\".","category":"Postal address normalization","checks":8,"contract":"Strip and uppercase. A 7-character input with a space at index 3 loses the space. The result must be 6 characters alternating ASCII letter, digit, letter, digit, letter, digit. Letters D F I O Q U are forbidden everywhere; W and Z are forbidden in the first position only. Return \"L9L 9L9\" or None.","evaluation_group":"w2-postal-address-normalization-alternating-six","failed_approach":"Rejecting only codes longer than six accepts a truncated five-character code.","family":"w2-postal-address-normalization-alternating-six-exact-length","id":"FA-95986","implementations":{"attempt":{"sha256":"2466a5eae6d719f4179bf05be9447ac2f7b1a1fa49d14752624af7e2c483cfbb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    s = x.strip().upper()\n    if len(s) == 7 and s[3] == ' ':\n        s = s[:3] + s[4:]\n    if len(s) > 6:\n        return None\n    for i, c in enumerate(s):\n        if i % 2 == 0:\n            if not ('A' <= c <= 'Z') or c in 'DFIOQU':\n                return None\n        elif not c.isdigit():\n            return None\n    if s[0] in 'WZ':\n        return None\n    return s[:3] + ' ' + s[3:]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['compact code gets its space', 'K1A4B1', 'K1A 4B1'], ['spaced lowercase code', 'k1a 4b1', 'K1A 4B1'], ['hyphen separator rejected', 'K1A-4B1', None], ['forbidden letter in third position', 'K1U 4B1', None], ['Z not allowed first', 'Z1A 4B1', None], ['W allowed after the first position', 'K1W 4B1', 'K1W 4B1'], ['seven characters without space rejected', 'K1A4B1C', None], ['five characters rejected', 'K1A4B', None]], [['compact code gets its space', 'K2A5B2', 'K2A 5B2'], ['spaced lowercase code', 'k2a 5b2', 'K2A 5B2'], ['hyphen separator rejected', 'K2A-5B2', None], ['forbidden letter in third position', 'K2U 5B2', None], ['Z not allowed first', 'Z2A 5B2', None], ['W allowed after the first position', 'K2W 5B2', 'K2W 5B2'], ['seven characters without space rejected', 'K2A5B2C', None], ['five characters rejected', 'K2A5B', None]], [['compact code gets its space', 'K3A6B3', 'K3A 6B3'], ['spaced lowercase code', 'k3a 6b3', 'K3A 6B3'], ['hyphen separator rejected', 'K3A-6B3', None], ['forbidden letter in third position', 'K3U 6B3', None], ['Z not allowed first', 'Z3A 6B3', None], ['W allowed after the first position', 'K3W 6B3', 'K3W 6B3'], ['seven characters without space rejected', 'K3A6B3C', None], ['five characters rejected', 'K3A6B', None]], [['compact code gets its space', 'K4A7B4', 'K4A 7B4'], ['spaced lowercase code', 'k4a 7b4', 'K4A 7B4'], ['hyphen separator rejected', 'K4A-7B4', None], ['forbidden letter in third position', 'K4U 7B4', None], ['Z not allowed first', 'Z4A 7B4', None], ['W allowed after the first position', 'K4W 7B4', 'K4W 7B4'], ['seven characters without space rejected', 'K4A7B4C', None], ['five characters rejected', 'K4A7B', None]], [['compact code gets its space', 'K5A8B5', 'K5A 8B5'], ['spaced lowercase code', 'k5a 8b5', 'K5A 8B5'], ['hyphen separator rejected', 'K5A-8B5', None], ['forbidden letter in third position', 'K5U 8B5', None], ['Z not allowed first', 'Z5A 8B5', None], ['W allowed after the first position', 'K5W 8B5', 'K5W 8B5'], ['seven characters without space rejected', 'K5A8B5C', None], ['five characters rejected', 'K5A8B', None]]]\nfor label, arg, expected in fixtures[N - 1]:\n    check(label, solve(arg), 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":"4cc3536ffb4301576692abb0f36dffb11ab6e91e3b332eec9228348c7b2dfd63","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    s = x.strip().upper()\n    if len(s) == 7 and s[3] == ' ':\n        s = s[:3] + s[4:]\n    if len(s) < 6:\n        return None\n    for i, c in enumerate(s):\n        if i % 2 == 0:\n            if not ('A' <= c <= 'Z') or c in 'DFIOQU':\n                return None\n        elif not c.isdigit():\n            return None\n    if s[0] in 'WZ':\n        return None\n    return s[:3] + ' ' + s[3:]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['compact code gets its space', 'K1A4B1', 'K1A 4B1'], ['spaced lowercase code', 'k1a 4b1', 'K1A 4B1'], ['hyphen separator rejected', 'K1A-4B1', None], ['forbidden letter in third position', 'K1U 4B1', None], ['Z not allowed first', 'Z1A 4B1', None], ['W allowed after the first position', 'K1W 4B1', 'K1W 4B1'], ['seven characters without space rejected', 'K1A4B1C', None], ['five characters rejected', 'K1A4B', None]], [['compact code gets its space', 'K2A5B2', 'K2A 5B2'], ['spaced lowercase code', 'k2a 5b2', 'K2A 5B2'], ['hyphen separator rejected', 'K2A-5B2', None], ['forbidden letter in third position', 'K2U 5B2', None], ['Z not allowed first', 'Z2A 5B2', None], ['W allowed after the first position', 'K2W 5B2', 'K2W 5B2'], ['seven characters without space rejected', 'K2A5B2C', None], ['five characters rejected', 'K2A5B', None]], [['compact code gets its space', 'K3A6B3', 'K3A 6B3'], ['spaced lowercase code', 'k3a 6b3', 'K3A 6B3'], ['hyphen separator rejected', 'K3A-6B3', None], ['forbidden letter in third position', 'K3U 6B3', None], ['Z not allowed first', 'Z3A 6B3', None], ['W allowed after the first position', 'K3W 6B3', 'K3W 6B3'], ['seven characters without space rejected', 'K3A6B3C', None], ['five characters rejected', 'K3A6B', None]], [['compact code gets its space', 'K4A7B4', 'K4A 7B4'], ['spaced lowercase code', 'k4a 7b4', 'K4A 7B4'], ['hyphen separator rejected', 'K4A-7B4', None], ['forbidden letter in third position', 'K4U 7B4', None], ['Z not allowed first', 'Z4A 7B4', None], ['W allowed after the first position', 'K4W 7B4', 'K4W 7B4'], ['seven characters without space rejected', 'K4A7B4C', None], ['five characters rejected', 'K4A7B', None]], [['compact code gets its space', 'K5A8B5', 'K5A 8B5'], ['spaced lowercase code', 'k5a 8b5', 'K5A 8B5'], ['hyphen separator rejected', 'K5A-8B5', None], ['forbidden letter in third position', 'K5U 8B5', None], ['Z not allowed first', 'Z5A 8B5', None], ['W allowed after the first position', 'K5W 8B5', 'K5W 8B5'], ['seven characters without space rejected', 'K5A8B5C', None], ['five characters rejected', 'K5A8B', None]]]\nfor label, arg, expected in fixtures[N - 1]:\n    check(label, solve(arg), 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":"efed72eebe37599a741807a10ff6734557c6a7af68cd635f0291205c1a1853e3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    s = x.strip().upper()\n    if len(s) == 7 and s[3] == ' ':\n        s = s[:3] + s[4:]\n    if len(s) != 6:\n        return None\n    for i, c in enumerate(s):\n        if i % 2 == 0:\n            if not ('A' <= c <= 'Z') or c in 'DFIOQU':\n                return None\n        elif not c.isdigit():\n            return None\n    if s[0] in 'WZ':\n        return None\n    return s[:3] + ' ' + s[3:]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['compact code gets its space', 'K1A4B1', 'K1A 4B1'], ['spaced lowercase code', 'k1a 4b1', 'K1A 4B1'], ['hyphen separator rejected', 'K1A-4B1', None], ['forbidden letter in third position', 'K1U 4B1', None], ['Z not allowed first', 'Z1A 4B1', None], ['W allowed after the first position', 'K1W 4B1', 'K1W 4B1'], ['seven characters without space rejected', 'K1A4B1C', None], ['five characters rejected', 'K1A4B', None]], [['compact code gets its space', 'K2A5B2', 'K2A 5B2'], ['spaced lowercase code', 'k2a 5b2', 'K2A 5B2'], ['hyphen separator rejected', 'K2A-5B2', None], ['forbidden letter in third position', 'K2U 5B2', None], ['Z not allowed first', 'Z2A 5B2', None], ['W allowed after the first position', 'K2W 5B2', 'K2W 5B2'], ['seven characters without space rejected', 'K2A5B2C', None], ['five characters rejected', 'K2A5B', None]], [['compact code gets its space', 'K3A6B3', 'K3A 6B3'], ['spaced lowercase code', 'k3a 6b3', 'K3A 6B3'], ['hyphen separator rejected', 'K3A-6B3', None], ['forbidden letter in third position', 'K3U 6B3', None], ['Z not allowed first', 'Z3A 6B3', None], ['W allowed after the first position', 'K3W 6B3', 'K3W 6B3'], ['seven characters without space rejected', 'K3A6B3C', None], ['five characters rejected', 'K3A6B', None]], [['compact code gets its space', 'K4A7B4', 'K4A 7B4'], ['spaced lowercase code', 'k4a 7b4', 'K4A 7B4'], ['hyphen separator rejected', 'K4A-7B4', None], ['forbidden letter in third position', 'K4U 7B4', None], ['Z not allowed first', 'Z4A 7B4', None], ['W allowed after the first position', 'K4W 7B4', 'K4W 7B4'], ['seven characters without space rejected', 'K4A7B4C', None], ['five characters rejected', 'K4A7B', None]], [['compact code gets its space', 'K5A8B5', 'K5A 8B5'], ['spaced lowercase code', 'k5a 8b5', 'K5A 8B5'], ['hyphen separator rejected', 'K5A-8B5', None], ['forbidden letter in third position', 'K5U 8B5', None], ['Z not allowed first', 'Z5A 8B5', None], ['W allowed after the first position', 'K5W 8B5', 'K5W 8B5'], ['seven characters without space rejected', 'K5A8B5C', None], ['five characters rejected', 'K5A8B', None]]]\nfor label, arg, expected in fixtures[N - 1]:\n    check(label, solve(arg), 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 toy contract over synthetic, obviously fictitious addresses. The rules are stipulated for this model only and make no claim of conformance with any postal authority standard. 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-postal-address-normalization-alternating-six-exact-length","generated_at":"2026-09-29T14:52:18.716306+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Six-character alternating codes are typed with and without the space; rejecting or accepting the wrong letters silently drops or misroutes mail.","repair":"Require exactly six characters after removing the separator.","root_cause":"The length test only rejects codes shorter than six characters.","sha256":"10440460b63b9aacc320d9cd3369b2f028257f8b03df44028074933626727f9e","title":"Alternating letter-digit postal code: overlong codes pass the length test · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.561,"exit_code":1,"observations":[{"actual":"K1A 4B1","check":"compact code gets its space","expected":"K1A 4B1","passed":true},{"actual":"K1A 4B1","check":"spaced lowercase code","expected":"K1A 4B1","passed":true},{"actual":null,"check":"hyphen separator rejected","expected":null,"passed":true},{"actual":null,"check":"forbidden letter in third position","expected":null,"passed":true},{"actual":null,"check":"Z not allowed first","expected":null,"passed":true},{"actual":"K1W 4B1","check":"W allowed after the first position","expected":"K1W 4B1","passed":true},{"actual":null,"check":"seven characters without space rejected","expected":null,"passed":true},{"actual":"K1A 4B","check":"five characters rejected","expected":null,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"compact code gets its space\", \"actual\": \"K1A 4B1\", \"expected\": \"K1A 4B1\", \"passed\": true}, {\"check\": \"spaced lowercase code\", \"actual\": \"K1A 4B1\", \"expected\": \"K1A 4B1\", \"passed\": true}, {\"check\": \"hyphen separator rejected\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"forbidden letter in third position\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"Z not allowed first\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"W allowed after the first position\", \"actual\": \"K1W 4B1\", \"expected\": \"K1W 4B1\", \"passed\": true}, {\"check\": \"seven characters without space rejected\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"five characters rejected\", \"actual\": \"K1A 4B\", \"expected\": null, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.072,"exit_code":1,"observations":[{"actual":"K1A 4B1","check":"compact code gets its space","expected":"K1A 4B1","passed":true},{"actual":"K1A 4B1","check":"spaced lowercase code","expected":"K1A 4B1","passed":true},{"actual":null,"check":"hyphen separator rejected","expected":null,"passed":true},{"actual":null,"check":"forbidden letter in third position","expected":null,"passed":true},{"actual":null,"check":"Z not allowed first","expected":null,"passed":true},{"actual":"K1W 4B1","check":"W allowed after the first position","expected":"K1W 4B1","passed":true},{"actual":"K1A 4B1C","check":"seven characters without space rejected","expected":null,"passed":false},{"actual":null,"check":"five characters rejected","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"compact code gets its space\", \"actual\": \"K1A 4B1\", \"expected\": \"K1A 4B1\", \"passed\": true}, {\"check\": \"spaced lowercase code\", \"actual\": \"K1A 4B1\", \"expected\": \"K1A 4B1\", \"passed\": true}, {\"check\": \"hyphen separator rejected\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"forbidden letter in third position\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"Z not allowed first\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"W allowed after the first position\", \"actual\": \"K1W 4B1\", \"expected\": \"K1W 4B1\", \"passed\": true}, {\"check\": \"seven characters without space rejected\", \"actual\": \"K1A 4B1C\", \"expected\": null, \"passed\": false}, {\"check\": \"five characters rejected\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.939,"exit_code":0,"observations":[{"actual":"K1A 4B1","check":"compact code gets its space","expected":"K1A 4B1","passed":true},{"actual":"K1A 4B1","check":"spaced lowercase code","expected":"K1A 4B1","passed":true},{"actual":null,"check":"hyphen separator rejected","expected":null,"passed":true},{"actual":null,"check":"forbidden letter in third position","expected":null,"passed":true},{"actual":null,"check":"Z not allowed first","expected":null,"passed":true},{"actual":"K1W 4B1","check":"W allowed after the first position","expected":"K1W 4B1","passed":true},{"actual":null,"check":"seven characters without space rejected","expected":null,"passed":true},{"actual":null,"check":"five characters rejected","expected":null,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"compact code gets its space\", \"actual\": \"K1A 4B1\", \"expected\": \"K1A 4B1\", \"passed\": true}, {\"check\": \"spaced lowercase code\", \"actual\": \"K1A 4B1\", \"expected\": \"K1A 4B1\", \"passed\": true}, {\"check\": \"hyphen separator rejected\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"forbidden letter in third position\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"Z not allowed first\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"W allowed after the first position\", \"actual\": \"K1W 4B1\", \"expected\": \"K1W 4B1\", \"passed\": true}, {\"check\": \"seven characters without space rejected\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"five characters rejected\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}