FAILURE MAP
← Case archive

FA-28741 / HTTP redirects / Open access

Commit a redirect chain using terminal document semantics and the original navigation intent: intermediate hops not documents · case 01

Commit a redirect chain using terminal document semantics and the original navigation intent: the intermediate hops not documents branch emits an incorrect decision.

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

ROOT CAUSE

The intermediate-hops-not-documents decision uses 'chain'; this violates the stipulated controller policy.

VERIFIED REPAIR

At this decision use '[] if download else [chain[-1]]', preserving the other controller outputs.

Unsuccessful approach: The partial repair uses '[chain[-1]]' and still fails an explicit boundary or control.

Case contract

Commit a redirect chain using terminal document semantics and the original navigation intent. 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, chain, methods, state, download, activation, replace, initiator, allows):
    return {'request': request, 'decision': [chain, methods[-1] not in ('GET','HEAD'), state, 1 if activation else 0, replace, initiator, [u for u,ok in zip(chain,allows) if not ok], urlsplit(chain[-1]).netloc, 'download' if download else 'document', {'requested':chain[0],'committed':None if download else chain[-1]}]} 
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', ['https://a/x', 'https://b/y', 'https://c/z'], ['POST', 'GET', 'GET'], {'view': 'v'}, False, True, False, 'https://start/home', [True, False, True]), {'request': '/requests/' + str(N) + '/0', 'decision': [['https://c/z'], False, {'view': 'v'}, 1, False, 'https://start/home', ['https://b/y'], 'c', 'document', {'requested': 'https://a/x', 'committed': 'https://c/z'}]})
check('fixture 2', solve('/requests/' + str(N) + '/1', ['https://a/x'], ['GET'], {'view': 'q'}, False, True, True, 'https://start/home', [True]), {'request': '/requests/' + str(N) + '/1', 'decision': [['https://a/x'], False, {'view': 'q'}, 1, True, 'https://start/home', [], 'a', 'document', {'requested': 'https://a/x', 'committed': 'https://a/x'}]})
check('fixture 3', solve('/requests/' + str(N) + '/2', ['https://a/x', 'https://b/file'], ['GET', 'GET'], {}, True, False, False, 'https://start/a', [True, True]), {'request': '/requests/' + str(N) + '/2', 'decision': [[], False, {}, 0, False, 'https://start/a', [], 'b', 'download', {'requested': 'https://a/x', 'committed': None}]})
check('fixture 4', solve('/requests/' + str(N) + '/3', ['https://a/x', 'https://b/y'], ['POST', 'POST'], {'form': 'a'}, False, False, True, 'https://start/b', [False, True]), {'request': '/requests/' + str(N) + '/3', 'decision': [['https://b/y'], True, {'form': 'a'}, 0, True, 'https://start/b', ['https://a/x'], 'b', 'document', {'requested': 'https://a/x', 'committed': 'https://b/y'}]})
check('fixture 5', solve('/requests/' + str(N) + '/4', ['https://a/x', 'https://a/y'], ['GET', 'HEAD'], {}, False, True, False, 'https://start/c', [True, True]), {'request': '/requests/' + str(N) + '/4', 'decision': [['https://a/y'], False, {}, 1, False, 'https://start/c', [], 'a', 'document', {'requested': 'https://a/x', 'committed': 'https://a/y'}]})
check('fixture 6', solve('/requests/' + str(N) + '/5', ['https://a/x', 'https://b/file'], ['POST', 'GET'], {'download': 'd'}, True, True, True, 'https://start/d', [True, False]), {'request': '/requests/' + str(N) + '/5', 'decision': [[], False, {'download': 'd'}, 1, True, 'https://start/d', ['https://b/file'], 'b', 'download', {'requested': 'https://a/x', 'committed': 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
fixture 1{'decision': [['https://a/x', 'https://b/y', 'https://c/z'], False, {'view': 'v'}, 1, False, 'https://start/home', ['https://b/y'], 'c', 'document', {'committed': 'https://c/z', 'requested': 'https://a/x'}], 'request': '/requests/1/0'}{'decision': [['https://c/z'], False, {'view': 'v'}, 1, False, 'https://start/home', ['https://b/y'], 'c', 'document', {'committed': 'https://c/z', 'requested': 'https://a/x'}], 'request': '/requests/1/0'}Failed
fixture 2{'decision': [['https://a/x'], False, {'view': 'q'}, 1, True, 'https://start/home', [], 'a', 'document', {'committed': 'https://a/x', 'requested': 'https://a/x'}], 'request': '/requests/1/1'}{'decision': [['https://a/x'], False, {'view': 'q'}, 1, True, 'https://start/home', [], 'a', 'document', {'committed': 'https://a/x', 'requested': 'https://a/x'}], 'request': '/requests/1/1'}Passed
fixture 3{'decision': [['https://a/x', 'https://b/file'], False, {}, 0, False, 'https://start/a', [], 'b', 'download', {'committed': None, 'requested': 'https://a/x'}], 'request': '/requests/1/2'}{'decision': [[], False, {}, 0, False, 'https://start/a', [], 'b', 'download', {'committed': None, 'requested': 'https://a/x'}], 'request': '/requests/1/2'}Failed
fixture 4{'decision': [['https://a/x', 'https://b/y'], True, {'form': 'a'}, 0, True, 'https://start/b', ['https://a/x'], 'b', 'document', {'committed': 'https://b/y', 'requested': 'https://a/x'}], 'request': '/requests/1/3'}{'decision': [['https://b/y'], True, {'form': 'a'}, 0, True, 'https://start/b', ['https://a/x'], 'b', 'document', {'committed': 'https://b/y', 'requested': 'https://a/x'}], 'request': '/requests/1/3'}Failed
fixture 5{'decision': [['https://a/x', 'https://a/y'], False, {}, 1, False, 'https://start/c', [], 'a', 'document', {'committed': 'https://a/y', 'requested': 'https://a/x'}], 'request': '/requests/1/4'}{'decision': [['https://a/y'], False, {}, 1, False, 'https://start/c', [], 'a', 'document', {'committed': 'https://a/y', 'requested': 'https://a/x'}], 'request': '/requests/1/4'}Failed
fixture 6{'decision': [['https://a/x', 'https://b/file'], False, {'download': 'd'}, 1, True, 'https://start/d', ['https://b/file'], 'b', 'download', {'committed': None, 'requested': 'https://a/x'}], 'request': '/requests/1/5'}{'decision': [[], False, {'download': 'd'}, 1, True, 'https://start/d', ['https://b/file'], 'b', 'download', {'committed': None, 'requested': 'https://a/x'}], 'request': '/requests/1/5'}Failed

SHA-256 / e4760c6c4a9c84a8c0d89da48d52709df97040b5a0b91b8ef2b4a0e3a6936eea

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, chain, methods, state, download, activation, replace, initiator, allows):
    return {'request': request, 'decision': [[chain[-1]], methods[-1] not in ('GET','HEAD'), state, 1 if activation else 0, replace, initiator, [u for u,ok in zip(chain,allows) if not ok], urlsplit(chain[-1]).netloc, 'download' if download else 'document', {'requested':chain[0],'committed':None if download else chain[-1]}]} 
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', ['https://a/x', 'https://b/y', 'https://c/z'], ['POST', 'GET', 'GET'], {'view': 'v'}, False, True, False, 'https://start/home', [True, False, True]), {'request': '/requests/' + str(N) + '/0', 'decision': [['https://c/z'], False, {'view': 'v'}, 1, False, 'https://start/home', ['https://b/y'], 'c', 'document', {'requested': 'https://a/x', 'committed': 'https://c/z'}]})
check('fixture 2', solve('/requests/' + str(N) + '/1', ['https://a/x'], ['GET'], {'view': 'q'}, False, True, True, 'https://start/home', [True]), {'request': '/requests/' + str(N) + '/1', 'decision': [['https://a/x'], False, {'view': 'q'}, 1, True, 'https://start/home', [], 'a', 'document', {'requested': 'https://a/x', 'committed': 'https://a/x'}]})
check('fixture 3', solve('/requests/' + str(N) + '/2', ['https://a/x', 'https://b/file'], ['GET', 'GET'], {}, True, False, False, 'https://start/a', [True, True]), {'request': '/requests/' + str(N) + '/2', 'decision': [[], False, {}, 0, False, 'https://start/a', [], 'b', 'download', {'requested': 'https://a/x', 'committed': None}]})
check('fixture 4', solve('/requests/' + str(N) + '/3', ['https://a/x', 'https://b/y'], ['POST', 'POST'], {'form': 'a'}, False, False, True, 'https://start/b', [False, True]), {'request': '/requests/' + str(N) + '/3', 'decision': [['https://b/y'], True, {'form': 'a'}, 0, True, 'https://start/b', ['https://a/x'], 'b', 'document', {'requested': 'https://a/x', 'committed': 'https://b/y'}]})
check('fixture 5', solve('/requests/' + str(N) + '/4', ['https://a/x', 'https://a/y'], ['GET', 'HEAD'], {}, False, True, False, 'https://start/c', [True, True]), {'request': '/requests/' + str(N) + '/4', 'decision': [['https://a/y'], False, {}, 1, False, 'https://start/c', [], 'a', 'document', {'requested': 'https://a/x', 'committed': 'https://a/y'}]})
check('fixture 6', solve('/requests/' + str(N) + '/5', ['https://a/x', 'https://b/file'], ['POST', 'GET'], {'download': 'd'}, True, True, True, 'https://start/d', [True, False]), {'request': '/requests/' + str(N) + '/5', 'decision': [[], False, {'download': 'd'}, 1, True, 'https://start/d', ['https://b/file'], 'b', 'download', {'requested': 'https://a/x', 'committed': 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
fixture 1{'decision': [['https://c/z'], False, {'view': 'v'}, 1, False, 'https://start/home', ['https://b/y'], 'c', 'document', {'committed': 'https://c/z', 'requested': 'https://a/x'}], 'request': '/requests/1/0'}{'decision': [['https://c/z'], False, {'view': 'v'}, 1, False, 'https://start/home', ['https://b/y'], 'c', 'document', {'committed': 'https://c/z', 'requested': 'https://a/x'}], 'request': '/requests/1/0'}Passed
fixture 2{'decision': [['https://a/x'], False, {'view': 'q'}, 1, True, 'https://start/home', [], 'a', 'document', {'committed': 'https://a/x', 'requested': 'https://a/x'}], 'request': '/requests/1/1'}{'decision': [['https://a/x'], False, {'view': 'q'}, 1, True, 'https://start/home', [], 'a', 'document', {'committed': 'https://a/x', 'requested': 'https://a/x'}], 'request': '/requests/1/1'}Passed
fixture 3{'decision': [['https://b/file'], False, {}, 0, False, 'https://start/a', [], 'b', 'download', {'committed': None, 'requested': 'https://a/x'}], 'request': '/requests/1/2'}{'decision': [[], False, {}, 0, False, 'https://start/a', [], 'b', 'download', {'committed': None, 'requested': 'https://a/x'}], 'request': '/requests/1/2'}Failed
fixture 4{'decision': [['https://b/y'], True, {'form': 'a'}, 0, True, 'https://start/b', ['https://a/x'], 'b', 'document', {'committed': 'https://b/y', 'requested': 'https://a/x'}], 'request': '/requests/1/3'}{'decision': [['https://b/y'], True, {'form': 'a'}, 0, True, 'https://start/b', ['https://a/x'], 'b', 'document', {'committed': 'https://b/y', 'requested': 'https://a/x'}], 'request': '/requests/1/3'}Passed
fixture 5{'decision': [['https://a/y'], False, {}, 1, False, 'https://start/c', [], 'a', 'document', {'committed': 'https://a/y', 'requested': 'https://a/x'}], 'request': '/requests/1/4'}{'decision': [['https://a/y'], False, {}, 1, False, 'https://start/c', [], 'a', 'document', {'committed': 'https://a/y', 'requested': 'https://a/x'}], 'request': '/requests/1/4'}Passed
fixture 6{'decision': [['https://b/file'], False, {'download': 'd'}, 1, True, 'https://start/d', ['https://b/file'], 'b', 'download', {'committed': None, 'requested': 'https://a/x'}], 'request': '/requests/1/5'}{'decision': [[], False, {'download': 'd'}, 1, True, 'https://start/d', ['https://b/file'], 'b', 'download', {'committed': None, 'requested': 'https://a/x'}], 'request': '/requests/1/5'}Failed

SHA-256 / ee56566cc27ac1cdaa1426a22cc5898faf1956cd0ce5532dd8ec07da08db720d

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, chain, methods, state, download, activation, replace, initiator, allows):
    return {'request': request, 'decision': [[] if download else [chain[-1]], methods[-1] not in ('GET','HEAD'), state, 1 if activation else 0, replace, initiator, [u for u,ok in zip(chain,allows) if not ok], urlsplit(chain[-1]).netloc, 'download' if download else 'document', {'requested':chain[0],'committed':None if download else chain[-1]}]} 
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', ['https://a/x', 'https://b/y', 'https://c/z'], ['POST', 'GET', 'GET'], {'view': 'v'}, False, True, False, 'https://start/home', [True, False, True]), {'request': '/requests/' + str(N) + '/0', 'decision': [['https://c/z'], False, {'view': 'v'}, 1, False, 'https://start/home', ['https://b/y'], 'c', 'document', {'requested': 'https://a/x', 'committed': 'https://c/z'}]})
check('fixture 2', solve('/requests/' + str(N) + '/1', ['https://a/x'], ['GET'], {'view': 'q'}, False, True, True, 'https://start/home', [True]), {'request': '/requests/' + str(N) + '/1', 'decision': [['https://a/x'], False, {'view': 'q'}, 1, True, 'https://start/home', [], 'a', 'document', {'requested': 'https://a/x', 'committed': 'https://a/x'}]})
check('fixture 3', solve('/requests/' + str(N) + '/2', ['https://a/x', 'https://b/file'], ['GET', 'GET'], {}, True, False, False, 'https://start/a', [True, True]), {'request': '/requests/' + str(N) + '/2', 'decision': [[], False, {}, 0, False, 'https://start/a', [], 'b', 'download', {'requested': 'https://a/x', 'committed': None}]})
check('fixture 4', solve('/requests/' + str(N) + '/3', ['https://a/x', 'https://b/y'], ['POST', 'POST'], {'form': 'a'}, False, False, True, 'https://start/b', [False, True]), {'request': '/requests/' + str(N) + '/3', 'decision': [['https://b/y'], True, {'form': 'a'}, 0, True, 'https://start/b', ['https://a/x'], 'b', 'document', {'requested': 'https://a/x', 'committed': 'https://b/y'}]})
check('fixture 5', solve('/requests/' + str(N) + '/4', ['https://a/x', 'https://a/y'], ['GET', 'HEAD'], {}, False, True, False, 'https://start/c', [True, True]), {'request': '/requests/' + str(N) + '/4', 'decision': [['https://a/y'], False, {}, 1, False, 'https://start/c', [], 'a', 'document', {'requested': 'https://a/x', 'committed': 'https://a/y'}]})
check('fixture 6', solve('/requests/' + str(N) + '/5', ['https://a/x', 'https://b/file'], ['POST', 'GET'], {'download': 'd'}, True, True, True, 'https://start/d', [True, False]), {'request': '/requests/' + str(N) + '/5', 'decision': [[], False, {'download': 'd'}, 1, True, 'https://start/d', ['https://b/file'], 'b', 'download', {'requested': 'https://a/x', 'committed': 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
fixture 1{'decision': [['https://c/z'], False, {'view': 'v'}, 1, False, 'https://start/home', ['https://b/y'], 'c', 'document', {'committed': 'https://c/z', 'requested': 'https://a/x'}], 'request': '/requests/1/0'}{'decision': [['https://c/z'], False, {'view': 'v'}, 1, False, 'https://start/home', ['https://b/y'], 'c', 'document', {'committed': 'https://c/z', 'requested': 'https://a/x'}], 'request': '/requests/1/0'}Passed
fixture 2{'decision': [['https://a/x'], False, {'view': 'q'}, 1, True, 'https://start/home', [], 'a', 'document', {'committed': 'https://a/x', 'requested': 'https://a/x'}], 'request': '/requests/1/1'}{'decision': [['https://a/x'], False, {'view': 'q'}, 1, True, 'https://start/home', [], 'a', 'document', {'committed': 'https://a/x', 'requested': 'https://a/x'}], 'request': '/requests/1/1'}Passed
fixture 3{'decision': [[], False, {}, 0, False, 'https://start/a', [], 'b', 'download', {'committed': None, 'requested': 'https://a/x'}], 'request': '/requests/1/2'}{'decision': [[], False, {}, 0, False, 'https://start/a', [], 'b', 'download', {'committed': None, 'requested': 'https://a/x'}], 'request': '/requests/1/2'}Passed
fixture 4{'decision': [['https://b/y'], True, {'form': 'a'}, 0, True, 'https://start/b', ['https://a/x'], 'b', 'document', {'committed': 'https://b/y', 'requested': 'https://a/x'}], 'request': '/requests/1/3'}{'decision': [['https://b/y'], True, {'form': 'a'}, 0, True, 'https://start/b', ['https://a/x'], 'b', 'document', {'committed': 'https://b/y', 'requested': 'https://a/x'}], 'request': '/requests/1/3'}Passed
fixture 5{'decision': [['https://a/y'], False, {}, 1, False, 'https://start/c', [], 'a', 'document', {'committed': 'https://a/y', 'requested': 'https://a/x'}], 'request': '/requests/1/4'}{'decision': [['https://a/y'], False, {}, 1, False, 'https://start/c', [], 'a', 'document', {'committed': 'https://a/y', 'requested': 'https://a/x'}], 'request': '/requests/1/4'}Passed
fixture 6{'decision': [[], False, {'download': 'd'}, 1, True, 'https://start/d', ['https://b/file'], 'b', 'download', {'committed': None, 'requested': 'https://a/x'}], 'request': '/requests/1/5'}{'decision': [[], False, {'download': 'd'}, 1, True, 'https://start/d', ['https://b/file'], 'b', 'download', {'committed': None, 'requested': 'https://a/x'}], 'request': '/requests/1/5'}Passed

SHA-256 / 20ca53c3f235ee6125f87593485f4661877554cd41c572d2664ffdd2a453d6f5

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

Case digest / 4a626ed1ebef98c7562522a6860d30cd17ab24123d28c6031c334ca91c02c238