FA-72376 / Check-digit algorithms / Open access
ISIN body accepts lowercase letters · case 01
A lowercase body produces a check-digit verdict instead of being rejected.
ROOT CAUSE
The uppercase test on the nine-character body is missing, so lowercase letters expand to values above 35.
THE FAILURE
The uppercase test on the nine-character body is missing, so lowercase letters expand to values above 35.
Unsuccessful approach: Upper-casing only the country code still lets lowercase body letters through.
Case contract
Input a 12-character ISIN: two uppercase ASCII letters (country), nine uppercase alphanumerics, one check digit; anything else is "malformed". Letters expand to two digits (A=10 .. Z=35), then Luhn doubling starts at the rightmost digit of the expanded 11-character payload. Return [computed check digit, whether it matches].
Why this case matters
Securities settlement systems reject ISINs whose check digit does not match before routing trades.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(s):
if len(s) != 12 or not s.isascii() or not s[:2].isalpha() or not s[:2].isupper():
return 'malformed'
if not s[2:11].isalnum() or not s[11].isdigit():
return 'malformed'
digits = ''
for ch in s[:11]:
digits += ch if ch.isdigit() else str(ord(ch) - 55)
total = 0
for i, ch in enumerate(reversed(digits)):
d = int(ch)
if i % 2 == 0:
d *= 2
if d > 9:
d -= 9
total += d
check = (10 - total % 10) % 10
return [check, check == int(s[11])]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression ["US03783310a5"]', ['US03783310a5'], 'malformed'], ['control ["US4V5PGS4IX8"]', ['US4V5PGS4IX8'], [0, False]], ['control ["GBOV8F5J6090"]', ['GBOV8F5J6090'], [7, False]], ['control ["DEC85GG2TSS1"]', ['DEC85GG2TSS1'], [4, False]], ['control ["JPFWKDL124I1"]', ['JPFWKDL124I1'], [1, True]], ['control ["CHXVXSVIT016"]', ['CHXVXSVIT016'], [1, False]], ['control ["FRLWNIYHPT37"]', ['FRLWNIYHPT37'], [5, False]], ['control ["XS0K4JDSXBN1"]', ['XS0K4JDSXBN1'], [4, False]]], [['regression ["US03783310a5"]', ['US03783310a5'], 'malformed'], ['control ["FRLWNIYHPT37"]', ['FRLWNIYHPT37'], [5, False]], ['control ["XS0K4JDSXBN1"]', ['XS0K4JDSXBN1'], [4, False]], ['control ["NL5BVKR8BB60"]', ['NL5BVKR8BB60'], [3, False]], ['control ["AUKWRNHD2XR3"]', ['AUKWRNHD2XR3'], [8, False]], ['control ["CA3CKMM2IAN8"]', ['CA3CKMM2IAN8'], [0, False]], ['control ["US6754047769"]', ['US6754047769'], [8, False]], ['control ["IE9141151847"]', ['IE9141151847'], [0, False]]], [['regression ["US03783310a5"]', ['US03783310a5'], 'malformed'], ['control ["US6754047769"]', ['US6754047769'], [8, False]], ['control ["IE9141151847"]', ['IE9141151847'], [0, False]], ['control ["LU7763909076"]', ['LU7763909076'], [8, False]], ['control ["KY3791880781"]', ['KY3791880781'], [4, False]], ['control ["BM9170095145"]', ['BM9170095145'], [7, False]], ['control ["US0378331005"]', ['US0378331005'], [5, True]], ['control ["US5949181045"]', ['US5949181045'], [5, True]]], [['regression ["US03783310a5"]', ['US03783310a5'], 'malformed'], ['control ["US0378331005"]', ['US0378331005'], [5, True]], ['control ["US5949181045"]', ['US5949181045'], [5, True]], ['control ["GB0002634946"]', ['GB0002634946'], [6, True]], ['control ["AU0000XVGZA3"]', ['AU0000XVGZA3'], [3, True]], ['control ["DE000BAY0017"]', ['DE000BAY0017'], [7, True]], ['control ["US037833100"]', ['US037833100'], 'malformed'], ['control ["us0378331005"]', ['us0378331005'], 'malformed']], [['regression ["US03783310a5"]', ['US03783310a5'], 'malformed'], ['control ["US037833100"]', ['US037833100'], 'malformed'], ['control ["us0378331005"]', ['us0378331005'], 'malformed'], ['control ["12Q037833100"]', ['12Q037833100'], 'malformed'], ['control ["1S0378331005"]', ['1S0378331005'], 'malformed'], ['control ["U10378331005"]', ['U10378331005'], 'malformed'], ['control ["XS2021832634"]', ['XS2021832634'], [4, True]], ['control ["US38259P5089"]', ['US38259P5089'], [9, True]]]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
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 |
|---|---|---|---|
| regression ["US03783310a5"] | [0, False] | malformed | Failed |
| control ["US4V5PGS4IX8"] | [0, False] | [0, False] | Passed |
| control ["GBOV8F5J6090"] | [7, False] | [7, False] | Passed |
| control ["DEC85GG2TSS1"] | [4, False] | [4, False] | Passed |
| control ["JPFWKDL124I1"] | [1, True] | [1, True] | Passed |
| control ["CHXVXSVIT016"] | [1, False] | [1, False] | Passed |
| control ["FRLWNIYHPT37"] | [5, False] | [5, False] | Passed |
| control ["XS0K4JDSXBN1"] | [4, False] | [4, False] | Passed |
SHA-256 / 13d7cb9c3935d31bb2d97047be06aba270a71105da23d52eb733f7f9abed7df7
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(s):
if len(s) != 12 or not s.isascii() or not s[:2].isalpha() or not s[:2].isupper():
return 'malformed'
if not s[2:11].isalnum() or s[:2] != s[:2].upper() or not s[11].isdigit():
return 'malformed'
digits = ''
for ch in s[:11]:
digits += ch if ch.isdigit() else str(ord(ch) - 55)
total = 0
for i, ch in enumerate(reversed(digits)):
d = int(ch)
if i % 2 == 0:
d *= 2
if d > 9:
d -= 9
total += d
check = (10 - total % 10) % 10
return [check, check == int(s[11])]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression ["US03783310a5"]', ['US03783310a5'], 'malformed'], ['control ["US4V5PGS4IX8"]', ['US4V5PGS4IX8'], [0, False]], ['control ["GBOV8F5J6090"]', ['GBOV8F5J6090'], [7, False]], ['control ["DEC85GG2TSS1"]', ['DEC85GG2TSS1'], [4, False]], ['control ["JPFWKDL124I1"]', ['JPFWKDL124I1'], [1, True]], ['control ["CHXVXSVIT016"]', ['CHXVXSVIT016'], [1, False]], ['control ["FRLWNIYHPT37"]', ['FRLWNIYHPT37'], [5, False]], ['control ["XS0K4JDSXBN1"]', ['XS0K4JDSXBN1'], [4, False]]], [['regression ["US03783310a5"]', ['US03783310a5'], 'malformed'], ['control ["FRLWNIYHPT37"]', ['FRLWNIYHPT37'], [5, False]], ['control ["XS0K4JDSXBN1"]', ['XS0K4JDSXBN1'], [4, False]], ['control ["NL5BVKR8BB60"]', ['NL5BVKR8BB60'], [3, False]], ['control ["AUKWRNHD2XR3"]', ['AUKWRNHD2XR3'], [8, False]], ['control ["CA3CKMM2IAN8"]', ['CA3CKMM2IAN8'], [0, False]], ['control ["US6754047769"]', ['US6754047769'], [8, False]], ['control ["IE9141151847"]', ['IE9141151847'], [0, False]]], [['regression ["US03783310a5"]', ['US03783310a5'], 'malformed'], ['control ["US6754047769"]', ['US6754047769'], [8, False]], ['control ["IE9141151847"]', ['IE9141151847'], [0, False]], ['control ["LU7763909076"]', ['LU7763909076'], [8, False]], ['control ["KY3791880781"]', ['KY3791880781'], [4, False]], ['control ["BM9170095145"]', ['BM9170095145'], [7, False]], ['control ["US0378331005"]', ['US0378331005'], [5, True]], ['control ["US5949181045"]', ['US5949181045'], [5, True]]], [['regression ["US03783310a5"]', ['US03783310a5'], 'malformed'], ['control ["US0378331005"]', ['US0378331005'], [5, True]], ['control ["US5949181045"]', ['US5949181045'], [5, True]], ['control ["GB0002634946"]', ['GB0002634946'], [6, True]], ['control ["AU0000XVGZA3"]', ['AU0000XVGZA3'], [3, True]], ['control ["DE000BAY0017"]', ['DE000BAY0017'], [7, True]], ['control ["US037833100"]', ['US037833100'], 'malformed'], ['control ["us0378331005"]', ['us0378331005'], 'malformed']], [['regression ["US03783310a5"]', ['US03783310a5'], 'malformed'], ['control ["US037833100"]', ['US037833100'], 'malformed'], ['control ["us0378331005"]', ['us0378331005'], 'malformed'], ['control ["12Q037833100"]', ['12Q037833100'], 'malformed'], ['control ["1S0378331005"]', ['1S0378331005'], 'malformed'], ['control ["U10378331005"]', ['U10378331005'], 'malformed'], ['control ["XS2021832634"]', ['XS2021832634'], [4, True]], ['control ["US38259P5089"]', ['US38259P5089'], [9, True]]]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
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 |
|---|---|---|---|
| regression ["US03783310a5"] | [0, False] | malformed | Failed |
| control ["US4V5PGS4IX8"] | [0, False] | [0, False] | Passed |
| control ["GBOV8F5J6090"] | [7, False] | [7, False] | Passed |
| control ["DEC85GG2TSS1"] | [4, False] | [4, False] | Passed |
| control ["JPFWKDL124I1"] | [1, True] | [1, True] | Passed |
| control ["CHXVXSVIT016"] | [1, False] | [1, False] | Passed |
| control ["FRLWNIYHPT37"] | [5, False] | [5, False] | Passed |
| control ["XS0K4JDSXBN1"] | [4, False] | [4, False] | Passed |
SHA-256 / c43c9cbce65bfd29dea55f816ee3f9b62b25a03171810ff1857597361e3015d1
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
A deterministic, bounded teaching model of the named scheme under the stated contract; not a certified validator. 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:48:37.932317+00:00.
Case digest / 9bff587ae6a2aa560638887a486b6ce5c694c92d810e47c1513a19f15e204118