FAILURE MAP
← Case archive

FA-11751 / Localization message semantics / Open access

Ordinal selection reuses cardinal categories · case 01

Ordinal selection reuses cardinal categories.

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

ROOT CAUSE

The message formatter treats ordinal ranks as cardinal counts.

VERIFIED REPAIR

For positive integer ranks use one/two/few for final digits 1/2/3 except final-two-digit 11/12/13; use other otherwise.

Unsuccessful approach: Checking ordinal last digits without teen exceptions breaks eleventh through thirteenth.

Case contract

For positive integer ranks use one/two/few for final digits 1/2/3 except final-two-digit 11/12/13; use other otherwise.

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(n):
    return 'one' if n == 1 else 'other'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('first', solve(100*N+1), 'one')
check('second', solve(100*N+2), 'two')
check('third', solve(100*N+3), 'few')
check('eleventh', solve(100*N+11), 'other')
check('twelfth', solve(100*N+12), 'other')
check('thirteenth', solve(100*N+13), 'other')
check('fourth', solve(4), '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
firstotheroneFailed
secondothertwoFailed
thirdotherfewFailed
eleventhotherotherPassed
twelfthotherotherPassed
thirteenthotherotherPassed
fourthotherotherPassed

SHA-256 / 50f35b91fe6d9f8e03c73722ebb0befd09f0a1f740555d8e77fa41b4b5d54b4c

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(n):
    return {1:'one',2:'two',3:'few'}.get(n % 10, 'other')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('first', solve(100*N+1), 'one')
check('second', solve(100*N+2), 'two')
check('third', solve(100*N+3), 'few')
check('eleventh', solve(100*N+11), 'other')
check('twelfth', solve(100*N+12), 'other')
check('thirteenth', solve(100*N+13), 'other')
check('fourth', solve(4), '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
firstoneonePassed
secondtwotwoPassed
thirdfewfewPassed
eleventhoneotherFailed
twelfthtwootherFailed
thirteenthfewotherFailed
fourthotherotherPassed

SHA-256 / d37a7aa1603330afd6499cb50289e4b5e0b207fad3e155b652ab7880f4036a50

3 / The verified repair

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

N = 1
observations = []
def solve(n):
    return 'other' if n % 100 in (11,12,13) else {1:'one',2:'two',3:'few'}.get(n % 10, 'other')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('first', solve(100*N+1), 'one')
check('second', solve(100*N+2), 'two')
check('third', solve(100*N+3), 'few')
check('eleventh', solve(100*N+11), 'other')
check('twelfth', solve(100*N+12), 'other')
check('thirteenth', solve(100*N+13), 'other')
check('fourth', solve(4), '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
firstoneonePassed
secondtwotwoPassed
thirdfewfewPassed
eleventhotherotherPassed
twelfthotherotherPassed
thirteenthotherotherPassed
fourthotherotherPassed

SHA-256 / 6af0420e80d4bf6ff09d380e8db4e94b75a2658dcddaa0ec49271b244493de33

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

Case digest / 443e9a58adfa7da0116aae89f0c75920ea80e47f1c52c1878c68bf51619ca6bd