FA-26341 / HTTP ranges / Open access
Failed write-independent preconditions precede range parsing · case 01
Failed write-independent preconditions precede range parsing.
ROOT CAUSE
The precondition-before-range decision uses return [400, ""] if not range_valid else ([206,body] if match_ok else [412,""]).
VERIFIED REPAIR
Apply the bounded decision exactly: return [412, ""] if not match_ok else ([206,body] if range_valid else [400,""])
Unsuccessful approach: The partial repair uses return [412, ""] if not match_ok and range_valid else ([206,body] if range_valid else [400,""]), which still violates the stated contract.
Case contract
Return [status,body]: failed If-Match is 412 before examining a malformed range; otherwise malformed range is 400 and valid range 206.
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(match_ok, range_valid, body):
return [400, ""] if not range_valid else ([206,body] if match_ok else [412,""])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('precondition-before-range fixture 0', solve(False,False,"x"*N), [412,""])
check('precondition-before-range fixture 1', solve(False,True,"x"*N), [412,""])
check('precondition-before-range fixture 2', solve(True,False,"x"*N), [400,""])
check('precondition-before-range fixture 3', solve(True,True,"x"*N), [206,"x"*N])
check('precondition-before-range fixture 4', solve(False,False,""), [412,""])
check('precondition-before-range fixture 5', solve(True,True,""), [206,""])
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 |
|---|---|---|---|
| precondition-before-range fixture 0 | [400, ''] | [412, ''] | Failed |
| precondition-before-range fixture 1 | [412, ''] | [412, ''] | Passed |
| precondition-before-range fixture 2 | [400, ''] | [400, ''] | Passed |
| precondition-before-range fixture 3 | [206, 'x'] | [206, 'x'] | Passed |
| precondition-before-range fixture 4 | [400, ''] | [412, ''] | Failed |
| precondition-before-range fixture 5 | [206, ''] | [206, ''] | Passed |
SHA-256 / fcc367f9371053c0729bd1c612b55912eea09774fa0b76873b49b181cb8eb301
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(match_ok, range_valid, body):
return [412, ""] if not match_ok and range_valid else ([206,body] if range_valid else [400,""])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('precondition-before-range fixture 0', solve(False,False,"x"*N), [412,""])
check('precondition-before-range fixture 1', solve(False,True,"x"*N), [412,""])
check('precondition-before-range fixture 2', solve(True,False,"x"*N), [400,""])
check('precondition-before-range fixture 3', solve(True,True,"x"*N), [206,"x"*N])
check('precondition-before-range fixture 4', solve(False,False,""), [412,""])
check('precondition-before-range fixture 5', solve(True,True,""), [206,""])
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 |
|---|---|---|---|
| precondition-before-range fixture 0 | [400, ''] | [412, ''] | Failed |
| precondition-before-range fixture 1 | [412, ''] | [412, ''] | Passed |
| precondition-before-range fixture 2 | [400, ''] | [400, ''] | Passed |
| precondition-before-range fixture 3 | [206, 'x'] | [206, 'x'] | Passed |
| precondition-before-range fixture 4 | [400, ''] | [412, ''] | Failed |
| precondition-before-range fixture 5 | [206, ''] | [206, ''] | Passed |
SHA-256 / 3568f196e71ab699764bfee1dcb37390926d74afefffc4c68322874c9b11a9f8
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(match_ok, range_valid, body):
return [412, ""] if not match_ok else ([206,body] if range_valid else [400,""])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('precondition-before-range fixture 0', solve(False,False,"x"*N), [412,""])
check('precondition-before-range fixture 1', solve(False,True,"x"*N), [412,""])
check('precondition-before-range fixture 2', solve(True,False,"x"*N), [400,""])
check('precondition-before-range fixture 3', solve(True,True,"x"*N), [206,"x"*N])
check('precondition-before-range fixture 4', solve(False,False,""), [412,""])
check('precondition-before-range fixture 5', solve(True,True,""), [206,""])
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 |
|---|---|---|---|
| precondition-before-range fixture 0 | [412, ''] | [412, ''] | Passed |
| precondition-before-range fixture 1 | [412, ''] | [412, ''] | Passed |
| precondition-before-range fixture 2 | [400, ''] | [400, ''] | Passed |
| precondition-before-range fixture 3 | [206, 'x'] | [206, 'x'] | Passed |
| precondition-before-range fixture 4 | [412, ''] | [412, ''] | Passed |
| precondition-before-range fixture 5 | [206, ''] | [206, ''] | Passed |
SHA-256 / b044c80862b522f38d42b82e129b3729a057716b8aa0fef281e51d95ac80c081
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.064262+00:00.
Case digest / 3ac50258bb0aa73c6d87674534f04751fe147a7fa6ed8fa1f1f25410cc9496b8