FA-27981 / HTTP redirects / Open access
Prepare upload metadata and handoff sequencing after a redirect decision: abort before dispatch · case 01
Dispatch races the cancellation of the obsolete upload source.
ROOT CAUSE
The abort-before-dispatch decision uses "['dispatch','abort-upload','clear-entity'] if drop else ['dispatch','rewind-upload']"; this violates the stipulated controller policy.
VERIFIED REPAIR
At this decision use "['abort-upload','clear-entity','dispatch'] if drop else ['rewind-upload','dispatch']", preserving the other controller outputs.
Unsuccessful approach: The partial repair uses "['clear-entity','dispatch'] if drop else ['rewind-upload','dispatch']" and still fails an explicit boundary or control.
Case contract
Prepare upload metadata and handoff sequencing after a redirect decision. 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, headers, drop, changed, boundary, next_boundary, size, method):
return {'request': request, 'decision': [{k:v for k,v in headers.items() if not(drop and k.lower() in ('content-length','content-type','transfer-encoding','expect','trailer'))}, next_boundary if changed else boundary, not drop and method not in ('GET','HEAD') and (size is None or size>0), ['dispatch','abort-upload','clear-entity'] if drop else ['dispatch','rewind-upload'], 'none' if drop else ('chunked' if size is None else 'length')]}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', {'Content-Length': '3', 'Content-Type': 'multipart', 'Transfer-Encoding': 'chunked', 'Expect': '100-continue', 'Trailer': 'X-Sum', 'X': 'keep'}, True, True, 'A', 'B', 3, 'GET'), {'request': '/requests/' + str(N) + '/0', 'decision': [{'X': 'keep'}, 'B', False, ['abort-upload', 'clear-entity', 'dispatch'], 'none']})
check('fixture 2', solve('/requests/' + str(N) + '/1', {'Content-Length': '3', 'Content-Type': 'multipart', 'Transfer-Encoding': 'chunked', 'Expect': '100-continue', 'Trailer': 'X-Sum', 'X': 'keep'}, False, False, 'A', 'B', 3, 'POST'), {'request': '/requests/' + str(N) + '/1', 'decision': [{'Content-Length': '3', 'Content-Type': 'multipart', 'Transfer-Encoding': 'chunked', 'Expect': '100-continue', 'Trailer': 'X-Sum', 'X': 'keep'}, 'A', True, ['rewind-upload', 'dispatch'], 'length']})
check('fixture 3', solve('/requests/' + str(N) + '/2', {}, False, True, 'B', 'C', None, 'PUT'), {'request': '/requests/' + str(N) + '/2', 'decision': [{}, 'C', True, ['rewind-upload', 'dispatch'], 'chunked']})
check('fixture 4', solve('/requests/' + str(N) + '/3', {}, False, False, 'B', 'C', 0, 'POST'), {'request': '/requests/' + str(N) + '/3', 'decision': [{}, 'B', False, ['rewind-upload', 'dispatch'], 'length']})
check('fixture 5', solve('/requests/' + str(N) + '/4', {'X': 'keep'}, False, False, 'B', 'C', 3, 'HEAD'), {'request': '/requests/' + str(N) + '/4', 'decision': [{'X': 'keep'}, 'B', False, ['rewind-upload', 'dispatch'], 'length']})
check('fixture 6', solve('/requests/' + str(N) + '/5', {}, True, False, 'X', 'Y', None, 'POST'), {'request': '/requests/' + str(N) + '/5', 'decision': [{}, 'X', False, ['abort-upload', 'clear-entity', 'dispatch'], '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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | {'decision': [{'X': 'keep'}, 'B', False, ['dispatch', 'abort-upload', 'clear-entity'], 'none'], 'request': '/requests/1/0'} | {'decision': [{'X': 'keep'}, 'B', False, ['abort-upload', 'clear-entity', 'dispatch'], 'none'], 'request': '/requests/1/0'} | Failed |
| fixture 2 | {'decision': [{'Content-Length': '3', 'Content-Type': 'multipart', 'Expect': '100-continue', 'Trailer': 'X-Sum', 'Transfer-Encoding': 'chunked', 'X': 'keep'}, 'A', True, ['dispatch', 'rewind-upload'], 'length'], 'request': '/requests/1/1'} | {'decision': [{'Content-Length': '3', 'Content-Type': 'multipart', 'Expect': '100-continue', 'Trailer': 'X-Sum', 'Transfer-Encoding': 'chunked', 'X': 'keep'}, 'A', True, ['rewind-upload', 'dispatch'], 'length'], 'request': '/requests/1/1'} | Failed |
| fixture 3 | {'decision': [{}, 'C', True, ['dispatch', 'rewind-upload'], 'chunked'], 'request': '/requests/1/2'} | {'decision': [{}, 'C', True, ['rewind-upload', 'dispatch'], 'chunked'], 'request': '/requests/1/2'} | Failed |
| fixture 4 | {'decision': [{}, 'B', False, ['dispatch', 'rewind-upload'], 'length'], 'request': '/requests/1/3'} | {'decision': [{}, 'B', False, ['rewind-upload', 'dispatch'], 'length'], 'request': '/requests/1/3'} | Failed |
| fixture 5 | {'decision': [{'X': 'keep'}, 'B', False, ['dispatch', 'rewind-upload'], 'length'], 'request': '/requests/1/4'} | {'decision': [{'X': 'keep'}, 'B', False, ['rewind-upload', 'dispatch'], 'length'], 'request': '/requests/1/4'} | Failed |
| fixture 6 | {'decision': [{}, 'X', False, ['dispatch', 'abort-upload', 'clear-entity'], 'none'], 'request': '/requests/1/5'} | {'decision': [{}, 'X', False, ['abort-upload', 'clear-entity', 'dispatch'], 'none'], 'request': '/requests/1/5'} | Failed |
SHA-256 / 2cbc1d66466d695cd8354c7d6891bdeebc9a6c0c53b837d719d0c672fbe860e3
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, headers, drop, changed, boundary, next_boundary, size, method):
return {'request': request, 'decision': [{k:v for k,v in headers.items() if not(drop and k.lower() in ('content-length','content-type','transfer-encoding','expect','trailer'))}, next_boundary if changed else boundary, not drop and method not in ('GET','HEAD') and (size is None or size>0), ['clear-entity','dispatch'] if drop else ['rewind-upload','dispatch'], 'none' if drop else ('chunked' if size is None else 'length')]}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', {'Content-Length': '3', 'Content-Type': 'multipart', 'Transfer-Encoding': 'chunked', 'Expect': '100-continue', 'Trailer': 'X-Sum', 'X': 'keep'}, True, True, 'A', 'B', 3, 'GET'), {'request': '/requests/' + str(N) + '/0', 'decision': [{'X': 'keep'}, 'B', False, ['abort-upload', 'clear-entity', 'dispatch'], 'none']})
check('fixture 2', solve('/requests/' + str(N) + '/1', {'Content-Length': '3', 'Content-Type': 'multipart', 'Transfer-Encoding': 'chunked', 'Expect': '100-continue', 'Trailer': 'X-Sum', 'X': 'keep'}, False, False, 'A', 'B', 3, 'POST'), {'request': '/requests/' + str(N) + '/1', 'decision': [{'Content-Length': '3', 'Content-Type': 'multipart', 'Transfer-Encoding': 'chunked', 'Expect': '100-continue', 'Trailer': 'X-Sum', 'X': 'keep'}, 'A', True, ['rewind-upload', 'dispatch'], 'length']})
check('fixture 3', solve('/requests/' + str(N) + '/2', {}, False, True, 'B', 'C', None, 'PUT'), {'request': '/requests/' + str(N) + '/2', 'decision': [{}, 'C', True, ['rewind-upload', 'dispatch'], 'chunked']})
check('fixture 4', solve('/requests/' + str(N) + '/3', {}, False, False, 'B', 'C', 0, 'POST'), {'request': '/requests/' + str(N) + '/3', 'decision': [{}, 'B', False, ['rewind-upload', 'dispatch'], 'length']})
check('fixture 5', solve('/requests/' + str(N) + '/4', {'X': 'keep'}, False, False, 'B', 'C', 3, 'HEAD'), {'request': '/requests/' + str(N) + '/4', 'decision': [{'X': 'keep'}, 'B', False, ['rewind-upload', 'dispatch'], 'length']})
check('fixture 6', solve('/requests/' + str(N) + '/5', {}, True, False, 'X', 'Y', None, 'POST'), {'request': '/requests/' + str(N) + '/5', 'decision': [{}, 'X', False, ['abort-upload', 'clear-entity', 'dispatch'], '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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | {'decision': [{'X': 'keep'}, 'B', False, ['clear-entity', 'dispatch'], 'none'], 'request': '/requests/1/0'} | {'decision': [{'X': 'keep'}, 'B', False, ['abort-upload', 'clear-entity', 'dispatch'], 'none'], 'request': '/requests/1/0'} | Failed |
| fixture 2 | {'decision': [{'Content-Length': '3', 'Content-Type': 'multipart', 'Expect': '100-continue', 'Trailer': 'X-Sum', 'Transfer-Encoding': 'chunked', 'X': 'keep'}, 'A', True, ['rewind-upload', 'dispatch'], 'length'], 'request': '/requests/1/1'} | {'decision': [{'Content-Length': '3', 'Content-Type': 'multipart', 'Expect': '100-continue', 'Trailer': 'X-Sum', 'Transfer-Encoding': 'chunked', 'X': 'keep'}, 'A', True, ['rewind-upload', 'dispatch'], 'length'], 'request': '/requests/1/1'} | Passed |
| fixture 3 | {'decision': [{}, 'C', True, ['rewind-upload', 'dispatch'], 'chunked'], 'request': '/requests/1/2'} | {'decision': [{}, 'C', True, ['rewind-upload', 'dispatch'], 'chunked'], 'request': '/requests/1/2'} | Passed |
| fixture 4 | {'decision': [{}, 'B', False, ['rewind-upload', 'dispatch'], 'length'], 'request': '/requests/1/3'} | {'decision': [{}, 'B', False, ['rewind-upload', 'dispatch'], 'length'], 'request': '/requests/1/3'} | Passed |
| fixture 5 | {'decision': [{'X': 'keep'}, 'B', False, ['rewind-upload', 'dispatch'], 'length'], 'request': '/requests/1/4'} | {'decision': [{'X': 'keep'}, 'B', False, ['rewind-upload', 'dispatch'], 'length'], 'request': '/requests/1/4'} | Passed |
| fixture 6 | {'decision': [{}, 'X', False, ['clear-entity', 'dispatch'], 'none'], 'request': '/requests/1/5'} | {'decision': [{}, 'X', False, ['abort-upload', 'clear-entity', 'dispatch'], 'none'], 'request': '/requests/1/5'} | Failed |
SHA-256 / 7703e5a811c2679f2baa85f01d1593cdf1aad3ae377c7404e3c6f2d206851335
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, headers, drop, changed, boundary, next_boundary, size, method):
return {'request': request, 'decision': [{k:v for k,v in headers.items() if not(drop and k.lower() in ('content-length','content-type','transfer-encoding','expect','trailer'))}, next_boundary if changed else boundary, not drop and method not in ('GET','HEAD') and (size is None or size>0), ['abort-upload','clear-entity','dispatch'] if drop else ['rewind-upload','dispatch'], 'none' if drop else ('chunked' if size is None else 'length')]}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', {'Content-Length': '3', 'Content-Type': 'multipart', 'Transfer-Encoding': 'chunked', 'Expect': '100-continue', 'Trailer': 'X-Sum', 'X': 'keep'}, True, True, 'A', 'B', 3, 'GET'), {'request': '/requests/' + str(N) + '/0', 'decision': [{'X': 'keep'}, 'B', False, ['abort-upload', 'clear-entity', 'dispatch'], 'none']})
check('fixture 2', solve('/requests/' + str(N) + '/1', {'Content-Length': '3', 'Content-Type': 'multipart', 'Transfer-Encoding': 'chunked', 'Expect': '100-continue', 'Trailer': 'X-Sum', 'X': 'keep'}, False, False, 'A', 'B', 3, 'POST'), {'request': '/requests/' + str(N) + '/1', 'decision': [{'Content-Length': '3', 'Content-Type': 'multipart', 'Transfer-Encoding': 'chunked', 'Expect': '100-continue', 'Trailer': 'X-Sum', 'X': 'keep'}, 'A', True, ['rewind-upload', 'dispatch'], 'length']})
check('fixture 3', solve('/requests/' + str(N) + '/2', {}, False, True, 'B', 'C', None, 'PUT'), {'request': '/requests/' + str(N) + '/2', 'decision': [{}, 'C', True, ['rewind-upload', 'dispatch'], 'chunked']})
check('fixture 4', solve('/requests/' + str(N) + '/3', {}, False, False, 'B', 'C', 0, 'POST'), {'request': '/requests/' + str(N) + '/3', 'decision': [{}, 'B', False, ['rewind-upload', 'dispatch'], 'length']})
check('fixture 5', solve('/requests/' + str(N) + '/4', {'X': 'keep'}, False, False, 'B', 'C', 3, 'HEAD'), {'request': '/requests/' + str(N) + '/4', 'decision': [{'X': 'keep'}, 'B', False, ['rewind-upload', 'dispatch'], 'length']})
check('fixture 6', solve('/requests/' + str(N) + '/5', {}, True, False, 'X', 'Y', None, 'POST'), {'request': '/requests/' + str(N) + '/5', 'decision': [{}, 'X', False, ['abort-upload', 'clear-entity', 'dispatch'], '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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | {'decision': [{'X': 'keep'}, 'B', False, ['abort-upload', 'clear-entity', 'dispatch'], 'none'], 'request': '/requests/1/0'} | {'decision': [{'X': 'keep'}, 'B', False, ['abort-upload', 'clear-entity', 'dispatch'], 'none'], 'request': '/requests/1/0'} | Passed |
| fixture 2 | {'decision': [{'Content-Length': '3', 'Content-Type': 'multipart', 'Expect': '100-continue', 'Trailer': 'X-Sum', 'Transfer-Encoding': 'chunked', 'X': 'keep'}, 'A', True, ['rewind-upload', 'dispatch'], 'length'], 'request': '/requests/1/1'} | {'decision': [{'Content-Length': '3', 'Content-Type': 'multipart', 'Expect': '100-continue', 'Trailer': 'X-Sum', 'Transfer-Encoding': 'chunked', 'X': 'keep'}, 'A', True, ['rewind-upload', 'dispatch'], 'length'], 'request': '/requests/1/1'} | Passed |
| fixture 3 | {'decision': [{}, 'C', True, ['rewind-upload', 'dispatch'], 'chunked'], 'request': '/requests/1/2'} | {'decision': [{}, 'C', True, ['rewind-upload', 'dispatch'], 'chunked'], 'request': '/requests/1/2'} | Passed |
| fixture 4 | {'decision': [{}, 'B', False, ['rewind-upload', 'dispatch'], 'length'], 'request': '/requests/1/3'} | {'decision': [{}, 'B', False, ['rewind-upload', 'dispatch'], 'length'], 'request': '/requests/1/3'} | Passed |
| fixture 5 | {'decision': [{'X': 'keep'}, 'B', False, ['rewind-upload', 'dispatch'], 'length'], 'request': '/requests/1/4'} | {'decision': [{'X': 'keep'}, 'B', False, ['rewind-upload', 'dispatch'], 'length'], 'request': '/requests/1/4'} | Passed |
| fixture 6 | {'decision': [{}, 'X', False, ['abort-upload', 'clear-entity', 'dispatch'], 'none'], 'request': '/requests/1/5'} | {'decision': [{}, 'X', False, ['abort-upload', 'clear-entity', 'dispatch'], 'none'], 'request': '/requests/1/5'} | Passed |
SHA-256 / 7b6d0a6252d14fc9c401019e4b698a3555cc548c381211b825020fbe79c427af
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.917793+00:00.
Case digest / db7e57c6da14b67627eacb8092b4db08542b06327c13a9f86f6f804e90ec5975