FA-6691 / HTTP ranges / Open access
A suffix range is bounded by representation length and excludes zero suffixes · case 01
A suffix range is bounded by representation length and excludes zero suffixes.
ROOT CAUSE
The faulty implementation uses `(length-suffix,length-1)` for the range-suffix decision.
VERIFIED REPAIR
Apply the explicit range-suffix contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `(max(0,length-suffix),length-1) if length else None` and still violates a separate fixture.
Case contract
A suffix range is bounded by representation length and excludes zero suffixes: return the result specified by the explicit input/output boundary fixtures.
Why this case matters
This deterministic http ranges model isolates the range-suffix 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(suffix, length):
return (length-suffix,length-1)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(8, 5), (0, 4))", "check('fixture 2', solve(0, 5), None)", "check('fixture 3', solve(2, 5), (3, 4))", "check('fixture 4', solve(2, 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 2 | [5, 4] | None | Failed |
| fixture 3 | [3, 4] | [3, 4] | Passed |
| fixture 4 | [-2, -1] | None | Failed |
| fixture 1 | [-3, 4] | [0, 4] | Failed |
SHA-256 / 4cc9d170749dabdfce9fcf4bcd13dd0eb71398c61570efa75a6c33203d56d2a2
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(suffix, length):
return (max(0,length-suffix),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(8, 5), (0, 4))", "check('fixture 2', solve(0, 5), None)", "check('fixture 3', solve(2, 5), (3, 4))", "check('fixture 4', solve(2, 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 2 | [5, 4] | None | Failed |
| fixture 3 | [3, 4] | [3, 4] | Passed |
| fixture 4 | None | None | Passed |
| fixture 1 | [0, 4] | [0, 4] | Passed |
SHA-256 / d245843bcea8756ea08e6ced2959eb4d0e7150712b3e3051ae470abdb12c0981
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(suffix, length):
return (max(0,length-suffix),length-1) if suffix > 0 and length > 0 else None
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(8, 5), (0, 4))", "check('fixture 2', solve(0, 5), None)", "check('fixture 3', solve(2, 5), (3, 4))", "check('fixture 4', solve(2, 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 2 | None | None | Passed |
| fixture 3 | [3, 4] | [3, 4] | Passed |
| fixture 4 | None | None | Passed |
| fixture 1 | [0, 4] | [0, 4] | Passed |
SHA-256 / faab400fc10036e0af16f473df9b683fb7c461be5aeda129149c240f94ecd5bf
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.342814+00:00.
Case digest / 7f2872c0001ecbcc315c15b6a3d7be479fa47194b901dd281432cd090a00cc03