FAILURE MAP
← Case archive

FA-28776 / HTTP redirects / Open access

Commit a redirect chain using terminal document semantics and the original navigation intent: document origin from final hop · case 01

Commit a redirect chain using terminal document semantics and the original navigation intent: the document origin from final hop branch emits an incorrect decision.

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

ROOT CAUSE

The document-origin-from-final-hop decision uses 'urlsplit(chain[0]).netloc'; this violates the stipulated controller policy.

VERIFIED REPAIR

At this decision use 'urlsplit(chain[-1]).netloc', 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': [[] 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[0]).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'], 'a', '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': [[], False, {}, 0, False, 'https://start/a', [], 'a', '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'], 'a', '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/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'], 'a', '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 / 68365e998d683bf88cd5ee7e7caa1f603d9ceb8c66ba6c396fc9e553a784095b

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': [[] 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], chain[-1], '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'], 'https://c/z', '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', [], 'https://a/x', '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'}Failed
fixture 3{'decision': [[], False, {}, 0, False, 'https://start/a', [], 'https://b/file', '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'], 'https://b/y', '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/y'], False, {}, 1, False, 'https://start/c', [], 'https://a/y', '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': [[], False, {'download': 'd'}, 1, True, 'https://start/d', ['https://b/file'], 'https://b/file', '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 / 8e76ecb5db45116e28d8de0a219cb7953d2360e016660ad050dcaa2b732f7573

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

Case digest / e227cdbde567d6170909004c0d83ffdc8ae66bf1f0410d67441509d9fed3778a