FA-26411 / HTTP ranges / Open access
Range negotiation preserves preexisting Vary dimensions · case 01
Range negotiation preserves preexisting Vary dimensions.
ROOT CAUSE
The variant-vary-union decision uses return ["accept-encoding"] if selected_by_encoding else vary.
VERIFIED REPAIR
Apply the bounded decision exactly: return sorted(set(vary+(["accept-encoding"] if selected_by_encoding else [])))
Unsuccessful approach: The partial repair uses return sorted(vary+["accept-encoding"]) if selected_by_encoding else sorted(vary), which still violates the stated contract.
Case contract
Return sorted unique Vary names, adding accept-encoding when negotiated by encoding. Existing names are already lowercase.
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(vary, selected_by_encoding):
return ["accept-encoding"] if selected_by_encoding else vary
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('variant-vary-union fixture 0', solve( ["accept-language"],True), ["accept-encoding","accept-language"])
check('variant-vary-union fixture 1', solve(["accept-encoding"],True), ["accept-encoding"])
check('variant-vary-union fixture 2', solve([],True), ["accept-encoding"])
check('variant-vary-union fixture 3', solve([],False), [])
check('variant-vary-union fixture 4', solve(["x-"+str(N)],False), ["x-"+str(N)])
check('variant-vary-union fixture 5', solve(["accept-language","accept-language"],False), ["accept-language"])
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 |
|---|---|---|---|
| variant-vary-union fixture 0 | ['accept-encoding'] | ['accept-encoding', 'accept-language'] | Failed |
| variant-vary-union fixture 1 | ['accept-encoding'] | ['accept-encoding'] | Passed |
| variant-vary-union fixture 2 | ['accept-encoding'] | ['accept-encoding'] | Passed |
| variant-vary-union fixture 3 | [] | [] | Passed |
| variant-vary-union fixture 4 | ['x-1'] | ['x-1'] | Passed |
| variant-vary-union fixture 5 | ['accept-language', 'accept-language'] | ['accept-language'] | Failed |
SHA-256 / 509ac6f44a4ae478665af300b6feeb3ae9c7dee7a3b3eb45562ba1d059c03d73
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(vary, selected_by_encoding):
return sorted(vary+["accept-encoding"]) if selected_by_encoding else sorted(vary)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('variant-vary-union fixture 0', solve( ["accept-language"],True), ["accept-encoding","accept-language"])
check('variant-vary-union fixture 1', solve(["accept-encoding"],True), ["accept-encoding"])
check('variant-vary-union fixture 2', solve([],True), ["accept-encoding"])
check('variant-vary-union fixture 3', solve([],False), [])
check('variant-vary-union fixture 4', solve(["x-"+str(N)],False), ["x-"+str(N)])
check('variant-vary-union fixture 5', solve(["accept-language","accept-language"],False), ["accept-language"])
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 |
|---|---|---|---|
| variant-vary-union fixture 0 | ['accept-encoding', 'accept-language'] | ['accept-encoding', 'accept-language'] | Passed |
| variant-vary-union fixture 1 | ['accept-encoding', 'accept-encoding'] | ['accept-encoding'] | Failed |
| variant-vary-union fixture 2 | ['accept-encoding'] | ['accept-encoding'] | Passed |
| variant-vary-union fixture 3 | [] | [] | Passed |
| variant-vary-union fixture 4 | ['x-1'] | ['x-1'] | Passed |
| variant-vary-union fixture 5 | ['accept-language', 'accept-language'] | ['accept-language'] | Failed |
SHA-256 / 5423fbda7b286d8bc6b27c550ebb8f6b28b10e33f1c5bf5b75362b1c5824d0d1
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(vary, selected_by_encoding):
return sorted(set(vary+(["accept-encoding"] if selected_by_encoding else [])))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('variant-vary-union fixture 0', solve( ["accept-language"],True), ["accept-encoding","accept-language"])
check('variant-vary-union fixture 1', solve(["accept-encoding"],True), ["accept-encoding"])
check('variant-vary-union fixture 2', solve([],True), ["accept-encoding"])
check('variant-vary-union fixture 3', solve([],False), [])
check('variant-vary-union fixture 4', solve(["x-"+str(N)],False), ["x-"+str(N)])
check('variant-vary-union fixture 5', solve(["accept-language","accept-language"],False), ["accept-language"])
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 |
|---|---|---|---|
| variant-vary-union fixture 0 | ['accept-encoding', 'accept-language'] | ['accept-encoding', 'accept-language'] | Passed |
| variant-vary-union fixture 1 | ['accept-encoding'] | ['accept-encoding'] | Passed |
| variant-vary-union fixture 2 | ['accept-encoding'] | ['accept-encoding'] | Passed |
| variant-vary-union fixture 3 | [] | [] | Passed |
| variant-vary-union fixture 4 | ['x-1'] | ['x-1'] | Passed |
| variant-vary-union fixture 5 | ['accept-language'] | ['accept-language'] | Passed |
SHA-256 / 4b01da1800e1c18b4b23acf0f9e20b3468f55e0574d29b5ddad599da7aaf3836
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.694413+00:00.
Case digest / d046a6ccba26cee115859bdb5d48f5197194808d2c465571297632f1dfc74359