{"abstract":"Text containing spaces or punctuation decodes with shifted symbols.","category":"Barcode symbology encoding","checks":8,"contract":"Encode the data part of a QR alphanumeric segment. Character values: 0-9 -> 0-9, A-Z -> 10-35, space 36, $ 37, % 38, * 39, + 40, - 41, . 42, / 43, : 44. Each pair becomes 45*first + second in 11 bits, a final single character becomes its value in 6 bits. Characters outside the set return None.","contract_signature":"s","evaluation_group":"w2-barcode-symbology-encoding-qr-alnum-bitstream","failed_approach":"Putting space first shifts every digit and letter by one.","family":"w2-barcode-symbology-encoding-qr-alnum-bitstream-table-order","id":"FA-79691","implementations":{"attempt":{"sha256":"548e61eacdf42cae4a85209fe4d35d66aecbcd37d4bac22ed461dcbb736d6625","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(s):\n    ALNUM = ' 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ$%*+-./:'\n    if any(c not in ALNUM for c in s):\n        return None\n    bits = ''\n    for i in range(0, len(s) - 1, 2):\n        v = 45 * ALNUM.index(s[i]) + ALNUM.index(s[i + 1])\n        bits += format(v, '011b')\n    if len(s) % 2:\n        bits += format(ALNUM.index(s[-1]), '06b')\n    return bits\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['IG:', '01100111010101100'], ['IP: B', '0110100001111111100000001011'], ['', ''], ['a', None], ['F -', '01011000111101001'], ['$TS P%-', '110100111101010001000010010001011101001'], ['78R:$', '0010100001110011101011100101'], ['GS/', '01011101100101011']], [[':HKK4', '1111100110101110011000000100'], [':O', '11111010100'], ['', ''], ['a', None], ['VK5/1S', '101100001110010000110000001001001'], ['IHU NKR', '011001110111010110101010000011111011011'], ['0-KJ', '0000010100101110010111'], ['NVF9-XZ', '100001010100101010110011101010110100011']], [['.6EZZ', '1110110100001010011001100011'], ['Y6WB', '1100000000010110101011'], [' WP', '11001110100011001'], ['', ''], ['a', None], ['20Y%', '0000101101011000100000'], ['$K', '11010010101'], ['.O/', '11101111010101011']], [['89%', '00101110001100110'], ['R2YP', '1001100000111000010011'], [' ', '100100'], ['', ''], ['a', None], ['4F./', '0001100001111110001101'], ['3OKV/', '0001001111101110100011101011'], ['*AB1', '1101110010100111110000']], [['M2R:*', '0111110000010011101011100111'], ['RBW3-', '1001100101010110100011101001'], ['IE4+S', '0110011100000011011100011100'], ['', ''], ['a', None], ['%KU', '11011000010011110'], [':ZKI6O', '111110111110111001011000100100110'], ['*', '100111']]]\nlabels = [\"regression: symbol value table order\", \"repair trap\", \"combined fault\", \"control\", \"control\", \"boundary\", \"boundary\", \"control\"]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"%s %d\" % (labels[i % len(labels)], i), 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":"59f3eb5cdde7d4f1b536151e4fa9e2d81c9a032e42f98f558ccef0bf835b3dac","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(s):\n    ALNUM = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ$%*+-./: '\n    if any(c not in ALNUM for c in s):\n        return None\n    bits = ''\n    for i in range(0, len(s) - 1, 2):\n        v = 45 * ALNUM.index(s[i]) + ALNUM.index(s[i + 1])\n        bits += format(v, '011b')\n    if len(s) % 2:\n        bits += format(ALNUM.index(s[-1]), '06b')\n    return bits\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['IG:', '01100111010101100'], ['IP: B', '0110100001111111100000001011'], ['', ''], ['a', None], ['F -', '01011000111101001'], ['$TS P%-', '110100111101010001000010010001011101001'], ['78R:$', '0010100001110011101011100101'], ['GS/', '01011101100101011']], [[':HKK4', '1111100110101110011000000100'], [':O', '11111010100'], ['', ''], ['a', None], ['VK5/1S', '101100001110010000110000001001001'], ['IHU NKR', '011001110111010110101010000011111011011'], ['0-KJ', '0000010100101110010111'], ['NVF9-XZ', '100001010100101010110011101010110100011']], [['.6EZZ', '1110110100001010011001100011'], ['Y6WB', '1100000000010110101011'], [' WP', '11001110100011001'], ['', ''], ['a', None], ['20Y%', '0000101101011000100000'], ['$K', '11010010101'], ['.O/', '11101111010101011']], [['89%', '00101110001100110'], ['R2YP', '1001100000111000010011'], [' ', '100100'], ['', ''], ['a', None], ['4F./', '0001100001111110001101'], ['3OKV/', '0001001111101110100011101011'], ['*AB1', '1101110010100111110000']], [['M2R:*', '0111110000010011101011100111'], ['RBW3-', '1001100101010110100011101001'], ['IE4+S', '0110011100000011011100011100'], ['', ''], ['a', None], ['%KU', '11011000010011110'], [':ZKI6O', '111110111110111001011000100100110'], ['*', '100111']]]\nlabels = [\"regression: symbol value table order\", \"repair trap\", \"combined fault\", \"control\", \"control\", \"boundary\", \"boundary\", \"control\"]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"%s %d\" % (labels[i % len(labels)], i), 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 with a stipulated contract; it makes no claim of conformance to any published specification. 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-barcode-symbology-encoding-qr-alnum-bitstream-table-order","generated_at":"2026-09-29T14:49:46.941765+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Retail, logistics, pharmacy and document workflows depend on encoders that produce exactly the module pattern, code-set switches, separators and quiet zones scanners expect; one misplaced module or separator makes a label unreadable or, worse, scan as different data.","root_cause":"Space is placed after \":\" in the value table, shifting every punctuation value.","sha256":"ca48c1ac53fcf34cdb18fad582489ddd871a3fda211e1fe20cb7bfc02508c5e9","title":"QR alphanumeric space is given value 44 · 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":40.245,"exit_code":1,"observations":[{"actual":"01101101000101100","check":"regression: symbol value table order 0","expected":"01100111010101100","passed":false},{"actual":"0110111000111110111100001100","check":"repair trap 1","expected":"0110100001111111100000001011","passed":false},{"actual":"","check":"combined fault 2","expected":"","passed":true},{"actual":null,"check":"control 3","expected":null,"passed":true},{"actual":"01011010000101001","check":"control 4","expected":"01011000111101001","passed":false},{"actual":"110100111111010001100110010111000101001","check":"boundary 5","expected":"110100111101010001000010010001011101001","passed":false},{"actual":"0010111000110100011000100101","check":"boundary 6","expected":"0010100001110011101011100101","passed":false},{"actual":"01100011010101011","check":"control 7","expected":"01011101100101011","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: symbol value table order 0\", \"actual\": \"01101101000101100\", \"expected\": \"01100111010101100\", \"passed\": false}, {\"check\": \"repair trap 1\", \"actual\": \"0110111000111110111100001100\", \"expected\": \"0110100001111111100000001011\", \"passed\": false}, {\"check\": \"combined fault 2\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"control 3\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control 4\", \"actual\": \"01011010000101001\", \"expected\": \"01011000111101001\", \"passed\": false}, {\"check\": \"boundary 5\", \"actual\": \"110100111111010001100110010111000101001\", \"expected\": \"110100111101010001000010010001011101001\", \"passed\": false}, {\"check\": \"boundary 6\", \"actual\": \"0010111000110100011000100101\", \"expected\": \"0010100001110011101011100101\", \"passed\": false}, {\"check\": \"control 7\", \"actual\": \"01100011010101011\", \"expected\": \"01011101100101011\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.064,"exit_code":1,"observations":[{"actual":"01100111010101011","check":"regression: symbol value table order 0","expected":"01100111010101100","passed":false},{"actual":"0110100001111110111011001011","check":"repair trap 1","expected":"0110100001111111100000001011","passed":false},{"actual":"","check":"combined fault 2","expected":"","passed":true},{"actual":null,"check":"control 3","expected":null,"passed":true},{"actual":"01011001111101000","check":"control 4","expected":"01011000111101001","passed":false},{"actual":"110011100011010001100010010001010101000","check":"boundary 5","expected":"110100111101010001000010010001011101001","passed":false},{"actual":"0010100001110011101010100100","check":"boundary 6","expected":"0010100001110011101011100101","passed":false},{"actual":"01011101100101010","check":"control 7","expected":"01011101100101011","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: symbol value table order 0\", \"actual\": \"01100111010101011\", \"expected\": \"01100111010101100\", \"passed\": false}, {\"check\": \"repair trap 1\", \"actual\": \"0110100001111110111011001011\", \"expected\": \"0110100001111111100000001011\", \"passed\": false}, {\"check\": \"combined fault 2\", \"actual\": \"\", \"expected\": \"\", \"passed\": true}, {\"check\": \"control 3\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control 4\", \"actual\": \"01011001111101000\", \"expected\": \"01011000111101001\", \"passed\": false}, {\"check\": \"boundary 5\", \"actual\": \"110011100011010001100010010001010101000\", \"expected\": \"110100111101010001000010010001011101001\", \"passed\": false}, {\"check\": \"boundary 6\", \"actual\": \"0010100001110011101010100100\", \"expected\": \"0010100001110011101011100101\", \"passed\": false}, {\"check\": \"control 7\", \"actual\": \"01011101100101010\", \"expected\": \"01011101100101011\", \"passed\": false}], \"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."}}