FAILURE MAP
← Case archive

FA-26761 / HTTP ranges / Open access

Out-of-order downloaded ranges write at their absolute positions · case 01

Out-of-order downloaded ranges write at their absolute positions.

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

ROOT CAUSE

The resume-file-offset-write decision uses return base+part.

VERIFIED REPAIR

Apply the bounded decision exactly: return base[:offset]+part+base[offset+len(part):]

Unsuccessful approach: The partial repair uses return base[:offset]+part+base[offset:], which still violates the stated contract.

Case contract

ASCII base is a preallocated buffer; offset and part fit within it. Replace that exact span without inserting or appending.

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(base, offset, part):
    return base+part
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('resume-file-offset-write fixture 0', solve("."*(N+3),N,"AB"), "."*N+"AB.")
check('resume-file-offset-write fixture 1', solve("....",0,"AB"), "AB..")
check('resume-file-offset-write fixture 2', solve("....",2,"AB"), "..AB")
check('resume-file-offset-write fixture 3', solve("abc",1,""), "abc")
check('resume-file-offset-write fixture 4', solve("abc",0,"XYZ"), "XYZ")
check('resume-file-offset-write fixture 5', solve("abc",1,"Z"), "aZc")
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-file-offset-write fixture 0....AB.AB.Failed
resume-file-offset-write fixture 1....ABAB..Failed
resume-file-offset-write fixture 2....AB..ABFailed
resume-file-offset-write fixture 3abcabcPassed
resume-file-offset-write fixture 4abcXYZXYZFailed
resume-file-offset-write fixture 5abcZaZcFailed

SHA-256 / e9bf2e59d4601f530369cb86f70d8e63fd49defa5017ed1c305f35f865edae9e

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(base, offset, part):
    return base[:offset]+part+base[offset:]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('resume-file-offset-write fixture 0', solve("."*(N+3),N,"AB"), "."*N+"AB.")
check('resume-file-offset-write fixture 1', solve("....",0,"AB"), "AB..")
check('resume-file-offset-write fixture 2', solve("....",2,"AB"), "..AB")
check('resume-file-offset-write fixture 3', solve("abc",1,""), "abc")
check('resume-file-offset-write fixture 4', solve("abc",0,"XYZ"), "XYZ")
check('resume-file-offset-write fixture 5', solve("abc",1,"Z"), "aZc")
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-file-offset-write fixture 0.AB....AB.Failed
resume-file-offset-write fixture 1AB....AB..Failed
resume-file-offset-write fixture 2..AB....ABFailed
resume-file-offset-write fixture 3abcabcPassed
resume-file-offset-write fixture 4XYZabcXYZFailed
resume-file-offset-write fixture 5aZbcaZcFailed

SHA-256 / 495561ffb801590397b7ca33a8c7548fdcbeadfd430dac846820711061ed4c32

3 / The verified repair

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

N = 1
observations = []
def solve(base, offset, part):
    return base[:offset]+part+base[offset+len(part):]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('resume-file-offset-write fixture 0', solve("."*(N+3),N,"AB"), "."*N+"AB.")
check('resume-file-offset-write fixture 1', solve("....",0,"AB"), "AB..")
check('resume-file-offset-write fixture 2', solve("....",2,"AB"), "..AB")
check('resume-file-offset-write fixture 3', solve("abc",1,""), "abc")
check('resume-file-offset-write fixture 4', solve("abc",0,"XYZ"), "XYZ")
check('resume-file-offset-write fixture 5', solve("abc",1,"Z"), "aZc")
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-file-offset-write fixture 0.AB..AB.Passed
resume-file-offset-write fixture 1AB..AB..Passed
resume-file-offset-write fixture 2..AB..ABPassed
resume-file-offset-write fixture 3abcabcPassed
resume-file-offset-write fixture 4XYZXYZPassed
resume-file-offset-write fixture 5aZcaZcPassed

SHA-256 / 42caf1d0fa187ef324a44d84963ec8e691661366f3032376632ebc738dfe2a00

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

Case digest / ebdac3c296fcc80a0221bf277c821e1b6476f208d9b565aea4fac3cf2c416b43