FAILURE MAP
← Case archive

FA-72526 / Check-digit algorithms / Open access

ABA prefix range stops before 12 · case 01

Routing numbers with prefix 12 are reported malformed.

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

ROOT CAUSE

The first range uses p < 12, excluding the last Federal Reserve district.

THE FAILURE

The first range uses p < 12, excluding the last Federal Reserve district.

Unsuccessful approach: Starting the range at 1 wrongly excludes government prefix 00.

Case contract

US ABA routing transit number: exactly nine ASCII digits whose first two digits lie in 00-12, 21-32, 61-72 or equal 80 (else "malformed"). Weights 3,7,1 repeat from the left; return whether the weighted sum is a multiple of 10.

Why this case matters

ACH origination checks routing numbers before transmitting a batch.

1 / The failure

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

N = 1
observations = []
def solve(s):
    if len(s) != 9 or not s.isascii() or not s.isdigit():
        return 'malformed'
    p = int(s[:2])
    if not (0 <= p < 12 or 21 <= p <= 32 or 61 <= p <= 72 or p == 80):
        return 'malformed'
    total = sum(int(ch) * (3, 7, 1)[i % 3] for i, ch in enumerate(s))
    return total % 10 == 0
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression ["121199382"]', ['121199382'], True], ['regression ["121199383"]', ['121199383'], False], ['partial-repair ["000396219"]', ['000396219'], True], ['partial-repair ["000396210"]', ['000396210'], False], ['control ["014060861"]', ['014060861'], True], ['control ["014060862"]', ['014060862'], False], ['control ["056885062"]', ['056885062'], True], ['control ["056885063"]', ['056885063'], False]], [['regression ["123311509"]', ['123311509'], False], ['regression ["122105155"]', ['122105155'], True], ['partial-repair ["000396210"]', ['000396210'], False], ['partial-repair ["000396219"]', ['000396219'], True], ['control ["119218425"]', ['119218425'], False], ['control ["217283403"]', ['217283403'], True], ['control ["217283404"]', ['217283404'], False], ['control ["262758598"]', ['262758598'], True]], [['regression ["121199382"]', ['121199382'], True], ['regression ["121199383"]', ['121199383'], False], ['partial-repair ["000396219"]', ['000396219'], True], ['partial-repair ["000396210"]', ['000396210'], False], ['control ["311681228"]', ['311681228'], True], ['control ["311681229"]', ['311681229'], False], ['control ["324890048"]', ['324890048'], True], ['control ["324890049"]', ['324890049'], False]], [['regression ["123311509"]', ['123311509'], False], ['regression ["122105155"]', ['122105155'], True], ['partial-repair ["000396210"]', ['000396210'], False], ['partial-repair ["000396219"]', ['000396219'], True], ['control ["616486213"]', ['616486213'], False], ['control ["670455289"]', ['670455289'], True], ['control ["670455280"]', ['670455280'], False], ['control ["720402959"]', ['720402959'], True]], [['regression ["121199382"]', ['121199382'], True], ['regression ["121199383"]', ['121199383'], False], ['partial-repair ["000396219"]', ['000396219'], True], ['partial-repair ["000396210"]', ['000396210'], False], ['control ["808489768"]', ['808489768'], True], ['control ["808489769"]', ['808489769'], False], ['control ["328477386"]', ['328477386'], True], ['control ["328477387"]', ['328477387'], False]]]
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 ["121199382"]malformedTrueFailed
regression ["121199383"]malformedFalseFailed
partial-repair ["000396219"]TrueTruePassed
partial-repair ["000396210"]FalseFalsePassed
control ["014060861"]TrueTruePassed
control ["014060862"]FalseFalsePassed
control ["056885062"]TrueTruePassed
control ["056885063"]FalseFalsePassed

SHA-256 / e045344ef9e9642e67ea9bf1cb8ce77f59cd6f073a39364db110cd57d154d100

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) != 9 or not s.isascii() or not s.isdigit():
        return 'malformed'
    p = int(s[:2])
    if not (1 <= p <= 12 or 21 <= p <= 32 or 61 <= p <= 72 or p == 80):
        return 'malformed'
    total = sum(int(ch) * (3, 7, 1)[i % 3] for i, ch in enumerate(s))
    return total % 10 == 0
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression ["121199382"]', ['121199382'], True], ['regression ["121199383"]', ['121199383'], False], ['partial-repair ["000396219"]', ['000396219'], True], ['partial-repair ["000396210"]', ['000396210'], False], ['control ["014060861"]', ['014060861'], True], ['control ["014060862"]', ['014060862'], False], ['control ["056885062"]', ['056885062'], True], ['control ["056885063"]', ['056885063'], False]], [['regression ["123311509"]', ['123311509'], False], ['regression ["122105155"]', ['122105155'], True], ['partial-repair ["000396210"]', ['000396210'], False], ['partial-repair ["000396219"]', ['000396219'], True], ['control ["119218425"]', ['119218425'], False], ['control ["217283403"]', ['217283403'], True], ['control ["217283404"]', ['217283404'], False], ['control ["262758598"]', ['262758598'], True]], [['regression ["121199382"]', ['121199382'], True], ['regression ["121199383"]', ['121199383'], False], ['partial-repair ["000396219"]', ['000396219'], True], ['partial-repair ["000396210"]', ['000396210'], False], ['control ["311681228"]', ['311681228'], True], ['control ["311681229"]', ['311681229'], False], ['control ["324890048"]', ['324890048'], True], ['control ["324890049"]', ['324890049'], False]], [['regression ["123311509"]', ['123311509'], False], ['regression ["122105155"]', ['122105155'], True], ['partial-repair ["000396210"]', ['000396210'], False], ['partial-repair ["000396219"]', ['000396219'], True], ['control ["616486213"]', ['616486213'], False], ['control ["670455289"]', ['670455289'], True], ['control ["670455280"]', ['670455280'], False], ['control ["720402959"]', ['720402959'], True]], [['regression ["121199382"]', ['121199382'], True], ['regression ["121199383"]', ['121199383'], False], ['partial-repair ["000396219"]', ['000396219'], True], ['partial-repair ["000396210"]', ['000396210'], False], ['control ["808489768"]', ['808489768'], True], ['control ["808489769"]', ['808489769'], False], ['control ["328477386"]', ['328477386'], True], ['control ["328477387"]', ['328477387'], False]]]
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 ["121199382"]TrueTruePassed
regression ["121199383"]FalseFalsePassed
partial-repair ["000396219"]malformedTrueFailed
partial-repair ["000396210"]malformedFalseFailed
control ["014060861"]TrueTruePassed
control ["014060862"]FalseFalsePassed
control ["056885062"]TrueTruePassed
control ["056885063"]FalseFalsePassed

SHA-256 / 774bf510e6f72859bf28a430421f89c52910806d3de35e4e92f7f82150d19fb0

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

Case digest / 1acaaa9426072c4a9d8c38e5875c49bbbbb9c4a94217d59403086755dff759da