FA-11756 / Localization message semantics / Open access
Plural offset shifts exact-value selectors · case 01
Plural offset shifts exact-value selectors.
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| original exact | one 1 | exact | Failed |
| shifted false exact | wrong | one 1 | Failed |
| category after offset | one 1 | one 1 | Passed |
| zero remainder | other 0 | other 0 | Passed |
| two remainder | other 2 | other 2 | Passed |
| zero offset | one 1 | one 1 | Passed |
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| original exact | exact | exact | Passed |
| shifted false exact | other 1 | one 1 | Failed |
| category after offset | other 1 | one 1 | Failed |
| zero remainder | one 0 | other 0 | Failed |
| two remainder | other 2 | other 2 | Passed |
| zero offset | one 1 | one 1 | Passed |
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| original exact | exact | exact | Passed |
| shifted false exact | one 1 | one 1 | Passed |
| category after offset | one 1 | one 1 | Passed |
| zero remainder | other 0 | other 0 | Passed |
| two remainder | other 2 | other 2 | Passed |
| zero offset | one 1 | one 1 | Passed |
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