FAILURE MAP
← Case archive

FA-26391 / HTTP ranges / Open access

Byte offsets address the selected encoded representation · case 01

Byte offsets address the selected encoded representation.

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

ROOT CAUSE

The encoded-offset-domain decision uses return identity[start:stop].

VERIFIED REPAIR

Apply the bounded decision exactly: return (encoded if use_encoded else identity)[start:stop]

Unsuccessful approach: The partial repair uses return encoded[start:stop] if use_encoded and len(encoded)>len(identity) else identity[start:stop], which still violates the stated contract.

Case contract

ASCII identity and encoded are distinct stored representations. Slice [start:stop] from the negotiated representation without decoding.

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(identity, encoded, use_encoded, start, stop):
    return identity[start:stop]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('encoded-offset-domain fixture 0', solve("abcdef"*N,"XYZ"*N,True,0,2), "XY")
check('encoded-offset-domain fixture 1', solve("abcdef","XYZ",False,1,3), "bc")
check('encoded-offset-domain fixture 2', solve("abcdef","XYZ",True,1,3), "YZ")
check('encoded-offset-domain fixture 3', solve("","",True,0,1), "")
check('encoded-offset-domain fixture 4', solve("ab","WXYZ",True,0,2), "WX")
check('encoded-offset-domain fixture 5', solve("abc","X",False,0,1), "a")
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
encoded-offset-domain fixture 0abXYFailed
encoded-offset-domain fixture 1bcbcPassed
encoded-offset-domain fixture 2bcYZFailed
encoded-offset-domain fixture 3Passed
encoded-offset-domain fixture 4abWXFailed
encoded-offset-domain fixture 5aaPassed

SHA-256 / 32a3e0de0861be745cc68afa38db372106c1f3add0a443605ce44cdc78293bd3

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(identity, encoded, use_encoded, start, stop):
    return encoded[start:stop] if use_encoded and len(encoded)>len(identity) else identity[start:stop]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('encoded-offset-domain fixture 0', solve("abcdef"*N,"XYZ"*N,True,0,2), "XY")
check('encoded-offset-domain fixture 1', solve("abcdef","XYZ",False,1,3), "bc")
check('encoded-offset-domain fixture 2', solve("abcdef","XYZ",True,1,3), "YZ")
check('encoded-offset-domain fixture 3', solve("","",True,0,1), "")
check('encoded-offset-domain fixture 4', solve("ab","WXYZ",True,0,2), "WX")
check('encoded-offset-domain fixture 5', solve("abc","X",False,0,1), "a")
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
encoded-offset-domain fixture 0abXYFailed
encoded-offset-domain fixture 1bcbcPassed
encoded-offset-domain fixture 2bcYZFailed
encoded-offset-domain fixture 3Passed
encoded-offset-domain fixture 4WXWXPassed
encoded-offset-domain fixture 5aaPassed

SHA-256 / cbfab074188a19513f03a33bf873a782579d98a3da39f11b8419e818091c0869

3 / The verified repair

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

N = 1
observations = []
def solve(identity, encoded, use_encoded, start, stop):
    return (encoded if use_encoded else identity)[start:stop]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('encoded-offset-domain fixture 0', solve("abcdef"*N,"XYZ"*N,True,0,2), "XY")
check('encoded-offset-domain fixture 1', solve("abcdef","XYZ",False,1,3), "bc")
check('encoded-offset-domain fixture 2', solve("abcdef","XYZ",True,1,3), "YZ")
check('encoded-offset-domain fixture 3', solve("","",True,0,1), "")
check('encoded-offset-domain fixture 4', solve("ab","WXYZ",True,0,2), "WX")
check('encoded-offset-domain fixture 5', solve("abc","X",False,0,1), "a")
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
encoded-offset-domain fixture 0XYXYPassed
encoded-offset-domain fixture 1bcbcPassed
encoded-offset-domain fixture 2YZYZPassed
encoded-offset-domain fixture 3Passed
encoded-offset-domain fixture 4WXWXPassed
encoded-offset-domain fixture 5aaPassed

SHA-256 / 2fb6164c8e4c853fdc0503ac72952508f4e4dd58f50843c1488854f1f4694485

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

Case digest / 73d77109f823ae9b55590c00f618e11484ea75654b1f1b088b2f5f4759063bd4