{"abstract":"\"RR21\" stays one token.","category":"Postal address normalization","checks":7,"contract":"Uppercase, delete periods, split. Two-token phrases RURAL ROUTE / RURAL RTE -> RR and HIGHWAY CONTRACT -> HC are matched before single tokens RR, HIGHWAY/HWY -> HWY, HC, BOX/BX -> BOX. A fused token \"RR\" + digits splits into RR and the digits. Other tokens pass through; join with spaces.","evaluation_group":"w2-postal-address-normalization-rural-route","failed_approach":"Slicing the digits from index 3 drops the first route digit.","family":"w2-postal-address-normalization-rural-route-fused-route","id":"FA-96266","implementations":{"attempt":{"sha256":"bc4b82b4c0396c7d6b42d14e1e751530a1e9c1e5481b30ddab3f38aef0413b1e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    t = x.upper().replace('.', '').split()\n    MAP2 = {('RURAL', 'ROUTE'): 'RR', ('HIGHWAY', 'CONTRACT'): 'HC', ('RURAL', 'RTE'): 'RR'}\n    MAP1 = {'RR': 'RR', 'HIGHWAY': 'HWY', 'HWY': 'HWY', 'HC': 'HC', 'BOX': 'BOX', 'BX': 'BOX'}\n    out, i = [], 0\n    while i < len(t):\n        pair = tuple(t[i:i + 2])\n        if pair in MAP2:\n            out.append(MAP2[pair])\n            i += 2\n        elif t[i] in MAP1:\n            out.append(MAP1[t[i]])\n            i += 1\n        elif t[i][:2] == 'RR' and t[i][2:].isdigit():\n            out.extend(['RR', t[i][3:]])\n            i += 1\n        else:\n            out.append(t[i])\n            i += 1\n    return ' '.join(out)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['spelled rural route', 'Rural Route 2 Box 11', 'RR 2 BOX 11'], ['dotted route and short box', 'R.R. 2 BX 11', 'RR 2 BOX 11'], ['fused two-digit route', 'RR21 BOX 3', 'RR 21 BOX 3'], ['highway contract route', 'HIGHWAY CONTRACT 2 BOX 11', 'HC 2 BOX 11'], ['plain highway', '11 HIGHWAY 2', '11 HWY 2'], ['abbreviated route word', 'RURAL RTE 2', 'RR 2'], ['street control', '11 FAKE RD', '11 FAKE RD']], [['spelled rural route', 'Rural Route 3 Box 12', 'RR 3 BOX 12'], ['dotted route and short box', 'R.R. 3 BX 12', 'RR 3 BOX 12'], ['fused two-digit route', 'RR32 BOX 3', 'RR 32 BOX 3'], ['highway contract route', 'HIGHWAY CONTRACT 3 BOX 12', 'HC 3 BOX 12'], ['plain highway', '12 HIGHWAY 3', '12 HWY 3'], ['abbreviated route word', 'RURAL RTE 3', 'RR 3'], ['street control', '12 FAKE RD', '12 FAKE RD']], [['spelled rural route', 'Rural Route 4 Box 13', 'RR 4 BOX 13'], ['dotted route and short box', 'R.R. 4 BX 13', 'RR 4 BOX 13'], ['fused two-digit route', 'RR43 BOX 3', 'RR 43 BOX 3'], ['highway contract route', 'HIGHWAY CONTRACT 4 BOX 13', 'HC 4 BOX 13'], ['plain highway', '13 HIGHWAY 4', '13 HWY 4'], ['abbreviated route word', 'RURAL RTE 4', 'RR 4'], ['street control', '13 FAKE RD', '13 FAKE RD']], [['spelled rural route', 'Rural Route 5 Box 14', 'RR 5 BOX 14'], ['dotted route and short box', 'R.R. 5 BX 14', 'RR 5 BOX 14'], ['fused two-digit route', 'RR54 BOX 3', 'RR 54 BOX 3'], ['highway contract route', 'HIGHWAY CONTRACT 5 BOX 14', 'HC 5 BOX 14'], ['plain highway', '14 HIGHWAY 5', '14 HWY 5'], ['abbreviated route word', 'RURAL RTE 5', 'RR 5'], ['street control', '14 FAKE RD', '14 FAKE RD']], [['spelled rural route', 'Rural Route 6 Box 15', 'RR 6 BOX 15'], ['dotted route and short box', 'R.R. 6 BX 15', 'RR 6 BOX 15'], ['fused two-digit route', 'RR65 BOX 3', 'RR 65 BOX 3'], ['highway contract route', 'HIGHWAY CONTRACT 6 BOX 15', 'HC 6 BOX 15'], ['plain highway', '15 HIGHWAY 6', '15 HWY 6'], ['abbreviated route word', 'RURAL RTE 6', 'RR 6'], ['street control', '15 FAKE RD', '15 FAKE RD']]]\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":"01280ac9cb0f8321f286670649cf05a0af0d97e7733b421c364bbddbf0dae51d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    t = x.upper().replace('.', '').split()\n    MAP2 = {('RURAL', 'ROUTE'): 'RR', ('HIGHWAY', 'CONTRACT'): 'HC', ('RURAL', 'RTE'): 'RR'}\n    MAP1 = {'RR': 'RR', 'HIGHWAY': 'HWY', 'HWY': 'HWY', 'HC': 'HC', 'BOX': 'BOX', 'BX': 'BOX'}\n    out, i = [], 0\n    while i < len(t):\n        pair = tuple(t[i:i + 2])\n        if pair in MAP2:\n            out.append(MAP2[pair])\n            i += 2\n        elif t[i] in MAP1:\n            out.append(MAP1[t[i]])\n            i += 1\n        elif t[i][:2] == 'RR' and t[i][2:].isdigit():\n            out.append(t[i])\n            i += 1\n        else:\n            out.append(t[i])\n            i += 1\n    return ' '.join(out)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['spelled rural route', 'Rural Route 2 Box 11', 'RR 2 BOX 11'], ['dotted route and short box', 'R.R. 2 BX 11', 'RR 2 BOX 11'], ['fused two-digit route', 'RR21 BOX 3', 'RR 21 BOX 3'], ['highway contract route', 'HIGHWAY CONTRACT 2 BOX 11', 'HC 2 BOX 11'], ['plain highway', '11 HIGHWAY 2', '11 HWY 2'], ['abbreviated route word', 'RURAL RTE 2', 'RR 2'], ['street control', '11 FAKE RD', '11 FAKE RD']], [['spelled rural route', 'Rural Route 3 Box 12', 'RR 3 BOX 12'], ['dotted route and short box', 'R.R. 3 BX 12', 'RR 3 BOX 12'], ['fused two-digit route', 'RR32 BOX 3', 'RR 32 BOX 3'], ['highway contract route', 'HIGHWAY CONTRACT 3 BOX 12', 'HC 3 BOX 12'], ['plain highway', '12 HIGHWAY 3', '12 HWY 3'], ['abbreviated route word', 'RURAL RTE 3', 'RR 3'], ['street control', '12 FAKE RD', '12 FAKE RD']], [['spelled rural route', 'Rural Route 4 Box 13', 'RR 4 BOX 13'], ['dotted route and short box', 'R.R. 4 BX 13', 'RR 4 BOX 13'], ['fused two-digit route', 'RR43 BOX 3', 'RR 43 BOX 3'], ['highway contract route', 'HIGHWAY CONTRACT 4 BOX 13', 'HC 4 BOX 13'], ['plain highway', '13 HIGHWAY 4', '13 HWY 4'], ['abbreviated route word', 'RURAL RTE 4', 'RR 4'], ['street control', '13 FAKE RD', '13 FAKE RD']], [['spelled rural route', 'Rural Route 5 Box 14', 'RR 5 BOX 14'], ['dotted route and short box', 'R.R. 5 BX 14', 'RR 5 BOX 14'], ['fused two-digit route', 'RR54 BOX 3', 'RR 54 BOX 3'], ['highway contract route', 'HIGHWAY CONTRACT 5 BOX 14', 'HC 5 BOX 14'], ['plain highway', '14 HIGHWAY 5', '14 HWY 5'], ['abbreviated route word', 'RURAL RTE 5', 'RR 5'], ['street control', '14 FAKE RD', '14 FAKE RD']], [['spelled rural route', 'Rural Route 6 Box 15', 'RR 6 BOX 15'], ['dotted route and short box', 'R.R. 6 BX 15', 'RR 6 BOX 15'], ['fused two-digit route', 'RR65 BOX 3', 'RR 65 BOX 3'], ['highway contract route', 'HIGHWAY CONTRACT 6 BOX 15', 'HC 6 BOX 15'], ['plain highway', '15 HIGHWAY 6', '15 HWY 6'], ['abbreviated route word', 'RURAL RTE 6', 'RR 6'], ['street control', '15 FAKE RD', '15 FAKE RD']]]\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":"f84e33cbba9a34ac789b8915927383ad810eefb84e7061b2d3a66b2a269e1ad9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    t = x.upper().replace('.', '').split()\n    MAP2 = {('RURAL', 'ROUTE'): 'RR', ('HIGHWAY', 'CONTRACT'): 'HC', ('RURAL', 'RTE'): 'RR'}\n    MAP1 = {'RR': 'RR', 'HIGHWAY': 'HWY', 'HWY': 'HWY', 'HC': 'HC', 'BOX': 'BOX', 'BX': 'BOX'}\n    out, i = [], 0\n    while i < len(t):\n        pair = tuple(t[i:i + 2])\n        if pair in MAP2:\n            out.append(MAP2[pair])\n            i += 2\n        elif t[i] in MAP1:\n            out.append(MAP1[t[i]])\n            i += 1\n        elif t[i][:2] == 'RR' and t[i][2:].isdigit():\n            out.extend(['RR', t[i][2:]])\n            i += 1\n        else:\n            out.append(t[i])\n            i += 1\n    return ' '.join(out)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['spelled rural route', 'Rural Route 2 Box 11', 'RR 2 BOX 11'], ['dotted route and short box', 'R.R. 2 BX 11', 'RR 2 BOX 11'], ['fused two-digit route', 'RR21 BOX 3', 'RR 21 BOX 3'], ['highway contract route', 'HIGHWAY CONTRACT 2 BOX 11', 'HC 2 BOX 11'], ['plain highway', '11 HIGHWAY 2', '11 HWY 2'], ['abbreviated route word', 'RURAL RTE 2', 'RR 2'], ['street control', '11 FAKE RD', '11 FAKE RD']], [['spelled rural route', 'Rural Route 3 Box 12', 'RR 3 BOX 12'], ['dotted route and short box', 'R.R. 3 BX 12', 'RR 3 BOX 12'], ['fused two-digit route', 'RR32 BOX 3', 'RR 32 BOX 3'], ['highway contract route', 'HIGHWAY CONTRACT 3 BOX 12', 'HC 3 BOX 12'], ['plain highway', '12 HIGHWAY 3', '12 HWY 3'], ['abbreviated route word', 'RURAL RTE 3', 'RR 3'], ['street control', '12 FAKE RD', '12 FAKE RD']], [['spelled rural route', 'Rural Route 4 Box 13', 'RR 4 BOX 13'], ['dotted route and short box', 'R.R. 4 BX 13', 'RR 4 BOX 13'], ['fused two-digit route', 'RR43 BOX 3', 'RR 43 BOX 3'], ['highway contract route', 'HIGHWAY CONTRACT 4 BOX 13', 'HC 4 BOX 13'], ['plain highway', '13 HIGHWAY 4', '13 HWY 4'], ['abbreviated route word', 'RURAL RTE 4', 'RR 4'], ['street control', '13 FAKE RD', '13 FAKE RD']], [['spelled rural route', 'Rural Route 5 Box 14', 'RR 5 BOX 14'], ['dotted route and short box', 'R.R. 5 BX 14', 'RR 5 BOX 14'], ['fused two-digit route', 'RR54 BOX 3', 'RR 54 BOX 3'], ['highway contract route', 'HIGHWAY CONTRACT 5 BOX 14', 'HC 5 BOX 14'], ['plain highway', '14 HIGHWAY 5', '14 HWY 5'], ['abbreviated route word', 'RURAL RTE 5', 'RR 5'], ['street control', '14 FAKE RD', '14 FAKE RD']], [['spelled rural route', 'Rural Route 6 Box 15', 'RR 6 BOX 15'], ['dotted route and short box', 'R.R. 6 BX 15', 'RR 6 BOX 15'], ['fused two-digit route', 'RR65 BOX 3', 'RR 65 BOX 3'], ['highway contract route', 'HIGHWAY CONTRACT 6 BOX 15', 'HC 6 BOX 15'], ['plain highway', '15 HIGHWAY 6', '15 HWY 6'], ['abbreviated route word', 'RURAL RTE 6', 'RR 6'], ['street control', '15 FAKE RD', '15 FAKE RD']]]\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-rural-route-fused-route","generated_at":"2026-09-29T14:52:21.267289+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Rural delivery lines have no street name; their route and box tokens are the whole delivery address and must normalize identically.","repair":"Emit RR and the digits after the first two characters.","root_cause":"The fused token is recognized but appended unchanged.","sha256":"fda4259f68a2d2b409cd73922fa38e09bff4199d5576b36e50a286ba552f3bd0","title":"Rural route and highway token normalizer: fused route numbers are left fused · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":38.238,"exit_code":1,"observations":[{"actual":"RR 2 BOX 11","check":"spelled rural route","expected":"RR 2 BOX 11","passed":true},{"actual":"RR 2 BOX 11","check":"dotted route and short box","expected":"RR 2 BOX 11","passed":true},{"actual":"RR 1 BOX 3","check":"fused two-digit route","expected":"RR 21 BOX 3","passed":false},{"actual":"HC 2 BOX 11","check":"highway contract route","expected":"HC 2 BOX 11","passed":true},{"actual":"11 HWY 2","check":"plain highway","expected":"11 HWY 2","passed":true},{"actual":"RR 2","check":"abbreviated route word","expected":"RR 2","passed":true},{"actual":"11 FAKE RD","check":"street control","expected":"11 FAKE RD","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"spelled rural route\", \"actual\": \"RR 2 BOX 11\", \"expected\": \"RR 2 BOX 11\", \"passed\": true}, {\"check\": \"dotted route and short box\", \"actual\": \"RR 2 BOX 11\", \"expected\": \"RR 2 BOX 11\", \"passed\": true}, {\"check\": \"fused two-digit route\", \"actual\": \"RR 1 BOX 3\", \"expected\": \"RR 21 BOX 3\", \"passed\": false}, {\"check\": \"highway contract route\", \"actual\": \"HC 2 BOX 11\", \"expected\": \"HC 2 BOX 11\", \"passed\": true}, {\"check\": \"plain highway\", \"actual\": \"11 HWY 2\", \"expected\": \"11 HWY 2\", \"passed\": true}, {\"check\": \"abbreviated route word\", \"actual\": \"RR 2\", \"expected\": \"RR 2\", \"passed\": true}, {\"check\": \"street control\", \"actual\": \"11 FAKE RD\", \"expected\": \"11 FAKE RD\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.01,"exit_code":1,"observations":[{"actual":"RR 2 BOX 11","check":"spelled rural route","expected":"RR 2 BOX 11","passed":true},{"actual":"RR 2 BOX 11","check":"dotted route and short box","expected":"RR 2 BOX 11","passed":true},{"actual":"RR21 BOX 3","check":"fused two-digit route","expected":"RR 21 BOX 3","passed":false},{"actual":"HC 2 BOX 11","check":"highway contract route","expected":"HC 2 BOX 11","passed":true},{"actual":"11 HWY 2","check":"plain highway","expected":"11 HWY 2","passed":true},{"actual":"RR 2","check":"abbreviated route word","expected":"RR 2","passed":true},{"actual":"11 FAKE RD","check":"street control","expected":"11 FAKE RD","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"spelled rural route\", \"actual\": \"RR 2 BOX 11\", \"expected\": \"RR 2 BOX 11\", \"passed\": true}, {\"check\": \"dotted route and short box\", \"actual\": \"RR 2 BOX 11\", \"expected\": \"RR 2 BOX 11\", \"passed\": true}, {\"check\": \"fused two-digit route\", \"actual\": \"RR21 BOX 3\", \"expected\": \"RR 21 BOX 3\", \"passed\": false}, {\"check\": \"highway contract route\", \"actual\": \"HC 2 BOX 11\", \"expected\": \"HC 2 BOX 11\", \"passed\": true}, {\"check\": \"plain highway\", \"actual\": \"11 HWY 2\", \"expected\": \"11 HWY 2\", \"passed\": true}, {\"check\": \"abbreviated route word\", \"actual\": \"RR 2\", \"expected\": \"RR 2\", \"passed\": true}, {\"check\": \"street control\", \"actual\": \"11 FAKE RD\", \"expected\": \"11 FAKE RD\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.875,"exit_code":0,"observations":[{"actual":"RR 2 BOX 11","check":"spelled rural route","expected":"RR 2 BOX 11","passed":true},{"actual":"RR 2 BOX 11","check":"dotted route and short box","expected":"RR 2 BOX 11","passed":true},{"actual":"RR 21 BOX 3","check":"fused two-digit route","expected":"RR 21 BOX 3","passed":true},{"actual":"HC 2 BOX 11","check":"highway contract route","expected":"HC 2 BOX 11","passed":true},{"actual":"11 HWY 2","check":"plain highway","expected":"11 HWY 2","passed":true},{"actual":"RR 2","check":"abbreviated route word","expected":"RR 2","passed":true},{"actual":"11 FAKE RD","check":"street control","expected":"11 FAKE RD","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"spelled rural route\", \"actual\": \"RR 2 BOX 11\", \"expected\": \"RR 2 BOX 11\", \"passed\": true}, {\"check\": \"dotted route and short box\", \"actual\": \"RR 2 BOX 11\", \"expected\": \"RR 2 BOX 11\", \"passed\": true}, {\"check\": \"fused two-digit route\", \"actual\": \"RR 21 BOX 3\", \"expected\": \"RR 21 BOX 3\", \"passed\": true}, {\"check\": \"highway contract route\", \"actual\": \"HC 2 BOX 11\", \"expected\": \"HC 2 BOX 11\", \"passed\": true}, {\"check\": \"plain highway\", \"actual\": \"11 HWY 2\", \"expected\": \"11 HWY 2\", \"passed\": true}, {\"check\": \"abbreviated route word\", \"actual\": \"RR 2\", \"expected\": \"RR 2\", \"passed\": true}, {\"check\": \"street control\", \"actual\": \"11 FAKE RD\", \"expected\": \"11 FAKE RD\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}