FAILURE MAP
← Case archive

FA-3336 / Encodings / Open access

Quoted-printable soft line breaks become content · case 01

Quoted-printable soft line breaks become content.

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 quoted-printable ASCII text to Latin-1 text.

VERIFIED REPAIR

Implement the complete stated contract, including the boundary fixtures: Decode quoted-printable ASCII text to Latin-1 text.

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

Case contract

Decode quoted-printable ASCII text to Latin-1 text.

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 x.replace('=20',' ')
    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('ab=\ncd'), 'abcd')
check('boundary 2', solve('=E9'), 'é')
check('boundary 3', solve('a=20b'), 'a b')
check('boundary 4', solve('plain'), 'plain')
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 1ab= cdabcdFailed
boundary 2=E9éFailed
boundary 3a ba bPassed
boundary 4plainplainPassed

SHA-256 / bdd516cbd9c875662af7b9e3fb5a91793d409cb61b19ce1e8028bdbeba30dbff

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 binascii.a2b_qp(x.replace('=\n','\n')).decode('latin1')
    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('ab=\ncd'), 'abcd')
check('boundary 2', solve('=E9'), 'é')
check('boundary 3', solve('a=20b'), 'a b')
check('boundary 4', solve('plain'), 'plain')
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 1ab cdabcdFailed
boundary 2ééPassed
boundary 3a ba bPassed
boundary 4plainplainPassed

SHA-256 / 69c17369cfa0270a594b8ac2ea0c9324d48f942c3c8ab2ce718f8259a5438a78

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 binascii.a2b_qp(x).decode('latin1')
    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('ab=\ncd'), 'abcd')
check('boundary 2', solve('=E9'), 'é')
check('boundary 3', solve('a=20b'), 'a b')
check('boundary 4', solve('plain'), 'plain')
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 1abcdabcdPassed
boundary 2ééPassed
boundary 3a ba bPassed
boundary 4plainplainPassed

SHA-256 / 2d338eeb906e62d97509bc5e18a8565baccefb58ac469d5ea754ea11634a8b68

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

Case digest / 1036b1abd8530ad616d4c22e79fb48d14410f464c0cfc4803bd0d1d4a230793d