{"abstract":"\"K1A-4B1\" normalizes to \"K1A 4B1\" although only a space separator is allowed.","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":"Accepting any non-alphanumeric separator admits the hyphen and more.","family":"w2-postal-address-normalization-alternating-six-separator-kind","id":"FA-95961","implementations":{"attempt":{"sha256":"4c202f06ec933400e201819727ae42217c1d70b8b3bf1df52c4fa23501bbfd83","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 not s[3].isalnum():\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":"8aa31bc73a814cd76247fae0b2672cf88bb0a6487a9f8fa76c709d49c1ae8e0f","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] in ' -':\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-separator-kind","generated_at":"2026-09-29T14:52:18.408510+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":"Remove a separator only when it is a single space at index 3.","root_cause":"The separator test admits a hyphen at index 3.","sha256":"82b083a6870b7829b5117e157c32a3abee3862e30512543b6cc24a8e2eadcec3","title":"Alternating letter-digit postal code: a hyphen separator is accepted · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":37.353,"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":"K1A 4B1","check":"hyphen separator rejected","expected":null,"passed":false},{"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":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\": \"K1A 4B1\", \"expected\": null, \"passed\": false}, {\"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\": false}\n"},"broken":{"elapsed_ms":40.401,"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":"K1A 4B1","check":"hyphen separator rejected","expected":null,"passed":false},{"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":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\": \"K1A 4B1\", \"expected\": null, \"passed\": false}, {\"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\": false}\n"},"fixed":{"elapsed_ms":38.618,"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"}