FA-26561 / HTTP ranges / Open access
EOF before the promised range length marks the stream truncated · case 01
EOF before the promised range length marks the stream truncated.
ROOT CAUSE
The stream-premature-eof-state decision uses return "complete" if eof else "reading".
THE FAILURE
The stream-premature-eof-state decision uses return "complete" if eof else "reading".
Unsuccessful approach: The partial repair uses return "truncated" if eof else ("complete" if remaining==0 else "reading"), which still violates the stated contract.
Case contract
Return truncated for EOF with remaining>0, complete for zero remaining, otherwise reading.
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(remaining, eof):
return "complete" if eof else "reading"
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('stream-premature-eof-state fixture 0', solve(N,True), "truncated")
check('stream-premature-eof-state fixture 1', solve(0,True), "complete")
check('stream-premature-eof-state fixture 2', solve(0,False), "complete")
check('stream-premature-eof-state fixture 3', solve(N,False), "reading")
check('stream-premature-eof-state fixture 4', solve(2*N,True), "truncated")
check('stream-premature-eof-state fixture 5', solve(2*N,False), "reading")
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-premature-eof-state fixture 0 | complete | truncated | Failed |
| stream-premature-eof-state fixture 1 | complete | complete | Passed |
| stream-premature-eof-state fixture 2 | reading | complete | Failed |
| stream-premature-eof-state fixture 3 | reading | reading | Passed |
| stream-premature-eof-state fixture 4 | complete | truncated | Failed |
| stream-premature-eof-state fixture 5 | reading | reading | Passed |
SHA-256 / bcbf5c6795932cb35ac7c86c2e28083061eb4ecb59c94d389fa974ceca3901b5
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(remaining, eof):
return "truncated" if eof else ("complete" if remaining==0 else "reading")
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('stream-premature-eof-state fixture 0', solve(N,True), "truncated")
check('stream-premature-eof-state fixture 1', solve(0,True), "complete")
check('stream-premature-eof-state fixture 2', solve(0,False), "complete")
check('stream-premature-eof-state fixture 3', solve(N,False), "reading")
check('stream-premature-eof-state fixture 4', solve(2*N,True), "truncated")
check('stream-premature-eof-state fixture 5', solve(2*N,False), "reading")
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-premature-eof-state fixture 0 | truncated | truncated | Passed |
| stream-premature-eof-state fixture 1 | truncated | complete | Failed |
| stream-premature-eof-state fixture 2 | complete | complete | Passed |
| stream-premature-eof-state fixture 3 | reading | reading | Passed |
| stream-premature-eof-state fixture 4 | truncated | truncated | Passed |
| stream-premature-eof-state fixture 5 | reading | reading | Passed |
SHA-256 / e3ed26507c5f5c8db065f23455b9f196a081cf5c3c9511195cba0d513a3c4efb
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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.071614+00:00.
Case digest / 546fc73a63c2216deb1cfd6018b7f7d31c484dc46f3e23e2f908bd9d90fb65f3