FAILURE MAP
← Case archive

FA-6686 / HTTP ranges / Open access

An open byte range clips at representation length and rejects starts beyond it · case 01

An open byte range clips at representation length and rejects starts beyond it.

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

ROOT CAUSE

The faulty implementation uses `(start, length)` for the range-open decision.

VERIFIED REPAIR

Apply the explicit range-open contract, including the tested boundary and negative cases.

Unsuccessful approach: The attempted repair uses `(min(start,length-1),length-1) if length else None` and still violates a separate fixture.

Case contract

An open byte range clips at representation length and rejects starts beyond it: return the result specified by the explicit input/output boundary fixtures.

Why this case matters

This deterministic http ranges model isolates the range-open policy at a network component boundary.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(start, length):
    return (start, length)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(2, 5), (2, 4))", "check('fixture 2', solve(5, 5), None)", "check('fixture 3', solve(0, 1), (0, 0))", "check('fixture 4', solve(0, 0), None)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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
fixture 2[5, 5]NoneFailed
fixture 3[0, 1][0, 0]Failed
fixture 4[0, 0]NoneFailed
fixture 1[2, 5][2, 4]Failed

SHA-256 / d024c69121a87cda074fc77a6dbd58e18ceb0cccf53c1633b2656f14e7a2c41f

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(start, length):
    return (min(start,length-1),length-1) if length else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(2, 5), (2, 4))", "check('fixture 2', solve(5, 5), None)", "check('fixture 3', solve(0, 1), (0, 0))", "check('fixture 4', solve(0, 0), None)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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
fixture 2[4, 4]NoneFailed
fixture 3[0, 0][0, 0]Passed
fixture 4NoneNonePassed
fixture 1[2, 4][2, 4]Passed

SHA-256 / 85d912a6f96750ededf09e29f15e67c4feb7d709c3c5fbbcb4fc880c77b9fd25

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(start, length):
    return (start, length-1) if 0 <= start < length else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(2, 5), (2, 4))", "check('fixture 2', solve(5, 5), None)", "check('fixture 3', solve(0, 1), (0, 0))", "check('fixture 4', solve(0, 0), None)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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
fixture 2NoneNonePassed
fixture 3[0, 0][0, 0]Passed
fixture 4NoneNonePassed
fixture 1[2, 4][2, 4]Passed

SHA-256 / a67d8086eb3dbcf3e0811885076d12d15deffa3088253f942eb07cfca4906003

Verification & scope

Bounded deterministic policy model over validated inputs; not a complete protocol stack or an interoperability claim. The five variants rotate the same explicit fixture set. 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:38:04.341491+00:00.

Case digest / 39568737c38d0224ce6626c959e9a9d66819bf402afd86ed117e80db394c3fe9