FAILURE MAP
← Case archive

FA-79691 / Barcode symbology encoding / Open access

QR alphanumeric space is given value 44 · case 01

Text containing spaces or punctuation decodes with shifted symbols.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Space is placed after ":" in the value table, shifting every punctuation value.

THE FAILURE

Space is placed after ":" in the value table, shifting every punctuation value.

Unsuccessful approach: Putting space first shifts every digit and letter by one.

Case 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.

Why this case matters

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.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(s):
    ALNUM = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ$%*+-./: '
    if any(c not in ALNUM for c in s):
        return None
    bits = ''
    for i in range(0, len(s) - 1, 2):
        v = 45 * ALNUM.index(s[i]) + ALNUM.index(s[i + 1])
        bits += format(v, '011b')
    if len(s) % 2:
        bits += format(ALNUM.index(s[-1]), '06b')
    return bits
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['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']]]
labels = ["regression: symbol value table order", "repair trap", "combined fault", "control", "control", "boundary", "boundary", "control"]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("%s %d" % (labels[i % len(labels)], i), solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
regression: symbol value table order 00110011101010101101100111010101100Failed
repair trap 101101000011111101110110010110110100001111111100000001011Failed
combined fault 2Passed
control 3NoneNonePassed
control 40101100111110100001011000111101001Failed
boundary 5110011100011010001100010010001010101000110100111101010001000010010001011101001Failed
boundary 600101000011100111010101001000010100001110011101011100101Failed
control 70101110110010101001011101100101011Failed

SHA-256 / 59f3eb5cdde7d4f1b536151e4fa9e2d81c9a032e42f98f558ccef0bf835b3dac

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(s):
    ALNUM = ' 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ$%*+-./:'
    if any(c not in ALNUM for c in s):
        return None
    bits = ''
    for i in range(0, len(s) - 1, 2):
        v = 45 * ALNUM.index(s[i]) + ALNUM.index(s[i + 1])
        bits += format(v, '011b')
    if len(s) % 2:
        bits += format(ALNUM.index(s[-1]), '06b')
    return bits
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['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']]]
labels = ["regression: symbol value table order", "repair trap", "combined fault", "control", "control", "boundary", "boundary", "control"]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("%s %d" % (labels[i % len(labels)], i), solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
regression: symbol value table order 00110110100010110001100111010101100Failed
repair trap 101101110001111101111000011000110100001111111100000001011Failed
combined fault 2Passed
control 3NoneNonePassed
control 40101101000010100101011000111101001Failed
boundary 5110100111111010001100110010111000101001110100111101010001000010010001011101001Failed
boundary 600101110001101000110001001010010100001110011101011100101Failed
control 70110001101010101101011101100101011Failed

SHA-256 / 548e61eacdf42cae4a85209fe4d35d66aecbcd37d4bac22ed461dcbb736d6625

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

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.

Observations recorded using Python 3.12.14 at 2026-09-29T14:49:46.941765+00:00.

Case digest / ca48c1ac53fcf34cdb18fad582489ddd871a3fda211e1fe20cb7bfc02508c5e9