FA-26696 / HTTP ranges / Open access
Unsatisfied range metadata reports the complete length without invented endpoints · case 01
Unsatisfied range metadata reports the complete length without invented endpoints.
ROOT CAUSE
The content-range-unsatisfied-format decision uses return f"bytes 0-{length-1}/{length}".
VERIFIED REPAIR
Apply the bounded decision exactly: return f"bytes */{length}"
Unsuccessful approach: The partial repair uses return f"bytes */{length}" if length else "bytes */*", which still violates the stated contract.
Case contract
For known nonnegative complete length return bytes */length, including empty representations.
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(length):
return f"bytes 0-{length-1}/{length}"
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('content-range-unsatisfied-format fixture 0', solve(N), "bytes */"+str(N))
check('content-range-unsatisfied-format fixture 1', solve(0), "bytes */0")
check('content-range-unsatisfied-format fixture 2', solve(2*N), "bytes */"+str(2*N))
check('content-range-unsatisfied-format fixture 3', solve(1), "bytes */1")
check('content-range-unsatisfied-format fixture 4', solve(10), "bytes */10")
check('content-range-unsatisfied-format fixture 5', solve(100+N), "bytes */"+str(100+N))
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 |
|---|---|---|---|
| content-range-unsatisfied-format fixture 0 | bytes 0-0/1 | bytes */1 | Failed |
| content-range-unsatisfied-format fixture 1 | bytes 0--1/0 | bytes */0 | Failed |
| content-range-unsatisfied-format fixture 2 | bytes 0-1/2 | bytes */2 | Failed |
| content-range-unsatisfied-format fixture 3 | bytes 0-0/1 | bytes */1 | Failed |
| content-range-unsatisfied-format fixture 4 | bytes 0-9/10 | bytes */10 | Failed |
| content-range-unsatisfied-format fixture 5 | bytes 0-100/101 | bytes */101 | Failed |
SHA-256 / 2af1e6a540ddee8b0ea66fe20bd0774dfbf2b172c332c40b7cfe02b75b5512d3
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(length):
return f"bytes */{length}" if length else "bytes */*"
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('content-range-unsatisfied-format fixture 0', solve(N), "bytes */"+str(N))
check('content-range-unsatisfied-format fixture 1', solve(0), "bytes */0")
check('content-range-unsatisfied-format fixture 2', solve(2*N), "bytes */"+str(2*N))
check('content-range-unsatisfied-format fixture 3', solve(1), "bytes */1")
check('content-range-unsatisfied-format fixture 4', solve(10), "bytes */10")
check('content-range-unsatisfied-format fixture 5', solve(100+N), "bytes */"+str(100+N))
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 |
|---|---|---|---|
| content-range-unsatisfied-format fixture 0 | bytes */1 | bytes */1 | Passed |
| content-range-unsatisfied-format fixture 1 | bytes */* | bytes */0 | Failed |
| content-range-unsatisfied-format fixture 2 | bytes */2 | bytes */2 | Passed |
| content-range-unsatisfied-format fixture 3 | bytes */1 | bytes */1 | Passed |
| content-range-unsatisfied-format fixture 4 | bytes */10 | bytes */10 | Passed |
| content-range-unsatisfied-format fixture 5 | bytes */101 | bytes */101 | Passed |
SHA-256 / c57bc500357cb042472715763ac139a1b39e77b05513962973b3e6051ff81cfe
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(length):
return f"bytes */{length}"
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('content-range-unsatisfied-format fixture 0', solve(N), "bytes */"+str(N))
check('content-range-unsatisfied-format fixture 1', solve(0), "bytes */0")
check('content-range-unsatisfied-format fixture 2', solve(2*N), "bytes */"+str(2*N))
check('content-range-unsatisfied-format fixture 3', solve(1), "bytes */1")
check('content-range-unsatisfied-format fixture 4', solve(10), "bytes */10")
check('content-range-unsatisfied-format fixture 5', solve(100+N), "bytes */"+str(100+N))
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 |
|---|---|---|---|
| content-range-unsatisfied-format fixture 0 | bytes */1 | bytes */1 | Passed |
| content-range-unsatisfied-format fixture 1 | bytes */0 | bytes */0 | Passed |
| content-range-unsatisfied-format fixture 2 | bytes */2 | bytes */2 | Passed |
| content-range-unsatisfied-format fixture 3 | bytes */1 | bytes */1 | Passed |
| content-range-unsatisfied-format fixture 4 | bytes */10 | bytes */10 | Passed |
| content-range-unsatisfied-format fixture 5 | bytes */101 | bytes */101 | Passed |
SHA-256 / 2ec8e1a858f264ba5b37afbc147e792d0830ae96f00e8a862680e682dad11991
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:18.259825+00:00.
Case digest / 412b8b1bb29d4d81cae1f3981294526044ba190d25a1dbaf8673038c25a5fc8e