FAILURE MAP
← Case archive

FA-96676 / Phone number formatting / Open access

DID range shorthand expansion: block size excludes the end number · case 01

A hundred-number block reports 99 numbers and a single number is rejected.

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

ROOT CAUSE

The count is END - START without the +1.

VERIFIED REPAIR

Count inclusively: END - START + 1.

Unsuccessful approach: Adding the +1 only for shorthand input leaves full-form ranges one short.

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)
    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', 11]['5550100', '5550111', 12]Failed
shorthand crossing a hundred['5550195', '5550211', 16]['5550195', '5550211', 17]Failed
full hundred block['5550100', '5550199', 99]['5550100', '5550199', 100]Failed
block of one hundred and one['5550100', '5550200', 100]NoneFailed
descending by oneNoneNonePassed
single numberNone['5550105', '5550105', 1]Failed
spaced separator['5550100', '5550101', 1]['5550100', '5550101', 2]Failed
space after the separator['5550100', '5550101', 1]['5550100', '5550101', 2]Failed
letters rejectedNoneNonePassed

SHA-256 / 3e0c00a33513d7e18969c42636c01c76e991bd2b69cf0f5db3f618ce7d35b3f7

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 len(b) < len(a) else int(end) - int(a)
    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', 99]['5550100', '5550199', 100]Failed
block of one hundred and one['5550100', '5550200', 100]NoneFailed
descending by oneNoneNonePassed
single numberNone['5550105', '5550105', 1]Failed
spaced separator['5550100', '5550101', 2]['5550100', '5550101', 2]Passed
space after the separator['5550100', '5550101', 2]['5550100', '5550101', 2]Passed
letters rejectedNoneNonePassed

SHA-256 / 19324d35e6d0b02e79b236e28af328b458bc924a3c6c1a761141ea079b974a8d

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

Case digest / b5a05507a24307cd88ac2a0f3c381a693833e5559de68db8801fa74173aec81a