FAILURE MAP
← Case archive

FA-72681 / Check-digit algorithms / Open access

Structured communication rejects the *** delimiter · case 01

References written with asterisks are reported malformed.

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

ROOT CAUSE

Only +++ delimiters are recognised.

VERIFIED REPAIR

Accept matching +++ or *** delimiters.

Unsuccessful approach: Stripping plus signs from both ends does nothing for the asterisk form.

Case contract

Belgian structured payment communication: optional surrounding +++...+++ or ***...*** (matching), slashes ignored, then exactly 12 ASCII digits (else "malformed"). The last two digits must equal the first ten digits mod 97, where a remainder of 0 is written 97. Return whether they match.

Why this case matters

Banks reconcile incoming transfers by validating the structured reference before matching invoices.

1 / The failure

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

N = 1
observations = []
def solve(s):
    t = s.strip()
    if len(t) > 6 and t[:3] == t[-3:] and t[:3] == '+++':
        t = t[3:-3]
    t = t.replace('/', '')
    if len(t) != 12 or not t.isascii() or not t.isdigit():
        return 'malformed'
    r = int(t[:10]) % 97
    if r == 0:
        r = 97
    return r == int(t[10:])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression ["***035/9935/50934***"]', ['***035/9935/50934***'], True], ['regression ["***078/2001/09694***"]', ['***078/2001/09694***'], True], ['control ["621266857360"]', ['621266857360'], True], ['control ["+++865/5789/93879+++"]', ['+++865/5789/93879+++'], True], ['control ["371789633519"]', ['371789633519'], True], ['control ["+++131/9631/75508+++"]', ['+++131/9631/75508+++'], True], ['control ["640618349478"]', ['640618349478'], True], ['control ["+++990/8748/13965+++"]', ['+++990/8748/13965+++'], True]], [['regression ["***178/8225/23467***"]', ['***178/8225/23467***'], True], ['regression ["***090/9337/55493***"]', ['***090/9337/55493***'], True], ['control ["+++990/8748/13965+++"]', ['+++990/8748/13965+++'], True], ['control ["646994510702"]', ['646994510702'], True], ['control ["+++001/1569/26676+++"]', ['+++001/1569/26676+++'], True], ['control ["000000009797"]', ['000000009797'], True], ['control ["000000009700"]', ['000000009700'], False], ['control ["000000019497"]', ['000000019497'], True]], [['regression ["***078/2001/09694***"]', ['***078/2001/09694***'], True], ['regression ["***930/2019/38809***"]', ['***930/2019/38809***'], True], ['control ["000000019497"]', ['000000019497'], True], ['control ["000000019400"]', ['000000019400'], False], ['control ["123456780211"]', ['123456780211'], True], ['control ["123456780200"]', ['123456780200'], False], ['control ["999999997019"]', ['999999997019'], True], ['control ["999999997000"]', ['999999997000'], False]], [['regression ["***090/9337/55493***"]', ['***090/9337/55493***'], True], ['regression ["***035/9935/50934***"]', ['***035/9935/50934***'], True], ['control ["999999997000"]', ['999999997000'], False], ['control ["000000000097"]', ['000000000097'], True], ['control ["000000000000"]', ['000000000000'], False], ['control ["+++123/4567/89002+++"]', ['+++123/4567/89002+++'], True], ['control ["123456789002"]', ['123456789002'], True], ['control ["12345678900"]', ['12345678900'], 'malformed']], [['regression ["***930/2019/38809***"]', ['***930/2019/38809***'], True], ['regression ["***178/8225/23467***"]', ['***178/8225/23467***'], True], ['control ["12345678900"]', ['12345678900'], 'malformed'], ['control ["+++123/4567/8900A+++"]', ['+++123/4567/8900A+++'], 'malformed'], ['control ["+++090/9337/55493***"]', ['+++090/9337/55493***'], 'malformed'], ['control ["123456789003"]', ['123456789003'], False], ['control ["621266857360"]', ['621266857360'], True], ['control ["+++865/5789/93879+++"]', ['+++865/5789/93879+++'], 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 fixtureActualExpectedOutcome
regression ["***035/9935/50934***"]malformedTrueFailed
regression ["***078/2001/09694***"]malformedTrueFailed
control ["621266857360"]TrueTruePassed
control ["+++865/5789/93879+++"]TrueTruePassed
control ["371789633519"]TrueTruePassed
control ["+++131/9631/75508+++"]TrueTruePassed
control ["640618349478"]TrueTruePassed
control ["+++990/8748/13965+++"]TrueTruePassed

SHA-256 / 5f1d2c149b47671946bfc06a53cb6c05d5d873cee3a649c3a4ef9e3518f7c379

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(s):
    t = s.strip()
    t = t.strip('+')
    t = t.replace('/', '')
    if len(t) != 12 or not t.isascii() or not t.isdigit():
        return 'malformed'
    r = int(t[:10]) % 97
    if r == 0:
        r = 97
    return r == int(t[10:])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression ["***035/9935/50934***"]', ['***035/9935/50934***'], True], ['regression ["***078/2001/09694***"]', ['***078/2001/09694***'], True], ['control ["621266857360"]', ['621266857360'], True], ['control ["+++865/5789/93879+++"]', ['+++865/5789/93879+++'], True], ['control ["371789633519"]', ['371789633519'], True], ['control ["+++131/9631/75508+++"]', ['+++131/9631/75508+++'], True], ['control ["640618349478"]', ['640618349478'], True], ['control ["+++990/8748/13965+++"]', ['+++990/8748/13965+++'], True]], [['regression ["***178/8225/23467***"]', ['***178/8225/23467***'], True], ['regression ["***090/9337/55493***"]', ['***090/9337/55493***'], True], ['control ["+++990/8748/13965+++"]', ['+++990/8748/13965+++'], True], ['control ["646994510702"]', ['646994510702'], True], ['control ["+++001/1569/26676+++"]', ['+++001/1569/26676+++'], True], ['control ["000000009797"]', ['000000009797'], True], ['control ["000000009700"]', ['000000009700'], False], ['control ["000000019497"]', ['000000019497'], True]], [['regression ["***078/2001/09694***"]', ['***078/2001/09694***'], True], ['regression ["***930/2019/38809***"]', ['***930/2019/38809***'], True], ['control ["000000019497"]', ['000000019497'], True], ['control ["000000019400"]', ['000000019400'], False], ['control ["123456780211"]', ['123456780211'], True], ['control ["123456780200"]', ['123456780200'], False], ['control ["999999997019"]', ['999999997019'], True], ['control ["999999997000"]', ['999999997000'], False]], [['regression ["***090/9337/55493***"]', ['***090/9337/55493***'], True], ['regression ["***035/9935/50934***"]', ['***035/9935/50934***'], True], ['control ["999999997000"]', ['999999997000'], False], ['control ["000000000097"]', ['000000000097'], True], ['control ["000000000000"]', ['000000000000'], False], ['control ["+++123/4567/89002+++"]', ['+++123/4567/89002+++'], True], ['control ["123456789002"]', ['123456789002'], True], ['control ["12345678900"]', ['12345678900'], 'malformed']], [['regression ["***930/2019/38809***"]', ['***930/2019/38809***'], True], ['regression ["***178/8225/23467***"]', ['***178/8225/23467***'], True], ['control ["12345678900"]', ['12345678900'], 'malformed'], ['control ["+++123/4567/8900A+++"]', ['+++123/4567/8900A+++'], 'malformed'], ['control ["+++090/9337/55493***"]', ['+++090/9337/55493***'], 'malformed'], ['control ["123456789003"]', ['123456789003'], False], ['control ["621266857360"]', ['621266857360'], True], ['control ["+++865/5789/93879+++"]', ['+++865/5789/93879+++'], 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 fixtureActualExpectedOutcome
regression ["***035/9935/50934***"]malformedTrueFailed
regression ["***078/2001/09694***"]malformedTrueFailed
control ["621266857360"]TrueTruePassed
control ["+++865/5789/93879+++"]TrueTruePassed
control ["371789633519"]TrueTruePassed
control ["+++131/9631/75508+++"]TrueTruePassed
control ["640618349478"]TrueTruePassed
control ["+++990/8748/13965+++"]TrueTruePassed

SHA-256 / 5f3d871bcb178dad106a8aa81d8f418e0fa409a61e0bdc0a725cf88cc2c37c86

3 / The verified repair

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

N = 1
observations = []
def solve(s):
    t = s.strip()
    if len(t) > 6 and t[:3] == t[-3:] and t[:3] in ('+++', '***'):
        t = t[3:-3]
    t = t.replace('/', '')
    if len(t) != 12 or not t.isascii() or not t.isdigit():
        return 'malformed'
    r = int(t[:10]) % 97
    if r == 0:
        r = 97
    return r == int(t[10:])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression ["***035/9935/50934***"]', ['***035/9935/50934***'], True], ['regression ["***078/2001/09694***"]', ['***078/2001/09694***'], True], ['control ["621266857360"]', ['621266857360'], True], ['control ["+++865/5789/93879+++"]', ['+++865/5789/93879+++'], True], ['control ["371789633519"]', ['371789633519'], True], ['control ["+++131/9631/75508+++"]', ['+++131/9631/75508+++'], True], ['control ["640618349478"]', ['640618349478'], True], ['control ["+++990/8748/13965+++"]', ['+++990/8748/13965+++'], True]], [['regression ["***178/8225/23467***"]', ['***178/8225/23467***'], True], ['regression ["***090/9337/55493***"]', ['***090/9337/55493***'], True], ['control ["+++990/8748/13965+++"]', ['+++990/8748/13965+++'], True], ['control ["646994510702"]', ['646994510702'], True], ['control ["+++001/1569/26676+++"]', ['+++001/1569/26676+++'], True], ['control ["000000009797"]', ['000000009797'], True], ['control ["000000009700"]', ['000000009700'], False], ['control ["000000019497"]', ['000000019497'], True]], [['regression ["***078/2001/09694***"]', ['***078/2001/09694***'], True], ['regression ["***930/2019/38809***"]', ['***930/2019/38809***'], True], ['control ["000000019497"]', ['000000019497'], True], ['control ["000000019400"]', ['000000019400'], False], ['control ["123456780211"]', ['123456780211'], True], ['control ["123456780200"]', ['123456780200'], False], ['control ["999999997019"]', ['999999997019'], True], ['control ["999999997000"]', ['999999997000'], False]], [['regression ["***090/9337/55493***"]', ['***090/9337/55493***'], True], ['regression ["***035/9935/50934***"]', ['***035/9935/50934***'], True], ['control ["999999997000"]', ['999999997000'], False], ['control ["000000000097"]', ['000000000097'], True], ['control ["000000000000"]', ['000000000000'], False], ['control ["+++123/4567/89002+++"]', ['+++123/4567/89002+++'], True], ['control ["123456789002"]', ['123456789002'], True], ['control ["12345678900"]', ['12345678900'], 'malformed']], [['regression ["***930/2019/38809***"]', ['***930/2019/38809***'], True], ['regression ["***178/8225/23467***"]', ['***178/8225/23467***'], True], ['control ["12345678900"]', ['12345678900'], 'malformed'], ['control ["+++123/4567/8900A+++"]', ['+++123/4567/8900A+++'], 'malformed'], ['control ["+++090/9337/55493***"]', ['+++090/9337/55493***'], 'malformed'], ['control ["123456789003"]', ['123456789003'], False], ['control ["621266857360"]', ['621266857360'], True], ['control ["+++865/5789/93879+++"]', ['+++865/5789/93879+++'], 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 fixtureActualExpectedOutcome
regression ["***035/9935/50934***"]TrueTruePassed
regression ["***078/2001/09694***"]TrueTruePassed
control ["621266857360"]TrueTruePassed
control ["+++865/5789/93879+++"]TrueTruePassed
control ["371789633519"]TrueTruePassed
control ["+++131/9631/75508+++"]TrueTruePassed
control ["640618349478"]TrueTruePassed
control ["+++990/8748/13965+++"]TrueTruePassed

SHA-256 / 6ed22e628f159b3f21906d7e2b5b1f18413a33afec6ddbcaf025f01673380eb9

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

Case digest / 557b21b594b25fc59814c042e37ba5b9b20f1f1cbaa4dbb1b19783d51a6aa1e7