FA-27031 / HTTP ranges / Open access
A client serializes a typed range request plan: date validators are not serialized as opaque entity tags · case 01
A client serializes a typed range request plan: date validators are not serialized as opaque entity tags.
ROOT CAUSE
The outbound-range-request-date-unquoted 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 x['identity']: headers.append(['Accept-Encoding','identity']) return headers.
VERIFIED REPAIR
Apply the bounded decision exactly: 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)+'-') 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 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('date-unquoted 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('date-unquoted 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('date-unquoted fixture 2', json.loads(json.dumps(solve({'selectors':[],'validator':['tag','rev'],'identity':False}))), json.loads(json.dumps([])))
check('date-unquoted 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('date-unquoted 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('date-unquoted fixture 5', json.loads(json.dumps(solve({'selectors':[],'validator':None,'identity':True}))), json.loads(json.dumps([['Accept-Encoding','identity']])))
check('date-unquoted 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 |
|---|---|---|---|
| date-unquoted 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 |
| date-unquoted 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 |
| date-unquoted fixture 2 | [] | [] | Passed |
| date-unquoted fixture 3 | [['Range', 'bytes=9-9,0-0']] | [['Range', 'bytes=9-9,0-0']] | Passed |
| date-unquoted fixture 4 | [['Range', 'bytes=-0'], ['If-Range', '""']] | [['Range', 'bytes=-0'], ['If-Range', '""']] | Passed |
| date-unquoted fixture 5 | [['Accept-Encoding', 'identity']] | [['Accept-Encoding', 'identity']] | Passed |
| date-unquoted fixture 6 | [['Range', 'bytes=0-']] | [['Range', 'bytes=0-']] | Passed |
SHA-256 / 855ba42434c91d14e7c59892a55427793d0eb36977b973623479f25584c36cb9
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)+'-')
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('date-unquoted 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('date-unquoted 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('date-unquoted fixture 2', json.loads(json.dumps(solve({'selectors':[],'validator':['tag','rev'],'identity':False}))), json.loads(json.dumps([])))
check('date-unquoted 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('date-unquoted 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('date-unquoted fixture 5', json.loads(json.dumps(solve({'selectors':[],'validator':None,'identity':True}))), json.loads(json.dumps([['Accept-Encoding','identity']])))
check('date-unquoted 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 |
|---|---|---|---|
| date-unquoted fixture 0 | [['Range', 'bytes=0-1,-2'], ['If-Range', 'rev'], ['Accept-Encoding', 'identity']] | [['Range', 'bytes=0-1,-2'], ['If-Range', '"rev"'], ['Accept-Encoding', 'identity']] | Failed |
| date-unquoted 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 |
| date-unquoted fixture 2 | [] | [] | Passed |
| date-unquoted fixture 3 | [['Range', 'bytes=9-9,0-0']] | [['Range', 'bytes=9-9,0-0']] | Passed |
| date-unquoted fixture 4 | [['Range', 'bytes=-0'], ['If-Range', '']] | [['Range', 'bytes=-0'], ['If-Range', '""']] | Failed |
| date-unquoted fixture 5 | [['Accept-Encoding', 'identity']] | [['Accept-Encoding', 'identity']] | Passed |
| date-unquoted fixture 6 | [['Range', 'bytes=0-']] | [['Range', 'bytes=0-']] | Passed |
SHA-256 / 6a3b5d998c2db663422510e9c03298e691ab6edf2e57c1fa00fe832115d0b972
3 / The verified repair
Exit 0"""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('date-unquoted 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('date-unquoted 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('date-unquoted fixture 2', json.loads(json.dumps(solve({'selectors':[],'validator':['tag','rev'],'identity':False}))), json.loads(json.dumps([])))
check('date-unquoted 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('date-unquoted 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('date-unquoted fixture 5', json.loads(json.dumps(solve({'selectors':[],'validator':None,'identity':True}))), json.loads(json.dumps([['Accept-Encoding','identity']])))
check('date-unquoted 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 |
|---|---|---|---|
| date-unquoted 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 |
| date-unquoted 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']] | Passed |
| date-unquoted fixture 2 | [] | [] | Passed |
| date-unquoted fixture 3 | [['Range', 'bytes=9-9,0-0']] | [['Range', 'bytes=9-9,0-0']] | Passed |
| date-unquoted fixture 4 | [['Range', 'bytes=-0'], ['If-Range', '""']] | [['Range', 'bytes=-0'], ['If-Range', '""']] | Passed |
| date-unquoted fixture 5 | [['Accept-Encoding', 'identity']] | [['Accept-Encoding', 'identity']] | Passed |
| date-unquoted fixture 6 | [['Range', 'bytes=0-']] | [['Range', 'bytes=0-']] | Passed |
SHA-256 / 47d47c2a9a67aedb55cdb637ad0c7f4fbab882edd02a7d4ed0b1cc42a840060e
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:21.384860+00:00.
Case digest / 21979b3ad863373c15ab4edd921a71b4916bf3b17ed1631fefb891544eabd033