FAILURE MAP
← Case archive

FA-26921 / HTTP ranges / Open access

A packed-object origin maps logical byte requests to immutable backing objects: negative logical mappings cannot create valid object positions · case 01

A packed-object origin maps logical byte requests to immutable backing objects: negative logical mappings cannot create valid object positions.

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

ROOT CAUSE

The packed-origin-map-negative-logical decision uses cells={} for logical,handle,physical,count in x['extents']: if count==0: continue if physical<0 or count<0: return None if handle not in x['packs']: return None pack=x['packs'][handle] if physical+count>len(pack): return None for i in range(count): at=logical+i if at in cells: return None cells[at]=pack[physical+i] if any(at not in cells for at in x['requested']): return None return ''.join(cells[at] for at in x['requested']).

THE FAILURE

The packed-origin-map-negative-logical decision uses cells={} for logical,handle,physical,count in x['extents']: if count==0: continue if physical<0 or count<0: return None if handle not in x['packs']: return None pack=x['packs'][handle] if physical+count>len(pack): return None for i in range(count): at=logical+i if at in cells: return None cells[at]=pack[physical+i] if any(at not in cells for at in x['requested']): return None return ''.join(cells[at] for at in x['requested']).

Unsuccessful approach: The partial repair uses cells={} for logical,handle,physical,count in x['extents']: if count==0: continue if logical<-1 or physical<0 or count<0: return None if handle not in x['packs']: return None pack=x['packs'][handle] if physical+count>len(pack): return None for i in range(count): at=logical+i if at in cells: return None cells[at]=pack[physical+i] if any(at not in cells for at in x['requested']): return None return ''.join(cells[at] for at in x['requested']), which still violates the stated contract.

Case contract

x has pack strings keyed by handle, extent rows [logical-start,handle,physical-start,count], and explicit requested logical offsets. Extents may arrive unordered. Empty extents ignored. Reject negative mapping coordinates, missing handles, out-of-pack spans, or overlapping logical ownership. Return requested characters in request order, retaining repeated requested offsets; unavailable requested offsets yield None. This is a bounded storage adapter underlying HTTP range delivery, not interval normalization.

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):
    cells={}
    for logical,handle,physical,count in x['extents']:
        if count==0: continue
        if physical<0 or count<0: return None
        if handle not in x['packs']: return None
        pack=x['packs'][handle]
        if physical+count>len(pack): return None
        for i in range(count):
            at=logical+i
            if at in cells: return None
            cells[at]=pack[physical+i]
    if any(at not in cells for at in x['requested']): return None
    return ''.join(cells[at] for at in x['requested'])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('negative-logical fixture 0', json.loads(json.dumps(solve({'packs':{'a':'QabcZ','b':'RxyzS'},'extents':[[3,'b',1,3],[0,'a',1,3]],'requested':[0,3,1,4,2,5]}))), json.loads(json.dumps('axbycz')))
check('negative-logical fixture 1', json.loads(json.dumps(solve({'packs':{'a':'QabcZ'},'extents':[[0,'a',1,3]],'requested':[2,0,2]}))), json.loads(json.dumps('cac')))
check('negative-logical fixture 2', json.loads(json.dumps(solve({'packs':{'a':'abc'},'extents':[[0,'a',0,3]],'requested':[0,3]}))), json.loads(json.dumps(None)))
check('negative-logical fixture 3', json.loads(json.dumps(solve({'packs':{'a':'abc'},'extents':[[0,'a',0,3],[1,'a',1,1]],'requested':[1]}))), json.loads(json.dumps(None)))
check('negative-logical fixture 4', json.loads(json.dumps(solve({'packs':{'a':'abc'},'extents':[[0,'missing',0,0],[0,'a',0,3]],'requested':[0]}))), json.loads(json.dumps('a')))
check('negative-logical fixture 5', json.loads(json.dumps(solve({'packs':{'a':'abc'},'extents':[[-1,'a',0,1]],'requested':[]}))), json.loads(json.dumps(None)))
check('negative-logical fixture 6', json.loads(json.dumps(solve({'packs':{'a':'abc'},'extents':[[0,'a',-1,1]],'requested':[0]}))), json.loads(json.dumps(None)))
check('negative-logical fixture 7', json.loads(json.dumps(solve({'packs':{'a':'abc'},'extents':[[0,'a',0,-1]],'requested':[]}))), json.loads(json.dumps(None)))
check('negative-logical fixture 8', json.loads(json.dumps(solve({'packs':{},'extents':[[0,'a',0,1]],'requested':[]}))), json.loads(json.dumps(None)))
check('negative-logical fixture 9', json.loads(json.dumps(solve({'packs':{'a':'abc'},'extents':[[0,'a',2,2]],'requested':[0]}))), json.loads(json.dumps(None)))
check('negative-logical fixture 10', json.loads(json.dumps(solve({'packs':{},'extents':[],'requested':[]}))), json.loads(json.dumps('')))
check('negative-logical fixture 11', json.loads(json.dumps(solve({'packs':{'a':"p"*N},'extents':[[0,'a',0,N]],'requested':[0]}))), json.loads(json.dumps('p')))
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
negative-logical fixture 0axbyczaxbyczPassed
negative-logical fixture 1caccacPassed
negative-logical fixture 2NoneNonePassed
negative-logical fixture 3NoneNonePassed
negative-logical fixture 4aaPassed
negative-logical fixture 5NoneFailed
negative-logical fixture 6NoneNonePassed
negative-logical fixture 7NoneNonePassed
negative-logical fixture 8NoneNonePassed
negative-logical fixture 9NoneNonePassed
negative-logical fixture 10Passed
negative-logical fixture 11ppPassed

SHA-256 / bca77a859b8bb1b2efc0e2d627529a3a72dd5e11ea06a6bb126db6d5439f73f5

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(x):
    cells={}
    for logical,handle,physical,count in x['extents']:
        if count==0: continue
        if logical<-1 or physical<0 or count<0: return None
        if handle not in x['packs']: return None
        pack=x['packs'][handle]
        if physical+count>len(pack): return None
        for i in range(count):
            at=logical+i
            if at in cells: return None
            cells[at]=pack[physical+i]
    if any(at not in cells for at in x['requested']): return None
    return ''.join(cells[at] for at in x['requested'])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('negative-logical fixture 0', json.loads(json.dumps(solve({'packs':{'a':'QabcZ','b':'RxyzS'},'extents':[[3,'b',1,3],[0,'a',1,3]],'requested':[0,3,1,4,2,5]}))), json.loads(json.dumps('axbycz')))
check('negative-logical fixture 1', json.loads(json.dumps(solve({'packs':{'a':'QabcZ'},'extents':[[0,'a',1,3]],'requested':[2,0,2]}))), json.loads(json.dumps('cac')))
check('negative-logical fixture 2', json.loads(json.dumps(solve({'packs':{'a':'abc'},'extents':[[0,'a',0,3]],'requested':[0,3]}))), json.loads(json.dumps(None)))
check('negative-logical fixture 3', json.loads(json.dumps(solve({'packs':{'a':'abc'},'extents':[[0,'a',0,3],[1,'a',1,1]],'requested':[1]}))), json.loads(json.dumps(None)))
check('negative-logical fixture 4', json.loads(json.dumps(solve({'packs':{'a':'abc'},'extents':[[0,'missing',0,0],[0,'a',0,3]],'requested':[0]}))), json.loads(json.dumps('a')))
check('negative-logical fixture 5', json.loads(json.dumps(solve({'packs':{'a':'abc'},'extents':[[-1,'a',0,1]],'requested':[]}))), json.loads(json.dumps(None)))
check('negative-logical fixture 6', json.loads(json.dumps(solve({'packs':{'a':'abc'},'extents':[[0,'a',-1,1]],'requested':[0]}))), json.loads(json.dumps(None)))
check('negative-logical fixture 7', json.loads(json.dumps(solve({'packs':{'a':'abc'},'extents':[[0,'a',0,-1]],'requested':[]}))), json.loads(json.dumps(None)))
check('negative-logical fixture 8', json.loads(json.dumps(solve({'packs':{},'extents':[[0,'a',0,1]],'requested':[]}))), json.loads(json.dumps(None)))
check('negative-logical fixture 9', json.loads(json.dumps(solve({'packs':{'a':'abc'},'extents':[[0,'a',2,2]],'requested':[0]}))), json.loads(json.dumps(None)))
check('negative-logical fixture 10', json.loads(json.dumps(solve({'packs':{},'extents':[],'requested':[]}))), json.loads(json.dumps('')))
check('negative-logical fixture 11', json.loads(json.dumps(solve({'packs':{'a':"p"*N},'extents':[[0,'a',0,N]],'requested':[0]}))), json.loads(json.dumps('p')))
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
negative-logical fixture 0axbyczaxbyczPassed
negative-logical fixture 1caccacPassed
negative-logical fixture 2NoneNonePassed
negative-logical fixture 3NoneNonePassed
negative-logical fixture 4aaPassed
negative-logical fixture 5NoneFailed
negative-logical fixture 6NoneNonePassed
negative-logical fixture 7NoneNonePassed
negative-logical fixture 8NoneNonePassed
negative-logical fixture 9NoneNonePassed
negative-logical fixture 10Passed
negative-logical fixture 11ppPassed

SHA-256 / 6c34b4a99b107621d28bbbf46a689163a4f93b8aca62cb0ab8ad288277ae0984

HELD IN THE MEMBER ARCHIVE

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

This mechanism has 12 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.270920+00:00.

Case digest / 195c87818ce3fb9494f33d2db558047d19290a14f3fcb1424baac00d7671396a