FAILURE MAP
← Case archive

FA-3321 / Encodings / Open access

Two base85 alphabets are confused · case 01

Two base85 alphabets are confused.

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: Encode hex bytes using RFC-style Python b85, without Adobe delimiters.

VERIFIED REPAIR

Implement the complete stated contract, including the boundary fixtures: Encode hex bytes using RFC-style Python b85, without Adobe delimiters.

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

Case contract

Encode hex bytes using RFC-style Python b85, without Adobe delimiters.

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:
        return base64.a85encode(bytes.fromhex(x)).decode()
    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('00000000'), '00000')
check('boundary 2', solve('61'), 'VE')
check('boundary 3', solve('ffffffff'), '|NsC0')
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 1z00000Failed
boundary 2@/VEFailed
boundary 3s8W-!|NsC0Failed
boundary 4Passed

SHA-256 / 28c374c5a960ed869012314093dc908a869a7f2c01612c017b9b0c6a6e37bc2a

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:
        return base64.a85encode(bytes.fromhex(x),adobe=True).decode()
    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('00000000'), '00000')
check('boundary 2', solve('61'), 'VE')
check('boundary 3', solve('ffffffff'), '|NsC0')
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<~z~>00000Failed
boundary 2<~@/~>VEFailed
boundary 3<~s8W-!~>|NsC0Failed
boundary 4<~~>Failed

SHA-256 / 21c1c472e2c48f296ec9a64ca9dc58e3b83664a3021f515db1ecfa2014a766a9

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:
        return base64.b85encode(bytes.fromhex(x)).decode()
    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('00000000'), '00000')
check('boundary 2', solve('61'), 'VE')
check('boundary 3', solve('ffffffff'), '|NsC0')
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 10000000000Passed
boundary 2VEVEPassed
boundary 3|NsC0|NsC0Passed
boundary 4Passed

SHA-256 / a5473e84dbe948f4f5a437713abab533a9866b1fd5af517de3c207c9eeea3fa9

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

Case digest / 4136c7ae007342c93ee3dce00265e2beed5925255a9849e223d841a3247614de