FAILURE MAP
← Case archive

FA-72551 / Check-digit algorithms / Open access

ORCID fold adds the digit after doubling · case 01

Almost every ORCID iD is rejected.

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

ROOT CAUSE

The recurrence is written total * 2 + digit (ordinary Horner) instead of (total + digit) * 2.

THE FAILURE

The recurrence is written total * 2 + digit (ordinary Horner) instead of (total + digit) * 2.

Unsuccessful approach: Doubling both before and after adding the digit applies the weight twice.

Case contract

ORCID identifier check (ISO 7064 MOD 11-2). Input is 16 characters, either plain or as four hyphen-separated groups of four (other hyphen layouts "malformed"); fifteen digits then a digit or uppercase X. Fold total = (total + digit) * 2 over the fifteen digits; the check value is (12 - total % 11) % 11 with 10 written X. Return [check character, whether it matches].

Why this case matters

Research information systems verify ORCID iDs before linking publications to authors.

1 / The failure

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

N = 1
observations = []
def solve(s):
    if '-' in s and [len(g) for g in s.split('-')] != [4, 4, 4, 4]:
        return 'malformed'
    t = s.replace('-', '')
    if len(t) != 16 or not t.isascii() or not t[:15].isdigit() or not (t[15].isdigit() or t[15] == 'X'):
        return 'malformed'
    total = 0
    for ch in t[:15]:
        total = total * 2 + int(ch)
    r = (12 - total % 11) % 11
    check = 'X' if r == 10 else str(r)
    return [check, check == t[15]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression ["0000-2284-2705-0317"]', ['0000-2284-2705-0317'], ['6', False]], ['regression ["0000-6830-1348-0503"]', ['0000-6830-1348-0503'], ['5', False]], ['control ["00000-002-1825-0097"]', ['00000-002-1825-0097'], 'malformed'], ['control ["0000-00021825-0097"]', ['0000-00021825-0097'], 'malformed'], ['control ["0000-0002-1825-009"]', ['0000-0002-1825-009'], 'malformed'], ['control ["000-00002-1825-0097"]', ['000-00002-1825-0097'], 'malformed'], ['control ["0000-0002-1694-233x"]', ['0000-0002-1694-233x'], 'malformed'], ['control ["0000-5056-4379-1736"]', ['0000-5056-4379-1736'], ['6', True]]], [['regression ["0000-4451-8984-5952"]', ['0000-4451-8984-5952'], ['7', False]], ['regression ["0000-8150-6101-2864"]', ['0000-8150-6101-2864'], ['3', False]], ['control ["00000-002-1825-0097"]', ['00000-002-1825-0097'], 'malformed'], ['control ["0000-00021825-0097"]', ['0000-00021825-0097'], 'malformed'], ['control ["0000-0002-1825-009"]', ['0000-0002-1825-009'], 'malformed'], ['control ["000-00002-1825-0097"]', ['000-00002-1825-0097'], 'malformed'], ['control ["0000-0002-1694-233x"]', ['0000-0002-1694-233x'], 'malformed'], ['control ["0000-5390-9620-5628"]', ['0000-5390-9620-5628'], ['4', False]]], [['regression ["0000-8999-3438-1875"]', ['0000-8999-3438-1875'], ['0', False]], ['regression ["0000-6263-5457-6118"]', ['0000-6263-5457-6118'], ['7', False]], ['control ["00000-002-1825-0097"]', ['00000-002-1825-0097'], 'malformed'], ['control ["0000-00021825-0097"]', ['0000-00021825-0097'], 'malformed'], ['control ["0000-0002-1825-009"]', ['0000-0002-1825-009'], 'malformed'], ['control ["000-00002-1825-0097"]', ['000-00002-1825-0097'], 'malformed'], ['control ["0000-0002-1694-233x"]', ['0000-0002-1694-233x'], 'malformed'], ['control ["8604828079008568"]', ['8604828079008568'], ['1', False]]], [['regression ["0000-5390-9620-5628"]', ['0000-5390-9620-5628'], ['4', False]], ['regression ["0000-4723-8762-7029"]', ['0000-4723-8762-7029'], ['2', False]], ['partial-repair ["0000-9095-7746-214X"]', ['0000-9095-7746-214X'], ['1', False]], ['control ["00000-002-1825-0097"]', ['00000-002-1825-0097'], 'malformed'], ['control ["0000-00021825-0097"]', ['0000-00021825-0097'], 'malformed'], ['control ["0000-0002-1825-009"]', ['0000-0002-1825-009'], 'malformed'], ['control ["000-00002-1825-0097"]', ['000-00002-1825-0097'], 'malformed'], ['control ["0000-0002-1694-233x"]', ['0000-0002-1694-233x'], 'malformed']], [['regression ["0000-9861-4470-6996"]', ['0000-9861-4470-6996'], ['8', False]], ['regression ["7242310350419377"]', ['7242310350419377'], ['6', False]], ['control ["00000-002-1825-0097"]', ['00000-002-1825-0097'], 'malformed'], ['control ["0000-00021825-0097"]', ['0000-00021825-0097'], 'malformed'], ['control ["0000-0002-1825-009"]', ['0000-0002-1825-009'], 'malformed'], ['control ["000-00002-1825-0097"]', ['000-00002-1825-0097'], 'malformed'], ['control ["0000-0002-1694-233x"]', ['0000-0002-1694-233x'], 'malformed'], ['control ["0000-2284-2705-0317"]', ['0000-2284-2705-0317'], ['6', 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 ["0000-2284-2705-0317"]['9', False]['6', False]Failed
regression ["0000-6830-1348-0503"]['3', True]['5', False]Failed
control ["00000-002-1825-0097"]malformedmalformedPassed
control ["0000-00021825-0097"]malformedmalformedPassed
control ["0000-0002-1825-009"]malformedmalformedPassed
control ["000-00002-1825-0097"]malformedmalformedPassed
control ["0000-0002-1694-233x"]malformedmalformedPassed
control ["0000-5056-4379-1736"]['9', False]['6', True]Failed

SHA-256 / fa70c36be5e35714c289cdded46e40185a8ada4ee2b14e87f2c1397fe5f4e3d2

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(s):
    if '-' in s and [len(g) for g in s.split('-')] != [4, 4, 4, 4]:
        return 'malformed'
    t = s.replace('-', '')
    if len(t) != 16 or not t.isascii() or not t[:15].isdigit() or not (t[15].isdigit() or t[15] == 'X'):
        return 'malformed'
    total = 0
    for ch in t[:15]:
        total = (total * 2 + int(ch)) * 2
    r = (12 - total % 11) % 11
    check = 'X' if r == 10 else str(r)
    return [check, check == t[15]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression ["0000-2284-2705-0317"]', ['0000-2284-2705-0317'], ['6', False]], ['regression ["0000-6830-1348-0503"]', ['0000-6830-1348-0503'], ['5', False]], ['control ["00000-002-1825-0097"]', ['00000-002-1825-0097'], 'malformed'], ['control ["0000-00021825-0097"]', ['0000-00021825-0097'], 'malformed'], ['control ["0000-0002-1825-009"]', ['0000-0002-1825-009'], 'malformed'], ['control ["000-00002-1825-0097"]', ['000-00002-1825-0097'], 'malformed'], ['control ["0000-0002-1694-233x"]', ['0000-0002-1694-233x'], 'malformed'], ['control ["0000-5056-4379-1736"]', ['0000-5056-4379-1736'], ['6', True]]], [['regression ["0000-4451-8984-5952"]', ['0000-4451-8984-5952'], ['7', False]], ['regression ["0000-8150-6101-2864"]', ['0000-8150-6101-2864'], ['3', False]], ['control ["00000-002-1825-0097"]', ['00000-002-1825-0097'], 'malformed'], ['control ["0000-00021825-0097"]', ['0000-00021825-0097'], 'malformed'], ['control ["0000-0002-1825-009"]', ['0000-0002-1825-009'], 'malformed'], ['control ["000-00002-1825-0097"]', ['000-00002-1825-0097'], 'malformed'], ['control ["0000-0002-1694-233x"]', ['0000-0002-1694-233x'], 'malformed'], ['control ["0000-5390-9620-5628"]', ['0000-5390-9620-5628'], ['4', False]]], [['regression ["0000-8999-3438-1875"]', ['0000-8999-3438-1875'], ['0', False]], ['regression ["0000-6263-5457-6118"]', ['0000-6263-5457-6118'], ['7', False]], ['control ["00000-002-1825-0097"]', ['00000-002-1825-0097'], 'malformed'], ['control ["0000-00021825-0097"]', ['0000-00021825-0097'], 'malformed'], ['control ["0000-0002-1825-009"]', ['0000-0002-1825-009'], 'malformed'], ['control ["000-00002-1825-0097"]', ['000-00002-1825-0097'], 'malformed'], ['control ["0000-0002-1694-233x"]', ['0000-0002-1694-233x'], 'malformed'], ['control ["8604828079008568"]', ['8604828079008568'], ['1', False]]], [['regression ["0000-5390-9620-5628"]', ['0000-5390-9620-5628'], ['4', False]], ['regression ["0000-4723-8762-7029"]', ['0000-4723-8762-7029'], ['2', False]], ['partial-repair ["0000-9095-7746-214X"]', ['0000-9095-7746-214X'], ['1', False]], ['control ["00000-002-1825-0097"]', ['00000-002-1825-0097'], 'malformed'], ['control ["0000-00021825-0097"]', ['0000-00021825-0097'], 'malformed'], ['control ["0000-0002-1825-009"]', ['0000-0002-1825-009'], 'malformed'], ['control ["000-00002-1825-0097"]', ['000-00002-1825-0097'], 'malformed'], ['control ["0000-0002-1694-233x"]', ['0000-0002-1694-233x'], 'malformed']], [['regression ["0000-9861-4470-6996"]', ['0000-9861-4470-6996'], ['8', False]], ['regression ["7242310350419377"]', ['7242310350419377'], ['6', False]], ['control ["00000-002-1825-0097"]', ['00000-002-1825-0097'], 'malformed'], ['control ["0000-00021825-0097"]', ['0000-00021825-0097'], 'malformed'], ['control ["0000-0002-1825-009"]', ['0000-0002-1825-009'], 'malformed'], ['control ["000-00002-1825-0097"]', ['000-00002-1825-0097'], 'malformed'], ['control ["0000-0002-1694-233x"]', ['0000-0002-1694-233x'], 'malformed'], ['control ["0000-2284-2705-0317"]', ['0000-2284-2705-0317'], ['6', 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 ["0000-2284-2705-0317"]['7', True]['6', False]Failed
regression ["0000-6830-1348-0503"]['6', False]['5', False]Failed
control ["00000-002-1825-0097"]malformedmalformedPassed
control ["0000-00021825-0097"]malformedmalformedPassed
control ["0000-0002-1825-009"]malformedmalformedPassed
control ["000-00002-1825-0097"]malformedmalformedPassed
control ["0000-0002-1694-233x"]malformedmalformedPassed
control ["0000-5056-4379-1736"]['0', False]['6', True]Failed

SHA-256 / c31e7430f71d9e841e0301ecf5343c97086bbdbca588a4a6b738a7a65d0cd1f3

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

Case digest / e168d766ea7a55aa804bac738c6dc3b35d74332f77d4e52e43d440f455636384