FA-26996 / HTTP ranges / Open access
A client serializes a typed range request plan: open selectors keep an empty final component · case 01
A client serializes a typed range request plan: open selectors keep an empty final component.
ROOT CAUSE
The outbound-range-request-open-format decision uses members=[] for kind,a,b in x['selectors']: if kind=='closed': members.append(str(a)+'-'+str(b)) elif kind=='open': members.append(str(a)) elif kind=='suffix': members.append('-'+str(a)) headers=[] if members: headers.append(['Range','bytes='+','.join(members)]) if x['validator'] is not None: kind,value=x['validator'] headers.append(['If-Range','"'+value+'"' if kind=='tag' else value]) if x['identity']: headers.append(['Accept-Encoding','identity']) return headers.
THE FAILURE
The outbound-range-request-open-format decision uses members=[] for kind,a,b in x['selectors']: if kind=='closed': members.append(str(a)+'-'+str(b)) elif kind=='open': members.append(str(a)) elif kind=='suffix': members.append('-'+str(a)) headers=[] if members: headers.append(['Range','bytes='+','.join(members)]) if x['validator'] is not None: kind,value=x['validator'] headers.append(['If-Range','"'+value+'"' if kind=='tag' else value]) if x['identity']: headers.append(['Accept-Encoding','identity']) return headers.
Unsuccessful approach: The partial repair uses members=[] for kind,a,b in x['selectors']: if kind=='closed': members.append(str(a)+'-'+str(b)) elif kind=='open': members.append(str(a)+'-'+str(a)) elif kind=='suffix': members.append('-'+str(a)) headers=[] if members: headers.append(['Range','bytes='+','.join(members)]) if x['validator'] is not None: kind,value=x['validator'] headers.append(['If-Range','"'+value+'"' if kind=='tag' else value]) if x['identity']: headers.append(['Accept-Encoding','identity']) return headers, which still violates the stated contract.
Case contract
Input x contains selectors [kind,a,b], validator [tag|date,value] or null, and accept encoding policy. Closed selectors serialize a-b, open selectors a-, suffix selectors -a, in input order. Empty selectors omit Range and If-Range. Tag validators are quoted opaque ASCII strings without quotes/backslashes; dates are already formatted and remain unquoted. Identity-only policy emits Accept-Encoding identity. Return ordered [header,value] pairs.
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):
members=[]
for kind,a,b in x['selectors']:
if kind=='closed': members.append(str(a)+'-'+str(b))
elif kind=='open': members.append(str(a))
elif kind=='suffix': members.append('-'+str(a))
headers=[]
if members:
headers.append(['Range','bytes='+','.join(members)])
if x['validator'] is not None:
kind,value=x['validator']
headers.append(['If-Range','"'+value+'"' if kind=='tag' else value])
if x['identity']: headers.append(['Accept-Encoding','identity'])
return headers
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('open-format fixture 0', json.loads(json.dumps(solve({'selectors':[['closed',0,N],['suffix',2,None]],'validator':['tag','rev'],'identity':True}))), json.loads(json.dumps([['Range',"bytes=0-"+str(N)+",-2"],['If-Range','"rev"'],['Accept-Encoding','identity']])))
check('open-format fixture 1', json.loads(json.dumps(solve({'selectors':[['open',5,None]],'validator':['date','Mon, 01 Jan 2001 00:00:00 GMT'],'identity':False}))), json.loads(json.dumps([['Range','bytes=5-'],['If-Range','Mon, 01 Jan 2001 00:00:00 GMT']])))
check('open-format fixture 2', json.loads(json.dumps(solve({'selectors':[],'validator':['tag','rev'],'identity':False}))), json.loads(json.dumps([])))
check('open-format fixture 3', json.loads(json.dumps(solve({'selectors':[['closed',9,9],['closed',0,0]],'validator':None,'identity':False}))), json.loads(json.dumps([['Range','bytes=9-9,0-0']])))
check('open-format fixture 4', json.loads(json.dumps(solve({'selectors':[['suffix',0,None]],'validator':['tag',''],'identity':False}))), json.loads(json.dumps([['Range','bytes=-0'],['If-Range','""']])))
check('open-format fixture 5', json.loads(json.dumps(solve({'selectors':[],'validator':None,'identity':True}))), json.loads(json.dumps([['Accept-Encoding','identity']])))
check('open-format fixture 6', json.loads(json.dumps(solve({'selectors':[['open',0,None]],'validator':None,'identity':False}))), json.loads(json.dumps([['Range','bytes=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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| open-format fixture 0 | [['Range', 'bytes=0-1,-2'], ['If-Range', '"rev"'], ['Accept-Encoding', 'identity']] | [['Range', 'bytes=0-1,-2'], ['If-Range', '"rev"'], ['Accept-Encoding', 'identity']] | Passed |
| open-format fixture 1 | [['Range', 'bytes=5'], ['If-Range', 'Mon, 01 Jan 2001 00:00:00 GMT']] | [['Range', 'bytes=5-'], ['If-Range', 'Mon, 01 Jan 2001 00:00:00 GMT']] | Failed |
| open-format fixture 2 | [] | [] | Passed |
| open-format fixture 3 | [['Range', 'bytes=9-9,0-0']] | [['Range', 'bytes=9-9,0-0']] | Passed |
| open-format fixture 4 | [['Range', 'bytes=-0'], ['If-Range', '""']] | [['Range', 'bytes=-0'], ['If-Range', '""']] | Passed |
| open-format fixture 5 | [['Accept-Encoding', 'identity']] | [['Accept-Encoding', 'identity']] | Passed |
| open-format fixture 6 | [['Range', 'bytes=0']] | [['Range', 'bytes=0-']] | Failed |
SHA-256 / 04093a4512cfe29ab45b578b2c7a655536fc93fbf874af8f7e5f9e597229a6c2
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
members=[]
for kind,a,b in x['selectors']:
if kind=='closed': members.append(str(a)+'-'+str(b))
elif kind=='open': members.append(str(a)+'-'+str(a))
elif kind=='suffix': members.append('-'+str(a))
headers=[]
if members:
headers.append(['Range','bytes='+','.join(members)])
if x['validator'] is not None:
kind,value=x['validator']
headers.append(['If-Range','"'+value+'"' if kind=='tag' else value])
if x['identity']: headers.append(['Accept-Encoding','identity'])
return headers
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('open-format fixture 0', json.loads(json.dumps(solve({'selectors':[['closed',0,N],['suffix',2,None]],'validator':['tag','rev'],'identity':True}))), json.loads(json.dumps([['Range',"bytes=0-"+str(N)+",-2"],['If-Range','"rev"'],['Accept-Encoding','identity']])))
check('open-format fixture 1', json.loads(json.dumps(solve({'selectors':[['open',5,None]],'validator':['date','Mon, 01 Jan 2001 00:00:00 GMT'],'identity':False}))), json.loads(json.dumps([['Range','bytes=5-'],['If-Range','Mon, 01 Jan 2001 00:00:00 GMT']])))
check('open-format fixture 2', json.loads(json.dumps(solve({'selectors':[],'validator':['tag','rev'],'identity':False}))), json.loads(json.dumps([])))
check('open-format fixture 3', json.loads(json.dumps(solve({'selectors':[['closed',9,9],['closed',0,0]],'validator':None,'identity':False}))), json.loads(json.dumps([['Range','bytes=9-9,0-0']])))
check('open-format fixture 4', json.loads(json.dumps(solve({'selectors':[['suffix',0,None]],'validator':['tag',''],'identity':False}))), json.loads(json.dumps([['Range','bytes=-0'],['If-Range','""']])))
check('open-format fixture 5', json.loads(json.dumps(solve({'selectors':[],'validator':None,'identity':True}))), json.loads(json.dumps([['Accept-Encoding','identity']])))
check('open-format fixture 6', json.loads(json.dumps(solve({'selectors':[['open',0,None]],'validator':None,'identity':False}))), json.loads(json.dumps([['Range','bytes=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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| open-format fixture 0 | [['Range', 'bytes=0-1,-2'], ['If-Range', '"rev"'], ['Accept-Encoding', 'identity']] | [['Range', 'bytes=0-1,-2'], ['If-Range', '"rev"'], ['Accept-Encoding', 'identity']] | Passed |
| open-format fixture 1 | [['Range', 'bytes=5-5'], ['If-Range', 'Mon, 01 Jan 2001 00:00:00 GMT']] | [['Range', 'bytes=5-'], ['If-Range', 'Mon, 01 Jan 2001 00:00:00 GMT']] | Failed |
| open-format fixture 2 | [] | [] | Passed |
| open-format fixture 3 | [['Range', 'bytes=9-9,0-0']] | [['Range', 'bytes=9-9,0-0']] | Passed |
| open-format fixture 4 | [['Range', 'bytes=-0'], ['If-Range', '""']] | [['Range', 'bytes=-0'], ['If-Range', '""']] | Passed |
| open-format fixture 5 | [['Accept-Encoding', 'identity']] | [['Accept-Encoding', 'identity']] | Passed |
| open-format fixture 6 | [['Range', 'bytes=0-0']] | [['Range', 'bytes=0-']] | Failed |
SHA-256 / f53954996f3ee4f474d1bb95fecaebc1b46798ba0da1a2dd9ba23aabe886cad0
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 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:20.932149+00:00.
Case digest / dc1e0b646ef322bdd929ed6c41a0cdd7feca4a228b289da6985e3a17cead3206