FAILURE MAP
← Case archive

FA-3311 / Encodings / Open access

Case-sensitive Base32 accepts lowercase input · case 01

Case-sensitive Base32 accepts lowercase input.

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 strict uppercase Base32; invalid input returns None.

THE FAILURE

The implementation applies an operation whose text or grammar semantics violate this contract: Decode strict uppercase Base32; 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 strict uppercase Base32; 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,casefold=True))
        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('me======'), None)
check('boundary 2', solve('ME======'), [97])
check('boundary 3', solve('MZXQ===='), [102, 111])
check('boundary 4', solve(''), [])
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[97]NoneFailed
boundary 2[97][97]Passed
boundary 3[102, 111][102, 111]Passed
boundary 4[][]Passed

SHA-256 / b63144cfa9021525bb8558fc37340a432c6923d1ca0eb8f87eb98e7c9ede9042

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.upper()))
        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('me======'), None)
check('boundary 2', solve('ME======'), [97])
check('boundary 3', solve('MZXQ===='), [102, 111])
check('boundary 4', solve(''), [])
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[97]NoneFailed
boundary 2[97][97]Passed
boundary 3[102, 111][102, 111]Passed
boundary 4[][]Passed

SHA-256 / 684cebf20ab839fe06b5cdce8b725e9e74064f3e8f139c8f03fa14ace9f87805

HELD IN THE MEMBER ARCHIVE

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

This mechanism has 4 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

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

Case digest / 7420cf9805c2d067ab3c2839e3d6af7fdee69ee1203657d3fcf6585fe8fa3d13