FAILURE MAP
← Case archive

FA-11756 / Localization message semantics / Open access

Plural offset shifts exact-value selectors · case 01

Plural offset shifts exact-value selectors.

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

ROOT CAUSE

An exact selector is matched against the offset count instead of the original count.

VERIFIED REPAIR

Exact selector keys match the original count before offset. Otherwise choose one iff count-offset equals 1, and replace # in the chosen branch with count-offset.

Unsuccessful approach: Restoring exact matching but applying the offset only to the displayed number leaves category selection wrong.

Case contract

Exact selector keys match the original count before offset. Otherwise choose one iff count-offset equals 1, and replace # in the chosen branch with count-offset.

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(count, offset, exact, branches):
    x = count-offset
    return exact.get(x, branches['one' if x == 1 else 'other']).replace('#',str(x))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('original exact', solve(N+1,N,{N+1:'exact'}, {'one':'one #','other':'other #'}), 'exact')
check('shifted false exact', solve(N+1,N,{1:'wrong'}, {'one':'one #','other':'other #'}), 'one 1')
check('category after offset', solve(N+1,N,{}, {'one':'one #','other':'other #'}), 'one 1')
check('zero remainder', solve(N,N,{}, {'one':'one #','other':'other #'}), 'other 0')
check('two remainder', solve(N+2,N,{}, {'one':'one #','other':'other #'}), 'other 2')
check('zero offset', solve(1,0,{}, {'one':'one #','other':'other #'}), 'one 1')
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
original exactone 1exactFailed
shifted false exactwrongone 1Failed
category after offsetone 1one 1Passed
zero remainderother 0other 0Passed
two remainderother 2other 2Passed
zero offsetone 1one 1Passed

SHA-256 / fbbb17748e8acc600c06174690e7af6aad9e5cea8b2a6380aac4c1e747f9fc74

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(count, offset, exact, branches):
    x = count-offset
    return exact.get(count, branches['one' if count == 1 else 'other']).replace('#',str(x))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('original exact', solve(N+1,N,{N+1:'exact'}, {'one':'one #','other':'other #'}), 'exact')
check('shifted false exact', solve(N+1,N,{1:'wrong'}, {'one':'one #','other':'other #'}), 'one 1')
check('category after offset', solve(N+1,N,{}, {'one':'one #','other':'other #'}), 'one 1')
check('zero remainder', solve(N,N,{}, {'one':'one #','other':'other #'}), 'other 0')
check('two remainder', solve(N+2,N,{}, {'one':'one #','other':'other #'}), 'other 2')
check('zero offset', solve(1,0,{}, {'one':'one #','other':'other #'}), 'one 1')
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
original exactexactexactPassed
shifted false exactother 1one 1Failed
category after offsetother 1one 1Failed
zero remainderone 0other 0Failed
two remainderother 2other 2Passed
zero offsetone 1one 1Passed

SHA-256 / 6a21259081fff6e72f54d470c2600655ff40344a2e97cca25ed008d808290196

3 / The verified repair

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

N = 1
observations = []
def solve(count, offset, exact, branches):
    x = count-offset
    return exact.get(count, branches['one' if x == 1 else 'other']).replace('#',str(x))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('original exact', solve(N+1,N,{N+1:'exact'}, {'one':'one #','other':'other #'}), 'exact')
check('shifted false exact', solve(N+1,N,{1:'wrong'}, {'one':'one #','other':'other #'}), 'one 1')
check('category after offset', solve(N+1,N,{}, {'one':'one #','other':'other #'}), 'one 1')
check('zero remainder', solve(N,N,{}, {'one':'one #','other':'other #'}), 'other 0')
check('two remainder', solve(N+2,N,{}, {'one':'one #','other':'other #'}), 'other 2')
check('zero offset', solve(1,0,{}, {'one':'one #','other':'other #'}), 'one 1')
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
original exactexactexactPassed
shifted false exactone 1one 1Passed
category after offsetone 1one 1Passed
zero remainderother 0other 0Passed
two remainderother 2other 2Passed
zero offsetone 1one 1Passed

SHA-256 / 131eda4ba0ddd4505721a202e337677af761614d2b9ecc274c6bdae6f1de1fdf

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

Case digest / 2fe4741664a61fa2d28ecc7320d88add60d220642828742d4600d7c9c366753a