FAILURE MAP
← Case archive

FA-26591 / HTTP ranges / Open access

Integrity trailers are emitted only after all promised bytes arrive · case 01

Integrity trailers are emitted only after all promised bytes arrive.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The stream-trailer-after-completion decision uses return digest.

VERIFIED REPAIR

Apply the bounded decision exactly: return digest if remaining==0 and not aborted else None

Unsuccessful approach: The partial repair uses return digest if remaining==0 else None, which still violates the stated contract.

Case contract

Return digest only after nonaborted completion, None while incomplete or aborted.

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, aborted, digest):
    return digest
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('stream-trailer-after-completion fixture 0', solve(N,False,"d"+str(N)), None)
check('stream-trailer-after-completion fixture 1', solve(0,True,"d"), None)
check('stream-trailer-after-completion fixture 2', solve(0,False,"d"+str(N)), "d"+str(N))
check('stream-trailer-after-completion fixture 3', solve(N,True,"d"), None)
check('stream-trailer-after-completion fixture 4', solve(0,False,""), "")
check('stream-trailer-after-completion fixture 5', solve(0,True,""), None)
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 fixtureActualExpectedOutcome
stream-trailer-after-completion fixture 0d1NoneFailed
stream-trailer-after-completion fixture 1dNoneFailed
stream-trailer-after-completion fixture 2d1d1Passed
stream-trailer-after-completion fixture 3dNoneFailed
stream-trailer-after-completion fixture 4Passed
stream-trailer-after-completion fixture 5NoneFailed

SHA-256 / 870addc418bc277bf976425eebedcaa603a64a62e2936d818c950beda1a5f318

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(remaining, aborted, digest):
    return digest if remaining==0 else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('stream-trailer-after-completion fixture 0', solve(N,False,"d"+str(N)), None)
check('stream-trailer-after-completion fixture 1', solve(0,True,"d"), None)
check('stream-trailer-after-completion fixture 2', solve(0,False,"d"+str(N)), "d"+str(N))
check('stream-trailer-after-completion fixture 3', solve(N,True,"d"), None)
check('stream-trailer-after-completion fixture 4', solve(0,False,""), "")
check('stream-trailer-after-completion fixture 5', solve(0,True,""), None)
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 fixtureActualExpectedOutcome
stream-trailer-after-completion fixture 0NoneNonePassed
stream-trailer-after-completion fixture 1dNoneFailed
stream-trailer-after-completion fixture 2d1d1Passed
stream-trailer-after-completion fixture 3NoneNonePassed
stream-trailer-after-completion fixture 4Passed
stream-trailer-after-completion fixture 5NoneFailed

SHA-256 / f22b5b77460e8c2cae97a106262025ac5e0654666adc6ac4201bd45bebd66e92

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(remaining, aborted, digest):
    return digest if remaining==0 and not aborted else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('stream-trailer-after-completion fixture 0', solve(N,False,"d"+str(N)), None)
check('stream-trailer-after-completion fixture 1', solve(0,True,"d"), None)
check('stream-trailer-after-completion fixture 2', solve(0,False,"d"+str(N)), "d"+str(N))
check('stream-trailer-after-completion fixture 3', solve(N,True,"d"), None)
check('stream-trailer-after-completion fixture 4', solve(0,False,""), "")
check('stream-trailer-after-completion fixture 5', solve(0,True,""), None)
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 fixtureActualExpectedOutcome
stream-trailer-after-completion fixture 0NoneNonePassed
stream-trailer-after-completion fixture 1NoneNonePassed
stream-trailer-after-completion fixture 2d1d1Passed
stream-trailer-after-completion fixture 3NoneNonePassed
stream-trailer-after-completion fixture 4Passed
stream-trailer-after-completion fixture 5NoneNonePassed

SHA-256 / 54365ecde61738dff5ddca6ddd5dda60ddfb9a6d30d8f810067afbd98d370c13

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.444662+00:00.

Case digest / eab8a272b3f68075e2ff0247c8379aa76ec1c203064a606f88bd13a0825143a8