FA-26611 / HTTP ranges / Open access
Download accounting counts accepted payload bytes instead of attempted bytes · case 01
Download accounting counts accepted payload bytes instead of attempted bytes.
ROOT CAUSE
The stream-delivery-count-accepted decision uses return sum(a for a,b in writes).
VERIFIED REPAIR
Apply the bounded decision exactly: return sum(b for a,b in writes)
Unsuccessful approach: The partial repair uses return sum(b for a,b in writes if b==a), which still violates the stated contract.
Case contract
writes are [attempted,accepted] payload counts, 0<=accepted<=attempted. Return delivered count.
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(writes):
return sum(a for a,b in writes)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('stream-delivery-count-accepted fixture 0', solve([[3*N,N]]), N)
check('stream-delivery-count-accepted fixture 1', solve([[N,0],[N,N]]), N)
check('stream-delivery-count-accepted fixture 2', solve([]), 0)
check('stream-delivery-count-accepted fixture 3', solve([[N,N]]), N)
check('stream-delivery-count-accepted fixture 4', solve([[0,0]]), 0)
check('stream-delivery-count-accepted fixture 5', solve([[4*N,N],[2*N,N]]), 2*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 |
|---|---|---|---|
| stream-delivery-count-accepted fixture 0 | 3 | 1 | Failed |
| stream-delivery-count-accepted fixture 1 | 2 | 1 | Failed |
| stream-delivery-count-accepted fixture 2 | 0 | 0 | Passed |
| stream-delivery-count-accepted fixture 3 | 1 | 1 | Passed |
| stream-delivery-count-accepted fixture 4 | 0 | 0 | Passed |
| stream-delivery-count-accepted fixture 5 | 6 | 2 | Failed |
SHA-256 / 8f64c7a1e191026ba44015c40bc16953441ad587f953bc3b23d840f0e64eb321
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(writes):
return sum(b for a,b in writes if b==a)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('stream-delivery-count-accepted fixture 0', solve([[3*N,N]]), N)
check('stream-delivery-count-accepted fixture 1', solve([[N,0],[N,N]]), N)
check('stream-delivery-count-accepted fixture 2', solve([]), 0)
check('stream-delivery-count-accepted fixture 3', solve([[N,N]]), N)
check('stream-delivery-count-accepted fixture 4', solve([[0,0]]), 0)
check('stream-delivery-count-accepted fixture 5', solve([[4*N,N],[2*N,N]]), 2*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 |
|---|---|---|---|
| stream-delivery-count-accepted fixture 0 | 0 | 1 | Failed |
| stream-delivery-count-accepted fixture 1 | 1 | 1 | Passed |
| stream-delivery-count-accepted fixture 2 | 0 | 0 | Passed |
| stream-delivery-count-accepted fixture 3 | 1 | 1 | Passed |
| stream-delivery-count-accepted fixture 4 | 0 | 0 | Passed |
| stream-delivery-count-accepted fixture 5 | 0 | 2 | Failed |
SHA-256 / b858fe69f704fe1c5f1be49e6d00cebea5f3a4df84b99915fe39d819ef002c1e
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(writes):
return sum(b for a,b in writes)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('stream-delivery-count-accepted fixture 0', solve([[3*N,N]]), N)
check('stream-delivery-count-accepted fixture 1', solve([[N,0],[N,N]]), N)
check('stream-delivery-count-accepted fixture 2', solve([]), 0)
check('stream-delivery-count-accepted fixture 3', solve([[N,N]]), N)
check('stream-delivery-count-accepted fixture 4', solve([[0,0]]), 0)
check('stream-delivery-count-accepted fixture 5', solve([[4*N,N],[2*N,N]]), 2*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 |
|---|---|---|---|
| stream-delivery-count-accepted fixture 0 | 1 | 1 | Passed |
| stream-delivery-count-accepted fixture 1 | 1 | 1 | Passed |
| stream-delivery-count-accepted fixture 2 | 0 | 0 | Passed |
| stream-delivery-count-accepted fixture 3 | 1 | 1 | Passed |
| stream-delivery-count-accepted fixture 4 | 0 | 0 | Passed |
| stream-delivery-count-accepted fixture 5 | 2 | 2 | Passed |
SHA-256 / 856b0b8b464e01f483cf1356d788d3f89a304c8661e031f9c3f14385f8ede16c
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:17.535435+00:00.
Case digest / fd323f15f8ac5d465f58ed380e8016a3c8b73c45a0c6491d9c3fd6413ebc45a6