FAILURE MAP
← Case archive

FA-27941 / HTTP redirects / Open access

Prepare a redirect replay from a bounded upload cursor: rewind origin · case 01

Replay rewinds to the stream origin instead of the request segment origin.

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

ROOT CAUSE

The rewind-origin decision uses '0 if preserved else cursor'; this violates the stipulated controller policy.

VERIFIED REPAIR

At this decision use 'start if preserved else cursor', preserving the other controller outputs.

Unsuccessful approach: The partial repair uses 'cursor' and still fails an explicit boundary or control.

Case contract

Prepare a redirect replay from a bounded upload cursor. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.

Why this case matters

Models a redirect controller decision before following a target or exposing a redirect result.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, cursor, start, length, seekable, consumed, preserved):
    return {'request': request, 'decision': [0 if preserved else cursor, max(0, length - (cursor-start)), preserved and consumed and not seekable, length if preserved else 0, preserved and seekable and cursor != start]} 
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 7, 3, 10, True, True, True), {'request': '/requests/' + str(N) + '/0', 'decision': [3, 6, False, 10, True]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 3, 3, 10, True, False, True), {'request': '/requests/' + str(N) + '/1', 'decision': [3, 10, False, 10, False]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 5, 3, 10, False, True, True), {'request': '/requests/' + str(N) + '/2', 'decision': [3, 8, True, 10, False]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 3, 3, 10, False, False, True), {'request': '/requests/' + str(N) + '/3', 'decision': [3, 10, False, 10, False]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 5, 3, 10, False, True, False), {'request': '/requests/' + str(N) + '/4', 'decision': [5, 8, False, 0, False]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 5, 3, 10, True, True, False), {'request': '/requests/' + str(N) + '/5', 'decision': [5, 8, False, 0, False]})
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
fixture 1{'decision': [0, 6, False, 10, True], 'request': '/requests/1/0'}{'decision': [3, 6, False, 10, True], 'request': '/requests/1/0'}Failed
fixture 2{'decision': [0, 10, False, 10, False], 'request': '/requests/1/1'}{'decision': [3, 10, False, 10, False], 'request': '/requests/1/1'}Failed
fixture 3{'decision': [0, 8, True, 10, False], 'request': '/requests/1/2'}{'decision': [3, 8, True, 10, False], 'request': '/requests/1/2'}Failed
fixture 4{'decision': [0, 10, False, 10, False], 'request': '/requests/1/3'}{'decision': [3, 10, False, 10, False], 'request': '/requests/1/3'}Failed
fixture 5{'decision': [5, 8, False, 0, False], 'request': '/requests/1/4'}{'decision': [5, 8, False, 0, False], 'request': '/requests/1/4'}Passed
fixture 6{'decision': [5, 8, False, 0, False], 'request': '/requests/1/5'}{'decision': [5, 8, False, 0, False], 'request': '/requests/1/5'}Passed

SHA-256 / 9b8cb9bf3f034aa5f0b944721d8230981407a1ad40614993823ec6a0dfbd031f

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, cursor, start, length, seekable, consumed, preserved):
    return {'request': request, 'decision': [cursor, max(0, length - (cursor-start)), preserved and consumed and not seekable, length if preserved else 0, preserved and seekable and cursor != start]} 
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 7, 3, 10, True, True, True), {'request': '/requests/' + str(N) + '/0', 'decision': [3, 6, False, 10, True]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 3, 3, 10, True, False, True), {'request': '/requests/' + str(N) + '/1', 'decision': [3, 10, False, 10, False]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 5, 3, 10, False, True, True), {'request': '/requests/' + str(N) + '/2', 'decision': [3, 8, True, 10, False]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 3, 3, 10, False, False, True), {'request': '/requests/' + str(N) + '/3', 'decision': [3, 10, False, 10, False]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 5, 3, 10, False, True, False), {'request': '/requests/' + str(N) + '/4', 'decision': [5, 8, False, 0, False]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 5, 3, 10, True, True, False), {'request': '/requests/' + str(N) + '/5', 'decision': [5, 8, False, 0, False]})
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
fixture 1{'decision': [7, 6, False, 10, True], 'request': '/requests/1/0'}{'decision': [3, 6, False, 10, True], 'request': '/requests/1/0'}Failed
fixture 2{'decision': [3, 10, False, 10, False], 'request': '/requests/1/1'}{'decision': [3, 10, False, 10, False], 'request': '/requests/1/1'}Passed
fixture 3{'decision': [5, 8, True, 10, False], 'request': '/requests/1/2'}{'decision': [3, 8, True, 10, False], 'request': '/requests/1/2'}Failed
fixture 4{'decision': [3, 10, False, 10, False], 'request': '/requests/1/3'}{'decision': [3, 10, False, 10, False], 'request': '/requests/1/3'}Passed
fixture 5{'decision': [5, 8, False, 0, False], 'request': '/requests/1/4'}{'decision': [5, 8, False, 0, False], 'request': '/requests/1/4'}Passed
fixture 6{'decision': [5, 8, False, 0, False], 'request': '/requests/1/5'}{'decision': [5, 8, False, 0, False], 'request': '/requests/1/5'}Passed

SHA-256 / 3617795228b52bc394f10b91d86b67194291142ee7278d46e9b203e4599a8656

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, cursor, start, length, seekable, consumed, preserved):
    return {'request': request, 'decision': [start if preserved else cursor, max(0, length - (cursor-start)), preserved and consumed and not seekable, length if preserved else 0, preserved and seekable and cursor != start]} 
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 7, 3, 10, True, True, True), {'request': '/requests/' + str(N) + '/0', 'decision': [3, 6, False, 10, True]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 3, 3, 10, True, False, True), {'request': '/requests/' + str(N) + '/1', 'decision': [3, 10, False, 10, False]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 5, 3, 10, False, True, True), {'request': '/requests/' + str(N) + '/2', 'decision': [3, 8, True, 10, False]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 3, 3, 10, False, False, True), {'request': '/requests/' + str(N) + '/3', 'decision': [3, 10, False, 10, False]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 5, 3, 10, False, True, False), {'request': '/requests/' + str(N) + '/4', 'decision': [5, 8, False, 0, False]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 5, 3, 10, True, True, False), {'request': '/requests/' + str(N) + '/5', 'decision': [5, 8, False, 0, False]})
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
fixture 1{'decision': [3, 6, False, 10, True], 'request': '/requests/1/0'}{'decision': [3, 6, False, 10, True], 'request': '/requests/1/0'}Passed
fixture 2{'decision': [3, 10, False, 10, False], 'request': '/requests/1/1'}{'decision': [3, 10, False, 10, False], 'request': '/requests/1/1'}Passed
fixture 3{'decision': [3, 8, True, 10, False], 'request': '/requests/1/2'}{'decision': [3, 8, True, 10, False], 'request': '/requests/1/2'}Passed
fixture 4{'decision': [3, 10, False, 10, False], 'request': '/requests/1/3'}{'decision': [3, 10, False, 10, False], 'request': '/requests/1/3'}Passed
fixture 5{'decision': [5, 8, False, 0, False], 'request': '/requests/1/4'}{'decision': [5, 8, False, 0, False], 'request': '/requests/1/4'}Passed
fixture 6{'decision': [5, 8, False, 0, False], 'request': '/requests/1/5'}{'decision': [5, 8, False, 0, False], 'request': '/requests/1/5'}Passed

SHA-256 / 83c767976cc0a58c7b5e688da43055008476012af749cff0ba0bfe079508f9b3

Verification & scope

Stipulated offline redirect policy, not a complete HTTP, browser, URL, cache, or security implementation. Numbered variants vary request correlation identity. 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:29.543562+00:00.

Case digest / 1bc7a7e5544ffb5535f54e363af09f40e204ee18ea1e5ebe70ef076a69f2bbe4