FAILURE MAP
← Case archive

FA-96681 / Phone number formatting / Open access

DID range shorthand expansion: a full hundred block is rejected · case 01

"5550100-5550199" returns None.

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

ROOT CAUSE

The cap uses >= 100.

VERIFIED REPAIR

Allow up to and including 100 numbers.

Unsuccessful approach: Raising the cap to 1000 accepts oversize blocks.

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 = 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 blockNone['5550100', '5550199', 100]Failed
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 / 09fcd5c1ced44779295ee2a13c367b581a7a9fc2dd756b3d71631e2f05b67527

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(a) - len(b)] + b
    count = int(end) - int(a) + 1
    if count < 1 or count > 1000:
        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 one['5550100', '5550200', 101]NoneFailed
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 / 1d20e6a262072cccde9497d64f1458dfdf932218822db2487f450f01fb890132

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

Case digest / 0a7e2e12aa0361db6106af3820f4eeba6d8881fa8c3ba2e570904b2bdf51f646