FAILURE MAP
← Case archive

FA-2921 / Unicode / Open access

A zero-class mark survives mark stripping · case 01

A zero-class mark survives mark stripping.

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: Remove every Unicode M-category code point without decomposing text.

VERIFIED REPAIR

Implement the complete stated contract, including the boundary fixtures: Remove every Unicode M-category code point without decomposing text.

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

Case contract

Remove every Unicode M-category code point without decomposing 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 ''.join(c for c in x if not unicodedata.combining(c))
    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('a️'), 'a')
check('boundary 2', solve('का'), 'क')
check('boundary 3', solve('é'), 'é')
check('boundary 4', solve('á'), 'a')
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 1a️aFailed
boundary 2काकFailed
boundary 3ééPassed
boundary 4aaPassed

SHA-256 / 54d0cdac366dbaa52848812b5f78b899ac69aca5bb67ba7870986377a0a87ae3

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 ''.join(c for c in x if unicodedata.category(c)!='Mn')
    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('a️'), 'a')
check('boundary 2', solve('का'), 'क')
check('boundary 3', solve('é'), 'é')
check('boundary 4', solve('á'), 'a')
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 1aaPassed
boundary 2काकFailed
boundary 3ééPassed
boundary 4aaPassed

SHA-256 / 2422459c4936f0fff4417a1f34982c950ffba07928c88d81fdc7c9d42ecfa658

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 ''.join(c for c in x if not unicodedata.category(c).startswith('M'))
    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('a️'), 'a')
check('boundary 2', solve('का'), 'क')
check('boundary 3', solve('é'), 'é')
check('boundary 4', solve('á'), 'a')
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 1aaPassed
boundary 2ककPassed
boundary 3ééPassed
boundary 4aaPassed

SHA-256 / 0beac7e378b97b4b183858ad1909f2bff0c4d3dbe7f95a57daee1c834cf88faf

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

Case digest / 1a6c1ff4e467e7635ade83127080538e4536477d7ec295601773556b3582f444