FAILURE MAP
← Case archive

FA-26741 / HTTP ranges / Open access

A full fallback response replaces an existing download prefix · case 01

A full fallback response replaces an existing download prefix.

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

ROOT CAUSE

The resume-full-response-truncate decision uses return prefix+body.

VERIFIED REPAIR

Apply the bounded decision exactly: return body if status==200 else (prefix+body if status==206 else prefix)

Unsuccessful approach: The partial repair uses return body if status==200 else prefix+body, which still violates the stated contract.

Case contract

For status200 replace prefix with full body; for206 append already validated continuation body. Other statuses preserve prefix.

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(status, prefix, body):
    return prefix+body
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('resume-full-response-truncate fixture 0', solve(200,"old"*N,"new"*N), "new"*N)
check('resume-full-response-truncate fixture 1', solve(416,"old","error"), "old")
check('resume-full-response-truncate fixture 2', solve(206,"a"*N,"b"*N), "a"*N+"b"*N)
check('resume-full-response-truncate fixture 3', solve(200,"old",""), "")
check('resume-full-response-truncate fixture 4', solve(500,"old","error"), "old")
check('resume-full-response-truncate fixture 5', solve(206,"","x"), "x")
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
resume-full-response-truncate fixture 0oldnewnewFailed
resume-full-response-truncate fixture 1olderroroldFailed
resume-full-response-truncate fixture 2ababPassed
resume-full-response-truncate fixture 3oldFailed
resume-full-response-truncate fixture 4olderroroldFailed
resume-full-response-truncate fixture 5xxPassed

SHA-256 / 4bca5d2eff927ecd6d23aad2c8c2f3c4095c97d7e0cb2cf75fe622b5203be646

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(status, prefix, body):
    return body if status==200 else prefix+body
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('resume-full-response-truncate fixture 0', solve(200,"old"*N,"new"*N), "new"*N)
check('resume-full-response-truncate fixture 1', solve(416,"old","error"), "old")
check('resume-full-response-truncate fixture 2', solve(206,"a"*N,"b"*N), "a"*N+"b"*N)
check('resume-full-response-truncate fixture 3', solve(200,"old",""), "")
check('resume-full-response-truncate fixture 4', solve(500,"old","error"), "old")
check('resume-full-response-truncate fixture 5', solve(206,"","x"), "x")
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
resume-full-response-truncate fixture 0newnewPassed
resume-full-response-truncate fixture 1olderroroldFailed
resume-full-response-truncate fixture 2ababPassed
resume-full-response-truncate fixture 3Passed
resume-full-response-truncate fixture 4olderroroldFailed
resume-full-response-truncate fixture 5xxPassed

SHA-256 / 98932674584cedfa65991c63a9bf32307cb7636fd91c37fb3b717612f0ab39e7

3 / The verified repair

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

N = 1
observations = []
def solve(status, prefix, body):
    return body if status==200 else (prefix+body if status==206 else prefix)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('resume-full-response-truncate fixture 0', solve(200,"old"*N,"new"*N), "new"*N)
check('resume-full-response-truncate fixture 1', solve(416,"old","error"), "old")
check('resume-full-response-truncate fixture 2', solve(206,"a"*N,"b"*N), "a"*N+"b"*N)
check('resume-full-response-truncate fixture 3', solve(200,"old",""), "")
check('resume-full-response-truncate fixture 4', solve(500,"old","error"), "old")
check('resume-full-response-truncate fixture 5', solve(206,"","x"), "x")
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
resume-full-response-truncate fixture 0newnewPassed
resume-full-response-truncate fixture 1oldoldPassed
resume-full-response-truncate fixture 2ababPassed
resume-full-response-truncate fixture 3Passed
resume-full-response-truncate fixture 4oldoldPassed
resume-full-response-truncate fixture 5xxPassed

SHA-256 / 75097f00bc8f076ed04d13907ef18f1579e51b16bbeb8de2b06fee33bfff1103

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

Case digest / e8e7f662501bf9436bea390eeddfe29065e25a6e45388b9ed49455aca2fd5ef4