FAILURE MAP
← Case archive

FA-2866 / Unicode / Open access

A superscript is accepted as a decimal digit · case 01

A superscript is accepted as a decimal digit.

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 whether the nonempty string consists entirely of Unicode decimal digits.

VERIFIED REPAIR

Implement the complete stated contract, including the boundary fixtures: Return whether the nonempty string consists entirely of Unicode decimal digits.

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

Case contract

Return whether the nonempty string consists entirely of Unicode decimal digits.

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.isdigit()
    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('²'), False)
check('boundary 2', solve('Ⅳ'), False)
check('boundary 3', solve('٣'), True)
check('boundary 4', solve(''), False)
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 1TrueFalseFailed
boundary 2FalseFalsePassed
boundary 3TrueTruePassed
boundary 4FalseFalsePassed

SHA-256 / c4ddd8d0d9e71c6028e4181af2be71176e662a862cd14428bc82f872987d7096

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.isnumeric()
    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('²'), False)
check('boundary 2', solve('Ⅳ'), False)
check('boundary 3', solve('٣'), True)
check('boundary 4', solve(''), False)
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 1TrueFalseFailed
boundary 2TrueFalseFailed
boundary 3TrueTruePassed
boundary 4FalseFalsePassed

SHA-256 / a3a1caa803a72be422ab2634d44e54f3d4a0fbcf88d08375ee57662002376465

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.isdecimal()
    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('²'), False)
check('boundary 2', solve('Ⅳ'), False)
check('boundary 3', solve('٣'), True)
check('boundary 4', solve(''), False)
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 1FalseFalsePassed
boundary 2FalseFalsePassed
boundary 3TrueTruePassed
boundary 4FalseFalsePassed

SHA-256 / acaf79878e3d2f2e634e5d9096dc864346e41ed687c49b2c813a653d09aed3f3

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

Case digest / 0fd5b15f144dbc39f299f4571fc5b66c8ed01ee872b3b11017cc67872320880a