FAILURE MAP
← Case archive

FA-3316 / Encodings / Open access

Human Base32 digit aliases are rejected · case 01

Human Base32 digit aliases are rejected.

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

ROOT CAUSE

The implementation applies an operation whose text or grammar semantics violate this contract: Decode uppercase Base32 permitting 0 as O and 1 as I; invalid input returns None.

VERIFIED REPAIR

Implement the complete stated contract, including the boundary fixtures: Decode uppercase Base32 permitting 0 as O and 1 as I; invalid input returns None.

Unsuccessful approach: The attempted repair handles the primary example but still violates a separate boundary of the same contract.

Case contract

Decode uppercase Base32 permitting 0 as O and 1 as I; invalid input returns None.

Why this case matters

A local executable model for consumers of structured text; oracle values are authored literals, not outputs copied from the repaired implementation.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap

N = 1
observations = []
def solve(x):
    try:
        try:
            return list(base64.b32decode(x))
        except binascii.Error:
            return None
    except Exception as exc:
        return {"error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve('1A======'), [64])
check('boundary 2', solve('0A======'), [112])
check('boundary 3', solve('ME======'), [97])
check('boundary 4', solve('?'), None)
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
boundary 1None[64]Failed
boundary 2None[112]Failed
boundary 3[97][97]Passed
boundary 4NoneNonePassed

SHA-256 / 6d35716402e413c4ee94f550921ec8d55814b95e3ecddfc640fd7936c0512bda

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap

N = 1
observations = []
def solve(x):
    try:
        try:
            return list(base64.b32decode(x,map01='L'))
        except binascii.Error:
            return None
    except Exception as exc:
        return {"error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve('1A======'), [64])
check('boundary 2', solve('0A======'), [112])
check('boundary 3', solve('ME======'), [97])
check('boundary 4', solve('?'), None)
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
boundary 1[88][64]Failed
boundary 2[112][112]Passed
boundary 3[97][97]Passed
boundary 4NoneNonePassed

SHA-256 / ea050cfd0eaf049ce612190ef6554bb91b9def678a6c216399eecffa4f429b8c

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap

N = 1
observations = []
def solve(x):
    try:
        try:
            return list(base64.b32decode(x,map01='I'))
        except binascii.Error:
            return None
    except Exception as exc:
        return {"error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve('1A======'), [64])
check('boundary 2', solve('0A======'), [112])
check('boundary 3', solve('ME======'), [97])
check('boundary 4', solve('?'), None)
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
boundary 1[64][64]Passed
boundary 2[112][112]Passed
boundary 3[97][97]Passed
boundary 4NoneNonePassed

SHA-256 / fc334c36a6cbbc95094e0a4d03a02f38e94fd92e07aadc1789c5ff73e86e0aea

Verification & scope

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:37:24.121699+00:00.

Case digest / 840fc3efb96b873ec56c186488da5c1063c3c8ed3ba4432a669eae4a8aa34d10