FAILURE MAP
← Case archive

FA-27426 / HTTP ranges / Open access

An upload status endpoint reports committed byte coverage: no committed bytes means no acknowledged range field · case 01

An upload status endpoint reports committed byte coverage: no committed bytes means no acknowledged range field.

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

ROOT CAUSE

The upload-coverage-probe-empty-header decision uses positions=sorted(set(x['committed'])) if any(p<0 or p>=x['total'] for p in positions): return None runs=[] for p in positions: if runs and p==runs[-1][1]+1: runs[-1][1]=p else: runs.append([p,p]) field='bytes='+','.join(str(a)+'-'+str(b) for a,b in runs) if runs else 'bytes=' prefix=0 for p in positions: if p!=prefix: break prefix+=1 state='complete' if len(positions)==x['total'] else 'partial' return [state,field,prefix].

VERIFIED REPAIR

Apply the bounded decision exactly: positions=sorted(set(x['committed'])) if any(p<0 or p>=x['total'] for p in positions): return None runs=[] for p in positions: if runs and p==runs[-1][1]+1: runs[-1][1]=p else: runs.append([p,p]) field='bytes='+','.join(str(a)+'-'+str(b) for a,b in runs) if runs else None prefix=0 for p in positions: if p!=prefix: break prefix+=1 state='complete' if len(positions)==x['total'] else 'partial' return [state,field,prefix]

Unsuccessful approach: The partial repair uses positions=sorted(set(x['committed'])) if any(p<0 or p>=x['total'] for p in positions): return None runs=[] for p in positions: if runs and p==runs[-1][1]+1: runs[-1][1]=p else: runs.append([p,p]) field='bytes='+','.join(str(a)+'-'+str(b) for a,b in runs) if runs else 'bytes=*/'+str(x['total']) prefix=0 for p in positions: if p!=prefix: break prefix+=1 state='complete' if len(positions)==x['total'] else 'partial' return [state,field,prefix], which still violates the stated contract.

Case contract

x has a nonnegative complete length and committed byte offsets, which may repeat or arrive unordered. Reject offsets outside the representation. Return [complete|partial,acknowledged-range-field-or-null,next-missing-prefix-offset]. The local acknowledged field uses bytes= followed by comma-separated inclusive runs. Empty coverage has null header; an empty representation is complete. next-missing is the end of the committed contiguous prefix, not the highest written offset.

Why this case matters

Range responses combine representation identity, conditional requests, framing, and partial-object state.

1 / The failure

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

N = 1
observations = []
def solve(x):
    positions=sorted(set(x['committed']))
    if any(p<0 or p>=x['total'] for p in positions): return None
    runs=[]
    for p in positions:
        if runs and p==runs[-1][1]+1:
            runs[-1][1]=p
        else:
            runs.append([p,p])
    field='bytes='+','.join(str(a)+'-'+str(b) for a,b in runs) if runs else 'bytes='
    prefix=0
    for p in positions:
        if p!=prefix: break
        prefix+=1
    state='complete' if len(positions)==x['total'] else 'partial'
    return [state,field,prefix]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty-header fixture 0', json.loads(json.dumps(solve({'total':7,'committed':[4,0,1,5,1]}))), json.loads(json.dumps(['partial','bytes=0-1,4-5',2])))
check('empty-header fixture 1', json.loads(json.dumps(solve({'total':3,'committed':[2,0,1]}))), json.loads(json.dumps(['complete','bytes=0-2',3])))
check('empty-header fixture 2', json.loads(json.dumps(solve({'total':0,'committed':[]}))), json.loads(json.dumps(['complete',None,0])))
check('empty-header fixture 3', json.loads(json.dumps(solve({'total':4,'committed':[2,3]}))), json.loads(json.dumps(['partial','bytes=2-3',0])))
check('empty-header fixture 4', json.loads(json.dumps(solve({'total':4,'committed':[0,2]}))), json.loads(json.dumps(['partial','bytes=0-0,2-2',1])))
check('empty-header fixture 5', json.loads(json.dumps(solve({'total':N+1,'committed':list(range(N))}))), json.loads(json.dumps(['partial',"bytes=0-"+str(N-1),N])))
check('empty-header fixture 6', json.loads(json.dumps(solve({'total':3,'committed':[3]}))), json.loads(json.dumps(None)))
check('empty-header fixture 7', json.loads(json.dumps(solve({'total':3,'committed':[-1]}))), json.loads(json.dumps(None)))
check('empty-header fixture 8', json.loads(json.dumps(solve({'total':3,'committed':[]}))), json.loads(json.dumps(['partial',None,0])))
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
empty-header fixture 0['partial', 'bytes=0-1,4-5', 2]['partial', 'bytes=0-1,4-5', 2]Passed
empty-header fixture 1['complete', 'bytes=0-2', 3]['complete', 'bytes=0-2', 3]Passed
empty-header fixture 2['complete', 'bytes=', 0]['complete', None, 0]Failed
empty-header fixture 3['partial', 'bytes=2-3', 0]['partial', 'bytes=2-3', 0]Passed
empty-header fixture 4['partial', 'bytes=0-0,2-2', 1]['partial', 'bytes=0-0,2-2', 1]Passed
empty-header fixture 5['partial', 'bytes=0-0', 1]['partial', 'bytes=0-0', 1]Passed
empty-header fixture 6NoneNonePassed
empty-header fixture 7NoneNonePassed
empty-header fixture 8['partial', 'bytes=', 0]['partial', None, 0]Failed

SHA-256 / e0b9e0e68a05f88f1b477eb69135d63762824359576518b270836593b4d25b4d

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(x):
    positions=sorted(set(x['committed']))
    if any(p<0 or p>=x['total'] for p in positions): return None
    runs=[]
    for p in positions:
        if runs and p==runs[-1][1]+1:
            runs[-1][1]=p
        else:
            runs.append([p,p])
    field='bytes='+','.join(str(a)+'-'+str(b) for a,b in runs) if runs else 'bytes=*/'+str(x['total'])
    prefix=0
    for p in positions:
        if p!=prefix: break
        prefix+=1
    state='complete' if len(positions)==x['total'] else 'partial'
    return [state,field,prefix]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty-header fixture 0', json.loads(json.dumps(solve({'total':7,'committed':[4,0,1,5,1]}))), json.loads(json.dumps(['partial','bytes=0-1,4-5',2])))
check('empty-header fixture 1', json.loads(json.dumps(solve({'total':3,'committed':[2,0,1]}))), json.loads(json.dumps(['complete','bytes=0-2',3])))
check('empty-header fixture 2', json.loads(json.dumps(solve({'total':0,'committed':[]}))), json.loads(json.dumps(['complete',None,0])))
check('empty-header fixture 3', json.loads(json.dumps(solve({'total':4,'committed':[2,3]}))), json.loads(json.dumps(['partial','bytes=2-3',0])))
check('empty-header fixture 4', json.loads(json.dumps(solve({'total':4,'committed':[0,2]}))), json.loads(json.dumps(['partial','bytes=0-0,2-2',1])))
check('empty-header fixture 5', json.loads(json.dumps(solve({'total':N+1,'committed':list(range(N))}))), json.loads(json.dumps(['partial',"bytes=0-"+str(N-1),N])))
check('empty-header fixture 6', json.loads(json.dumps(solve({'total':3,'committed':[3]}))), json.loads(json.dumps(None)))
check('empty-header fixture 7', json.loads(json.dumps(solve({'total':3,'committed':[-1]}))), json.loads(json.dumps(None)))
check('empty-header fixture 8', json.loads(json.dumps(solve({'total':3,'committed':[]}))), json.loads(json.dumps(['partial',None,0])))
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
empty-header fixture 0['partial', 'bytes=0-1,4-5', 2]['partial', 'bytes=0-1,4-5', 2]Passed
empty-header fixture 1['complete', 'bytes=0-2', 3]['complete', 'bytes=0-2', 3]Passed
empty-header fixture 2['complete', 'bytes=*/0', 0]['complete', None, 0]Failed
empty-header fixture 3['partial', 'bytes=2-3', 0]['partial', 'bytes=2-3', 0]Passed
empty-header fixture 4['partial', 'bytes=0-0,2-2', 1]['partial', 'bytes=0-0,2-2', 1]Passed
empty-header fixture 5['partial', 'bytes=0-0', 1]['partial', 'bytes=0-0', 1]Passed
empty-header fixture 6NoneNonePassed
empty-header fixture 7NoneNonePassed
empty-header fixture 8['partial', 'bytes=*/3', 0]['partial', None, 0]Failed

SHA-256 / 391a3fd7a0dc94932b01dba8453195f666ebf80247dc6bcc0b0cd0e5b9026552

3 / The verified repair

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

N = 1
observations = []
def solve(x):
    positions=sorted(set(x['committed']))
    if any(p<0 or p>=x['total'] for p in positions): return None
    runs=[]
    for p in positions:
        if runs and p==runs[-1][1]+1:
            runs[-1][1]=p
        else:
            runs.append([p,p])
    field='bytes='+','.join(str(a)+'-'+str(b) for a,b in runs) if runs else None
    prefix=0
    for p in positions:
        if p!=prefix: break
        prefix+=1
    state='complete' if len(positions)==x['total'] else 'partial'
    return [state,field,prefix]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty-header fixture 0', json.loads(json.dumps(solve({'total':7,'committed':[4,0,1,5,1]}))), json.loads(json.dumps(['partial','bytes=0-1,4-5',2])))
check('empty-header fixture 1', json.loads(json.dumps(solve({'total':3,'committed':[2,0,1]}))), json.loads(json.dumps(['complete','bytes=0-2',3])))
check('empty-header fixture 2', json.loads(json.dumps(solve({'total':0,'committed':[]}))), json.loads(json.dumps(['complete',None,0])))
check('empty-header fixture 3', json.loads(json.dumps(solve({'total':4,'committed':[2,3]}))), json.loads(json.dumps(['partial','bytes=2-3',0])))
check('empty-header fixture 4', json.loads(json.dumps(solve({'total':4,'committed':[0,2]}))), json.loads(json.dumps(['partial','bytes=0-0,2-2',1])))
check('empty-header fixture 5', json.loads(json.dumps(solve({'total':N+1,'committed':list(range(N))}))), json.loads(json.dumps(['partial',"bytes=0-"+str(N-1),N])))
check('empty-header fixture 6', json.loads(json.dumps(solve({'total':3,'committed':[3]}))), json.loads(json.dumps(None)))
check('empty-header fixture 7', json.loads(json.dumps(solve({'total':3,'committed':[-1]}))), json.loads(json.dumps(None)))
check('empty-header fixture 8', json.loads(json.dumps(solve({'total':3,'committed':[]}))), json.loads(json.dumps(['partial',None,0])))
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
empty-header fixture 0['partial', 'bytes=0-1,4-5', 2]['partial', 'bytes=0-1,4-5', 2]Passed
empty-header fixture 1['complete', 'bytes=0-2', 3]['complete', 'bytes=0-2', 3]Passed
empty-header fixture 2['complete', None, 0]['complete', None, 0]Passed
empty-header fixture 3['partial', 'bytes=2-3', 0]['partial', 'bytes=2-3', 0]Passed
empty-header fixture 4['partial', 'bytes=0-0,2-2', 1]['partial', 'bytes=0-0,2-2', 1]Passed
empty-header fixture 5['partial', 'bytes=0-0', 1]['partial', 'bytes=0-0', 1]Passed
empty-header fixture 6NoneNonePassed
empty-header fixture 7NoneNonePassed
empty-header fixture 8['partial', None, 0]['partial', None, 0]Passed

SHA-256 / a34b6e12e5d53e1c7e3c4ac1a09e4aaee403eabee14690441cdc10601b8f6f79

Verification & scope

Deterministic simplified range service, with stipulated local policies and already parsed trusted inputs; not a complete HTTP implementation. 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:41:25.014731+00:00.

Case digest / a624a5b6029f6bdd721a0876cbd3890103b8d46c53d66ac1b05eff3b094a62d6