FAILURE MAP
← Case archive

FA-96671 / Phone number formatting / Open access

DID range shorthand expansion: the tail is treated as a whole number · case 01

"5550195-211" expands to "0000211" and is rejected.

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

ROOT CAUSE

The tail is zero-padded instead of spliced over the end of the start number.

VERIFIED REPAIR

Replace the last len(END) digits of START with END.

Unsuccessful approach: Splicing onto the first digits of START builds an unrelated number.

Case contract

Input "START-END" (spaces ignored). END may be a shorter tail that replaces the last digits of START. Both parts must be digits and END no longer than START. The block is START..END inclusive and must hold 1..100 numbers. Return [start, full end, count] or None.

Why this case matters

Number blocks are ordered and ported in shorthand; a wrong expansion provisions numbers that belong to someone else.

1 / The failure

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

N = 1
observations = []
def solve(x):
    s = x.replace(' ', '')
    if s.count('-') != 1:
        return None
    a, b = s.split('-')
    if not (a.isdigit() and b.isdigit()) or len(b) > len(a):
        return None
    end = b.rjust(len(a), '0')
    count = int(end) - int(a) + 1
    if count < 1 or count > 100:
        return None
    return [a, end, count]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['two-digit shorthand', '5550100-11', ['5550100', '5550111', 12]], ['shorthand crossing a hundred', '5550195-211', ['5550195', '5550211', 17]], ['full hundred block', '5550100-5550199', ['5550100', '5550199', 100]], ['block of one hundred and one', '5550100-5550200', None], ['descending by one', '5550105-04', None], ['single number', '5550105-5550105', ['5550105', '5550105', 1]], ['spaced separator', '5550100 - 01', ['5550100', '5550101', 2]], ['space after the separator', '5550100- 01', ['5550100', '5550101', 2]], ['letters rejected', 'FAKE-01', None]], [['two-digit shorthand', '5550100-12', ['5550100', '5550112', 13]], ['shorthand crossing a hundred', '5550195-222', ['5550195', '5550222', 28]], ['full hundred block', '5550100-5550199', ['5550100', '5550199', 100]], ['block of one hundred and one', '5550100-5550200', None], ['descending by one', '5550105-04', None], ['single number', '5550105-5550105', ['5550105', '5550105', 1]], ['spaced separator', '5550100 - 02', ['5550100', '5550102', 3]], ['space after the separator', '5550100- 02', ['5550100', '5550102', 3]], ['letters rejected', 'FAKE-01', None]], [['two-digit shorthand', '5550100-13', ['5550100', '5550113', 14]], ['shorthand crossing a hundred', '5550195-233', ['5550195', '5550233', 39]], ['full hundred block', '5550100-5550199', ['5550100', '5550199', 100]], ['block of one hundred and one', '5550100-5550200', None], ['descending by one', '5550105-04', None], ['single number', '5550105-5550105', ['5550105', '5550105', 1]], ['spaced separator', '5550100 - 03', ['5550100', '5550103', 4]], ['space after the separator', '5550100- 03', ['5550100', '5550103', 4]], ['letters rejected', 'FAKE-01', None]], [['two-digit shorthand', '5550100-14', ['5550100', '5550114', 15]], ['shorthand crossing a hundred', '5550195-244', ['5550195', '5550244', 50]], ['full hundred block', '5550100-5550199', ['5550100', '5550199', 100]], ['block of one hundred and one', '5550100-5550200', None], ['descending by one', '5550105-04', None], ['single number', '5550105-5550105', ['5550105', '5550105', 1]], ['spaced separator', '5550100 - 04', ['5550100', '5550104', 5]], ['space after the separator', '5550100- 04', ['5550100', '5550104', 5]], ['letters rejected', 'FAKE-01', None]], [['two-digit shorthand', '5550100-15', ['5550100', '5550115', 16]], ['shorthand crossing a hundred', '5550195-255', ['5550195', '5550255', 61]], ['full hundred block', '5550100-5550199', ['5550100', '5550199', 100]], ['block of one hundred and one', '5550100-5550200', None], ['descending by one', '5550105-04', None], ['single number', '5550105-5550105', ['5550105', '5550105', 1]], ['spaced separator', '5550100 - 05', ['5550100', '5550105', 6]], ['space after the separator', '5550100- 05', ['5550100', '5550105', 6]], ['letters rejected', 'FAKE-01', None]]]
for label, arg, expected in fixtures[N - 1]:
    check(label, solve(arg), 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
two-digit shorthandNone['5550100', '5550111', 12]Failed
shorthand crossing a hundredNone['5550195', '5550211', 17]Failed
full hundred block['5550100', '5550199', 100]['5550100', '5550199', 100]Passed
block of one hundred and oneNoneNonePassed
descending by oneNoneNonePassed
single number['5550105', '5550105', 1]['5550105', '5550105', 1]Passed
spaced separatorNone['5550100', '5550101', 2]Failed
space after the separatorNone['5550100', '5550101', 2]Failed
letters rejectedNoneNonePassed

SHA-256 / 9d93e2c0ca63dcdac2c43f531b2b6ef6c2497a056bc9154e75caaf8c7d834f43

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(x):
    s = x.replace(' ', '')
    if s.count('-') != 1:
        return None
    a, b = s.split('-')
    if not (a.isdigit() and b.isdigit()) or len(b) > len(a):
        return None
    end = a[:len(b)] + b
    count = int(end) - int(a) + 1
    if count < 1 or count > 100:
        return None
    return [a, end, count]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['two-digit shorthand', '5550100-11', ['5550100', '5550111', 12]], ['shorthand crossing a hundred', '5550195-211', ['5550195', '5550211', 17]], ['full hundred block', '5550100-5550199', ['5550100', '5550199', 100]], ['block of one hundred and one', '5550100-5550200', None], ['descending by one', '5550105-04', None], ['single number', '5550105-5550105', ['5550105', '5550105', 1]], ['spaced separator', '5550100 - 01', ['5550100', '5550101', 2]], ['space after the separator', '5550100- 01', ['5550100', '5550101', 2]], ['letters rejected', 'FAKE-01', None]], [['two-digit shorthand', '5550100-12', ['5550100', '5550112', 13]], ['shorthand crossing a hundred', '5550195-222', ['5550195', '5550222', 28]], ['full hundred block', '5550100-5550199', ['5550100', '5550199', 100]], ['block of one hundred and one', '5550100-5550200', None], ['descending by one', '5550105-04', None], ['single number', '5550105-5550105', ['5550105', '5550105', 1]], ['spaced separator', '5550100 - 02', ['5550100', '5550102', 3]], ['space after the separator', '5550100- 02', ['5550100', '5550102', 3]], ['letters rejected', 'FAKE-01', None]], [['two-digit shorthand', '5550100-13', ['5550100', '5550113', 14]], ['shorthand crossing a hundred', '5550195-233', ['5550195', '5550233', 39]], ['full hundred block', '5550100-5550199', ['5550100', '5550199', 100]], ['block of one hundred and one', '5550100-5550200', None], ['descending by one', '5550105-04', None], ['single number', '5550105-5550105', ['5550105', '5550105', 1]], ['spaced separator', '5550100 - 03', ['5550100', '5550103', 4]], ['space after the separator', '5550100- 03', ['5550100', '5550103', 4]], ['letters rejected', 'FAKE-01', None]], [['two-digit shorthand', '5550100-14', ['5550100', '5550114', 15]], ['shorthand crossing a hundred', '5550195-244', ['5550195', '5550244', 50]], ['full hundred block', '5550100-5550199', ['5550100', '5550199', 100]], ['block of one hundred and one', '5550100-5550200', None], ['descending by one', '5550105-04', None], ['single number', '5550105-5550105', ['5550105', '5550105', 1]], ['spaced separator', '5550100 - 04', ['5550100', '5550104', 5]], ['space after the separator', '5550100- 04', ['5550100', '5550104', 5]], ['letters rejected', 'FAKE-01', None]], [['two-digit shorthand', '5550100-15', ['5550100', '5550115', 16]], ['shorthand crossing a hundred', '5550195-255', ['5550195', '5550255', 61]], ['full hundred block', '5550100-5550199', ['5550100', '5550199', 100]], ['block of one hundred and one', '5550100-5550200', None], ['descending by one', '5550105-04', None], ['single number', '5550105-5550105', ['5550105', '5550105', 1]], ['spaced separator', '5550100 - 05', ['5550100', '5550105', 6]], ['space after the separator', '5550100- 05', ['5550100', '5550105', 6]], ['letters rejected', 'FAKE-01', None]]]
for label, arg, expected in fixtures[N - 1]:
    check(label, solve(arg), 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
two-digit shorthandNone['5550100', '5550111', 12]Failed
shorthand crossing a hundredNone['5550195', '5550211', 17]Failed
full hundred blockNone['5550100', '5550199', 100]Failed
block of one hundred and oneNoneNonePassed
descending by oneNoneNonePassed
single numberNone['5550105', '5550105', 1]Failed
spaced separatorNone['5550100', '5550101', 2]Failed
space after the separatorNone['5550100', '5550101', 2]Failed
letters rejectedNoneNonePassed

SHA-256 / faf70a0e4b9f76ae932f8f276890571d38a9a8fdac963db7c57ae3162bf35aa7

3 / The verified repair

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

N = 1
observations = []
def solve(x):
    s = x.replace(' ', '')
    if s.count('-') != 1:
        return None
    a, b = s.split('-')
    if not (a.isdigit() and b.isdigit()) or len(b) > len(a):
        return None
    end = a[:len(a) - len(b)] + b
    count = int(end) - int(a) + 1
    if count < 1 or count > 100:
        return None
    return [a, end, count]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['two-digit shorthand', '5550100-11', ['5550100', '5550111', 12]], ['shorthand crossing a hundred', '5550195-211', ['5550195', '5550211', 17]], ['full hundred block', '5550100-5550199', ['5550100', '5550199', 100]], ['block of one hundred and one', '5550100-5550200', None], ['descending by one', '5550105-04', None], ['single number', '5550105-5550105', ['5550105', '5550105', 1]], ['spaced separator', '5550100 - 01', ['5550100', '5550101', 2]], ['space after the separator', '5550100- 01', ['5550100', '5550101', 2]], ['letters rejected', 'FAKE-01', None]], [['two-digit shorthand', '5550100-12', ['5550100', '5550112', 13]], ['shorthand crossing a hundred', '5550195-222', ['5550195', '5550222', 28]], ['full hundred block', '5550100-5550199', ['5550100', '5550199', 100]], ['block of one hundred and one', '5550100-5550200', None], ['descending by one', '5550105-04', None], ['single number', '5550105-5550105', ['5550105', '5550105', 1]], ['spaced separator', '5550100 - 02', ['5550100', '5550102', 3]], ['space after the separator', '5550100- 02', ['5550100', '5550102', 3]], ['letters rejected', 'FAKE-01', None]], [['two-digit shorthand', '5550100-13', ['5550100', '5550113', 14]], ['shorthand crossing a hundred', '5550195-233', ['5550195', '5550233', 39]], ['full hundred block', '5550100-5550199', ['5550100', '5550199', 100]], ['block of one hundred and one', '5550100-5550200', None], ['descending by one', '5550105-04', None], ['single number', '5550105-5550105', ['5550105', '5550105', 1]], ['spaced separator', '5550100 - 03', ['5550100', '5550103', 4]], ['space after the separator', '5550100- 03', ['5550100', '5550103', 4]], ['letters rejected', 'FAKE-01', None]], [['two-digit shorthand', '5550100-14', ['5550100', '5550114', 15]], ['shorthand crossing a hundred', '5550195-244', ['5550195', '5550244', 50]], ['full hundred block', '5550100-5550199', ['5550100', '5550199', 100]], ['block of one hundred and one', '5550100-5550200', None], ['descending by one', '5550105-04', None], ['single number', '5550105-5550105', ['5550105', '5550105', 1]], ['spaced separator', '5550100 - 04', ['5550100', '5550104', 5]], ['space after the separator', '5550100- 04', ['5550100', '5550104', 5]], ['letters rejected', 'FAKE-01', None]], [['two-digit shorthand', '5550100-15', ['5550100', '5550115', 16]], ['shorthand crossing a hundred', '5550195-255', ['5550195', '5550255', 61]], ['full hundred block', '5550100-5550199', ['5550100', '5550199', 100]], ['block of one hundred and one', '5550100-5550200', None], ['descending by one', '5550105-04', None], ['single number', '5550105-5550105', ['5550105', '5550105', 1]], ['spaced separator', '5550100 - 05', ['5550100', '5550105', 6]], ['space after the separator', '5550100- 05', ['5550100', '5550105', 6]], ['letters rejected', 'FAKE-01', None]]]
for label, arg, expected in fixtures[N - 1]:
    check(label, solve(arg), 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
two-digit shorthand['5550100', '5550111', 12]['5550100', '5550111', 12]Passed
shorthand crossing a hundred['5550195', '5550211', 17]['5550195', '5550211', 17]Passed
full hundred block['5550100', '5550199', 100]['5550100', '5550199', 100]Passed
block of one hundred and oneNoneNonePassed
descending by oneNoneNonePassed
single number['5550105', '5550105', 1]['5550105', '5550105', 1]Passed
spaced separator['5550100', '5550101', 2]['5550100', '5550101', 2]Passed
space after the separator['5550100', '5550101', 2]['5550100', '5550101', 2]Passed
letters rejectedNoneNonePassed

SHA-256 / 9213895a91a42e80b3701036e5b796e57ed84c2d75492527513567388ffb9882

Verification & scope

A deterministic toy contract over synthetic, obviously fictitious telephone numbers and toy country tables. The rules are stipulated for this model only and make no claim of conformance with any numbering plan or telecommunications standard. 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:52:24.929986+00:00.

Case digest / 35dd0cf0e31a53e28539e3bb9fb0224c4e31f74c908a5849b3a1ba9869719547