FAILURE MAP
← Case archive

FA-11741 / Localization message semantics / Open access

Decimal spelling loses plural operands · case 01

Decimal spelling loses plural operands.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Converting a written decimal to a float removes its visible fraction digits.

VERIFIED REPAIR

For nonnegative decimal strings, this miniature English-like rule selects one only when integer value is 1 and no decimal point is present; otherwise select other.

Unsuccessful approach: Stripping trailing zeroes still erases the distinction between 1 and 1.0.

Case contract

For nonnegative decimal strings, this miniature English-like rule selects one only when integer value is 1 and no decimal point is present; otherwise select other.

Why this case matters

This offline controlled message model isolates a localization decision; it does not implement a complete message-format or locale standard.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(text):
    return 'one' if float(text) == 1 else 'other'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('integer one', solve('1'), 'one')
check('visible zero', solve('1.0'), 'other')
check('many visible zeroes', solve('1.' + '0' * N), 'other')
check('zero', solve('0'), 'other')
check('larger integer', solve(str(N + 1)), 'other')
check('fraction', solve('1.5'), 'other')
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
integer oneoneonePassed
visible zerooneotherFailed
many visible zeroesoneotherFailed
zerootherotherPassed
larger integerotherotherPassed
fractionotherotherPassed

SHA-256 / 0e282b745bbd0a235c27d467767b5de4b700f5701a40a2828191c9113f98ae03

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(text):
    return 'one' if text.rstrip('0').rstrip('.') == '1' else 'other'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('integer one', solve('1'), 'one')
check('visible zero', solve('1.0'), 'other')
check('many visible zeroes', solve('1.' + '0' * N), 'other')
check('zero', solve('0'), 'other')
check('larger integer', solve(str(N + 1)), 'other')
check('fraction', solve('1.5'), 'other')
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
integer oneoneonePassed
visible zerooneotherFailed
many visible zeroesoneotherFailed
zerootherotherPassed
larger integerotherotherPassed
fractionotherotherPassed

SHA-256 / 47fbef7cc4268828e8714d6e2ece602917f7b6ab604ea89c1ffd135b36e7745b

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(text):
    return 'one' if '.' not in text and int(text) == 1 else 'other'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('integer one', solve('1'), 'one')
check('visible zero', solve('1.0'), 'other')
check('many visible zeroes', solve('1.' + '0' * N), 'other')
check('zero', solve('0'), 'other')
check('larger integer', solve(str(N + 1)), 'other')
check('fraction', solve('1.5'), 'other')
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
integer oneoneonePassed
visible zerootherotherPassed
many visible zeroesotherotherPassed
zerootherotherPassed
larger integerotherotherPassed
fractionotherotherPassed

SHA-256 / 50229cc6f407cc3c72c01522686c8d784f01a82171bba6485c7c25768b75fde2

Verification & scope

Only the explicitly specified miniature locale/message rules are modeled. 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:38:50.521009+00:00.

Case digest / cf86c2d88e78ade68f7147cd2d2cc5e412b7b0da1d677fde22679153066fd846