FAILURE MAP
← Case archive

FA-27421 / HTTP ranges / Open access

An upload status endpoint reports committed byte coverage: a new acknowledged run begins at its own first committed byte · case 01

An upload status endpoint reports committed byte coverage: a new acknowledged run begins at its own first committed byte.

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

ROOT CAUSE

The upload-coverage-probe-run-origin 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([0,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].

THE FAILURE

The upload-coverage-probe-run-origin 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([0,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([runs[-1][1]+1 if runs else 0,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], 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([0,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('run-origin 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('run-origin fixture 1', json.loads(json.dumps(solve({'total':3,'committed':[2,0,1]}))), json.loads(json.dumps(['complete','bytes=0-2',3])))
check('run-origin fixture 2', json.loads(json.dumps(solve({'total':0,'committed':[]}))), json.loads(json.dumps(['complete',None,0])))
check('run-origin fixture 3', json.loads(json.dumps(solve({'total':4,'committed':[2,3]}))), json.loads(json.dumps(['partial','bytes=2-3',0])))
check('run-origin fixture 4', json.loads(json.dumps(solve({'total':4,'committed':[0,2]}))), json.loads(json.dumps(['partial','bytes=0-0,2-2',1])))
check('run-origin 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('run-origin fixture 6', json.loads(json.dumps(solve({'total':3,'committed':[3]}))), json.loads(json.dumps(None)))
check('run-origin fixture 7', json.loads(json.dumps(solve({'total':3,'committed':[-1]}))), json.loads(json.dumps(None)))
check('run-origin 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
run-origin fixture 0['partial', 'bytes=0-1,0-5', 2]['partial', 'bytes=0-1,4-5', 2]Failed
run-origin fixture 1['complete', 'bytes=0-2', 3]['complete', 'bytes=0-2', 3]Passed
run-origin fixture 2['complete', None, 0]['complete', None, 0]Passed
run-origin fixture 3['partial', 'bytes=0-3', 0]['partial', 'bytes=2-3', 0]Failed
run-origin fixture 4['partial', 'bytes=0-0,0-2', 1]['partial', 'bytes=0-0,2-2', 1]Failed
run-origin fixture 5['partial', 'bytes=0-0', 1]['partial', 'bytes=0-0', 1]Passed
run-origin fixture 6NoneNonePassed
run-origin fixture 7NoneNonePassed
run-origin fixture 8['partial', None, 0]['partial', None, 0]Passed

SHA-256 / d369d65a18f5b53c6edbd2fdc3ef36bbefb1f5b1370e4e8e4a6ebc335ee722b6

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([runs[-1][1]+1 if runs else 0,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('run-origin 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('run-origin fixture 1', json.loads(json.dumps(solve({'total':3,'committed':[2,0,1]}))), json.loads(json.dumps(['complete','bytes=0-2',3])))
check('run-origin fixture 2', json.loads(json.dumps(solve({'total':0,'committed':[]}))), json.loads(json.dumps(['complete',None,0])))
check('run-origin fixture 3', json.loads(json.dumps(solve({'total':4,'committed':[2,3]}))), json.loads(json.dumps(['partial','bytes=2-3',0])))
check('run-origin fixture 4', json.loads(json.dumps(solve({'total':4,'committed':[0,2]}))), json.loads(json.dumps(['partial','bytes=0-0,2-2',1])))
check('run-origin 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('run-origin fixture 6', json.loads(json.dumps(solve({'total':3,'committed':[3]}))), json.loads(json.dumps(None)))
check('run-origin fixture 7', json.loads(json.dumps(solve({'total':3,'committed':[-1]}))), json.loads(json.dumps(None)))
check('run-origin 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
run-origin fixture 0['partial', 'bytes=0-1,2-5', 2]['partial', 'bytes=0-1,4-5', 2]Failed
run-origin fixture 1['complete', 'bytes=0-2', 3]['complete', 'bytes=0-2', 3]Passed
run-origin fixture 2['complete', None, 0]['complete', None, 0]Passed
run-origin fixture 3['partial', 'bytes=0-3', 0]['partial', 'bytes=2-3', 0]Failed
run-origin fixture 4['partial', 'bytes=0-0,1-2', 1]['partial', 'bytes=0-0,2-2', 1]Failed
run-origin fixture 5['partial', 'bytes=0-0', 1]['partial', 'bytes=0-0', 1]Passed
run-origin fixture 6NoneNonePassed
run-origin fixture 7NoneNonePassed
run-origin fixture 8['partial', None, 0]['partial', None, 0]Passed

SHA-256 / 5e73d8b09f7ec1d9b5477f75679e9a1e27746151c164f6ea589f84797498f8a2

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 9 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

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

Case digest / 93a277f52cb94c6272a14f6f510b3a89206f2bdffdbd3cad7a874c8c85d36872