FAILURE MAP
← Case archive

FA-2851 / Unicode / Open access

Lowercasing misses multi-character caseless matches · case 01

Lowercasing misses multi-character caseless matches.

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: Return the Unicode casefold without normalization.

VERIFIED REPAIR

Implement the complete stated contract, including the boundary fixtures: Return the Unicode casefold without normalization.

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

Case contract

Return the Unicode casefold without normalization.

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.lower()
    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('Straße'), 'strasse')
check('boundary 2', solve('ς'), 'σ')
check('boundary 3', solve('İ'), 'i̇')
check('boundary 4', solve('Ab'), 'ab')
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 1straßestrasseFailed
boundary 2ςσFailed
boundary 3i̇i̇Passed
boundary 4ababPassed

SHA-256 / dfa05ab3d86904928d75da026fea3f436fce70c2cbeef2043dd3b66f53c5df99

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 x.lower().replace('ß','ss')
    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('Straße'), 'strasse')
check('boundary 2', solve('ς'), 'σ')
check('boundary 3', solve('İ'), 'i̇')
check('boundary 4', solve('Ab'), 'ab')
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 1strassestrassePassed
boundary 2ςσFailed
boundary 3i̇i̇Passed
boundary 4ababPassed

SHA-256 / 032b8edd847acfa3bca60a538329456a965a8c5ef23e73b2427a35c74a8a1901

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 x.casefold()
    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('Straße'), 'strasse')
check('boundary 2', solve('ς'), 'σ')
check('boundary 3', solve('İ'), 'i̇')
check('boundary 4', solve('Ab'), 'ab')
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 1strassestrassePassed
boundary 2σσPassed
boundary 3i̇i̇Passed
boundary 4ababPassed

SHA-256 / 94fc80071930ff2e46ce69397004f263ec6fcedf6061e18c6385934380d1973c

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

Case digest / b3ccc6a7ea52878a5717e3b3357bf5d2264f270b65180368f3edb8970b0cc4a1