FAILURE MAP
← Case archive

FA-28721 / HTTP redirects / Open access

Apply a configured redirect query transformation without changing retained value order: empty value kept · case 01

Apply a configured redirect query transformation without changing retained value order: the empty value kept branch emits an incorrect decision.

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

ROOT CAUSE

The empty-value-kept decision uses '[p for p in pairs if p[1]]'; this violates the stipulated controller policy.

VERIFIED REPAIR

At this decision use '[p for p in pairs if p[1] is not None]', preserving the other controller outputs.

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

Case contract

Apply a configured redirect query transformation without changing retained value order. 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, pairs, removed, additions, replace, anchor):
    return {'request': request, 'decision': [[p for p in pairs if p[0] not in removed], pairs+additions, ([p for p in pairs if p[0] not in {a[0] for a in additions}] if replace else pairs)+additions, [p[0] if p[1] is None else p[0]+'='+p[1] for p in pairs], '' if anchor is None else '#'+anchor, [p[0] for p in pairs], [p for p in pairs if p[1]], len(additions), [x for x in removed if x not in {p[0] for p in pairs}], '?' if pairs or additions else '']} 
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', [['a', '1'], ['b', '2'], ['a', '3']], ['b'], [['a', '4']], False, 'section'), {'request': '/requests/' + str(N) + '/0', 'decision': [[['a', '1'], ['a', '3']], [['a', '1'], ['b', '2'], ['a', '3'], ['a', '4']], [['a', '1'], ['b', '2'], ['a', '3'], ['a', '4']], ['a=1', 'b=2', 'a=3'], '#section', ['a', 'b', 'a'], [['a', '1'], ['b', '2'], ['a', '3']], 1, [], '?']})
check('fixture 2', solve('/requests/' + str(N) + '/1', [['a', '1'], ['a', '2']], [], [['a', '3']], True, ''), {'request': '/requests/' + str(N) + '/1', 'decision': [[['a', '1'], ['a', '2']], [['a', '1'], ['a', '2'], ['a', '3']], [['a', '3']], ['a=1', 'a=2'], '#', ['a', 'a'], [['a', '1'], ['a', '2']], 1, [], '?']})
check('fixture 3', solve('/requests/' + str(N) + '/2', [], [], [['q', '']], False, None), {'request': '/requests/' + str(N) + '/2', 'decision': [[], [['q', '']], [['q', '']], [], '', [], [], 1, [], '?']})
check('fixture 4', solve('/requests/' + str(N) + '/3', [['x', ''], ['flag', None]], ['x'], [], True, 'z'), {'request': '/requests/' + str(N) + '/3', 'decision': [[['flag', None]], [['x', ''], ['flag', None]], [['x', ''], ['flag', None]], ['x=', 'flag'], '#z', ['x', 'flag'], [['x', '']], 0, [], '?']})
check('fixture 5', solve('/requests/' + str(N) + '/4', [['b', '2'], ['a', '1']], ['absent'], [['c', '3'], ['c', '4']], False, '#x'), {'request': '/requests/' + str(N) + '/4', 'decision': [[['b', '2'], ['a', '1']], [['b', '2'], ['a', '1'], ['c', '3'], ['c', '4']], [['b', '2'], ['a', '1'], ['c', '3'], ['c', '4']], ['b=2', 'a=1'], '##x', ['b', 'a'], [['b', '2'], ['a', '1']], 2, ['absent'], '?']})
check('fixture 6', solve('/requests/' + str(N) + '/5', [['a', '1']], ['a'], [['a', '2']], True, None), {'request': '/requests/' + str(N) + '/5', 'decision': [[], [['a', '1'], ['a', '2']], [['a', '2']], ['a=1'], '', ['a'], [['a', '1']], 1, [], '?']})
check('fixture 7', solve('/requests/' + str(N) + '/6', [], [], [], False, None), {'request': '/requests/' + str(N) + '/6', 'decision': [[], [], [], [], '', [], [], 0, [], '']})
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': [[['a', '1'], ['a', '3']], [['a', '1'], ['b', '2'], ['a', '3'], ['a', '4']], [['a', '1'], ['b', '2'], ['a', '3'], ['a', '4']], ['a=1', 'b=2', 'a=3'], '#section', ['a', 'b', 'a'], [['a', '1'], ['b', '2'], ['a', '3']], 1, [], '?'], 'request': '/requests/1/0'}{'decision': [[['a', '1'], ['a', '3']], [['a', '1'], ['b', '2'], ['a', '3'], ['a', '4']], [['a', '1'], ['b', '2'], ['a', '3'], ['a', '4']], ['a=1', 'b=2', 'a=3'], '#section', ['a', 'b', 'a'], [['a', '1'], ['b', '2'], ['a', '3']], 1, [], '?'], 'request': '/requests/1/0'}Passed
fixture 2{'decision': [[['a', '1'], ['a', '2']], [['a', '1'], ['a', '2'], ['a', '3']], [['a', '3']], ['a=1', 'a=2'], '#', ['a', 'a'], [['a', '1'], ['a', '2']], 1, [], '?'], 'request': '/requests/1/1'}{'decision': [[['a', '1'], ['a', '2']], [['a', '1'], ['a', '2'], ['a', '3']], [['a', '3']], ['a=1', 'a=2'], '#', ['a', 'a'], [['a', '1'], ['a', '2']], 1, [], '?'], 'request': '/requests/1/1'}Passed
fixture 3{'decision': [[], [['q', '']], [['q', '']], [], '', [], [], 1, [], '?'], 'request': '/requests/1/2'}{'decision': [[], [['q', '']], [['q', '']], [], '', [], [], 1, [], '?'], 'request': '/requests/1/2'}Passed
fixture 4{'decision': [[['flag', None]], [['x', ''], ['flag', None]], [['x', ''], ['flag', None]], ['x=', 'flag'], '#z', ['x', 'flag'], [], 0, [], '?'], 'request': '/requests/1/3'}{'decision': [[['flag', None]], [['x', ''], ['flag', None]], [['x', ''], ['flag', None]], ['x=', 'flag'], '#z', ['x', 'flag'], [['x', '']], 0, [], '?'], 'request': '/requests/1/3'}Failed
fixture 5{'decision': [[['b', '2'], ['a', '1']], [['b', '2'], ['a', '1'], ['c', '3'], ['c', '4']], [['b', '2'], ['a', '1'], ['c', '3'], ['c', '4']], ['b=2', 'a=1'], '##x', ['b', 'a'], [['b', '2'], ['a', '1']], 2, ['absent'], '?'], 'request': '/requests/1/4'}{'decision': [[['b', '2'], ['a', '1']], [['b', '2'], ['a', '1'], ['c', '3'], ['c', '4']], [['b', '2'], ['a', '1'], ['c', '3'], ['c', '4']], ['b=2', 'a=1'], '##x', ['b', 'a'], [['b', '2'], ['a', '1']], 2, ['absent'], '?'], 'request': '/requests/1/4'}Passed
fixture 6{'decision': [[], [['a', '1'], ['a', '2']], [['a', '2']], ['a=1'], '', ['a'], [['a', '1']], 1, [], '?'], 'request': '/requests/1/5'}{'decision': [[], [['a', '1'], ['a', '2']], [['a', '2']], ['a=1'], '', ['a'], [['a', '1']], 1, [], '?'], 'request': '/requests/1/5'}Passed
fixture 7{'decision': [[], [], [], [], '', [], [], 0, [], ''], 'request': '/requests/1/6'}{'decision': [[], [], [], [], '', [], [], 0, [], ''], 'request': '/requests/1/6'}Passed

SHA-256 / 8757d6987d800c00ea4fe8716c11d9ad8108e93218a14697598edd20d5344e64

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, pairs, removed, additions, replace, anchor):
    return {'request': request, 'decision': [[p for p in pairs if p[0] not in removed], pairs+additions, ([p for p in pairs if p[0] not in {a[0] for a in additions}] if replace else pairs)+additions, [p[0] if p[1] is None else p[0]+'='+p[1] for p in pairs], '' if anchor is None else '#'+anchor, [p[0] for p in pairs], pairs, len(additions), [x for x in removed if x not in {p[0] for p in pairs}], '?' if pairs or additions else '']} 
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', [['a', '1'], ['b', '2'], ['a', '3']], ['b'], [['a', '4']], False, 'section'), {'request': '/requests/' + str(N) + '/0', 'decision': [[['a', '1'], ['a', '3']], [['a', '1'], ['b', '2'], ['a', '3'], ['a', '4']], [['a', '1'], ['b', '2'], ['a', '3'], ['a', '4']], ['a=1', 'b=2', 'a=3'], '#section', ['a', 'b', 'a'], [['a', '1'], ['b', '2'], ['a', '3']], 1, [], '?']})
check('fixture 2', solve('/requests/' + str(N) + '/1', [['a', '1'], ['a', '2']], [], [['a', '3']], True, ''), {'request': '/requests/' + str(N) + '/1', 'decision': [[['a', '1'], ['a', '2']], [['a', '1'], ['a', '2'], ['a', '3']], [['a', '3']], ['a=1', 'a=2'], '#', ['a', 'a'], [['a', '1'], ['a', '2']], 1, [], '?']})
check('fixture 3', solve('/requests/' + str(N) + '/2', [], [], [['q', '']], False, None), {'request': '/requests/' + str(N) + '/2', 'decision': [[], [['q', '']], [['q', '']], [], '', [], [], 1, [], '?']})
check('fixture 4', solve('/requests/' + str(N) + '/3', [['x', ''], ['flag', None]], ['x'], [], True, 'z'), {'request': '/requests/' + str(N) + '/3', 'decision': [[['flag', None]], [['x', ''], ['flag', None]], [['x', ''], ['flag', None]], ['x=', 'flag'], '#z', ['x', 'flag'], [['x', '']], 0, [], '?']})
check('fixture 5', solve('/requests/' + str(N) + '/4', [['b', '2'], ['a', '1']], ['absent'], [['c', '3'], ['c', '4']], False, '#x'), {'request': '/requests/' + str(N) + '/4', 'decision': [[['b', '2'], ['a', '1']], [['b', '2'], ['a', '1'], ['c', '3'], ['c', '4']], [['b', '2'], ['a', '1'], ['c', '3'], ['c', '4']], ['b=2', 'a=1'], '##x', ['b', 'a'], [['b', '2'], ['a', '1']], 2, ['absent'], '?']})
check('fixture 6', solve('/requests/' + str(N) + '/5', [['a', '1']], ['a'], [['a', '2']], True, None), {'request': '/requests/' + str(N) + '/5', 'decision': [[], [['a', '1'], ['a', '2']], [['a', '2']], ['a=1'], '', ['a'], [['a', '1']], 1, [], '?']})
check('fixture 7', solve('/requests/' + str(N) + '/6', [], [], [], False, None), {'request': '/requests/' + str(N) + '/6', 'decision': [[], [], [], [], '', [], [], 0, [], '']})
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': [[['a', '1'], ['a', '3']], [['a', '1'], ['b', '2'], ['a', '3'], ['a', '4']], [['a', '1'], ['b', '2'], ['a', '3'], ['a', '4']], ['a=1', 'b=2', 'a=3'], '#section', ['a', 'b', 'a'], [['a', '1'], ['b', '2'], ['a', '3']], 1, [], '?'], 'request': '/requests/1/0'}{'decision': [[['a', '1'], ['a', '3']], [['a', '1'], ['b', '2'], ['a', '3'], ['a', '4']], [['a', '1'], ['b', '2'], ['a', '3'], ['a', '4']], ['a=1', 'b=2', 'a=3'], '#section', ['a', 'b', 'a'], [['a', '1'], ['b', '2'], ['a', '3']], 1, [], '?'], 'request': '/requests/1/0'}Passed
fixture 2{'decision': [[['a', '1'], ['a', '2']], [['a', '1'], ['a', '2'], ['a', '3']], [['a', '3']], ['a=1', 'a=2'], '#', ['a', 'a'], [['a', '1'], ['a', '2']], 1, [], '?'], 'request': '/requests/1/1'}{'decision': [[['a', '1'], ['a', '2']], [['a', '1'], ['a', '2'], ['a', '3']], [['a', '3']], ['a=1', 'a=2'], '#', ['a', 'a'], [['a', '1'], ['a', '2']], 1, [], '?'], 'request': '/requests/1/1'}Passed
fixture 3{'decision': [[], [['q', '']], [['q', '']], [], '', [], [], 1, [], '?'], 'request': '/requests/1/2'}{'decision': [[], [['q', '']], [['q', '']], [], '', [], [], 1, [], '?'], 'request': '/requests/1/2'}Passed
fixture 4{'decision': [[['flag', None]], [['x', ''], ['flag', None]], [['x', ''], ['flag', None]], ['x=', 'flag'], '#z', ['x', 'flag'], [['x', ''], ['flag', None]], 0, [], '?'], 'request': '/requests/1/3'}{'decision': [[['flag', None]], [['x', ''], ['flag', None]], [['x', ''], ['flag', None]], ['x=', 'flag'], '#z', ['x', 'flag'], [['x', '']], 0, [], '?'], 'request': '/requests/1/3'}Failed
fixture 5{'decision': [[['b', '2'], ['a', '1']], [['b', '2'], ['a', '1'], ['c', '3'], ['c', '4']], [['b', '2'], ['a', '1'], ['c', '3'], ['c', '4']], ['b=2', 'a=1'], '##x', ['b', 'a'], [['b', '2'], ['a', '1']], 2, ['absent'], '?'], 'request': '/requests/1/4'}{'decision': [[['b', '2'], ['a', '1']], [['b', '2'], ['a', '1'], ['c', '3'], ['c', '4']], [['b', '2'], ['a', '1'], ['c', '3'], ['c', '4']], ['b=2', 'a=1'], '##x', ['b', 'a'], [['b', '2'], ['a', '1']], 2, ['absent'], '?'], 'request': '/requests/1/4'}Passed
fixture 6{'decision': [[], [['a', '1'], ['a', '2']], [['a', '2']], ['a=1'], '', ['a'], [['a', '1']], 1, [], '?'], 'request': '/requests/1/5'}{'decision': [[], [['a', '1'], ['a', '2']], [['a', '2']], ['a=1'], '', ['a'], [['a', '1']], 1, [], '?'], 'request': '/requests/1/5'}Passed
fixture 7{'decision': [[], [], [], [], '', [], [], 0, [], ''], 'request': '/requests/1/6'}{'decision': [[], [], [], [], '', [], [], 0, [], ''], 'request': '/requests/1/6'}Passed

SHA-256 / cba9ed71758bea66280bacf8e8a070c57c844c5b0c92d2a039c68bfcf6318c06

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, pairs, removed, additions, replace, anchor):
    return {'request': request, 'decision': [[p for p in pairs if p[0] not in removed], pairs+additions, ([p for p in pairs if p[0] not in {a[0] for a in additions}] if replace else pairs)+additions, [p[0] if p[1] is None else p[0]+'='+p[1] for p in pairs], '' if anchor is None else '#'+anchor, [p[0] for p in pairs], [p for p in pairs if p[1] is not None], len(additions), [x for x in removed if x not in {p[0] for p in pairs}], '?' if pairs or additions else '']} 
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', [['a', '1'], ['b', '2'], ['a', '3']], ['b'], [['a', '4']], False, 'section'), {'request': '/requests/' + str(N) + '/0', 'decision': [[['a', '1'], ['a', '3']], [['a', '1'], ['b', '2'], ['a', '3'], ['a', '4']], [['a', '1'], ['b', '2'], ['a', '3'], ['a', '4']], ['a=1', 'b=2', 'a=3'], '#section', ['a', 'b', 'a'], [['a', '1'], ['b', '2'], ['a', '3']], 1, [], '?']})
check('fixture 2', solve('/requests/' + str(N) + '/1', [['a', '1'], ['a', '2']], [], [['a', '3']], True, ''), {'request': '/requests/' + str(N) + '/1', 'decision': [[['a', '1'], ['a', '2']], [['a', '1'], ['a', '2'], ['a', '3']], [['a', '3']], ['a=1', 'a=2'], '#', ['a', 'a'], [['a', '1'], ['a', '2']], 1, [], '?']})
check('fixture 3', solve('/requests/' + str(N) + '/2', [], [], [['q', '']], False, None), {'request': '/requests/' + str(N) + '/2', 'decision': [[], [['q', '']], [['q', '']], [], '', [], [], 1, [], '?']})
check('fixture 4', solve('/requests/' + str(N) + '/3', [['x', ''], ['flag', None]], ['x'], [], True, 'z'), {'request': '/requests/' + str(N) + '/3', 'decision': [[['flag', None]], [['x', ''], ['flag', None]], [['x', ''], ['flag', None]], ['x=', 'flag'], '#z', ['x', 'flag'], [['x', '']], 0, [], '?']})
check('fixture 5', solve('/requests/' + str(N) + '/4', [['b', '2'], ['a', '1']], ['absent'], [['c', '3'], ['c', '4']], False, '#x'), {'request': '/requests/' + str(N) + '/4', 'decision': [[['b', '2'], ['a', '1']], [['b', '2'], ['a', '1'], ['c', '3'], ['c', '4']], [['b', '2'], ['a', '1'], ['c', '3'], ['c', '4']], ['b=2', 'a=1'], '##x', ['b', 'a'], [['b', '2'], ['a', '1']], 2, ['absent'], '?']})
check('fixture 6', solve('/requests/' + str(N) + '/5', [['a', '1']], ['a'], [['a', '2']], True, None), {'request': '/requests/' + str(N) + '/5', 'decision': [[], [['a', '1'], ['a', '2']], [['a', '2']], ['a=1'], '', ['a'], [['a', '1']], 1, [], '?']})
check('fixture 7', solve('/requests/' + str(N) + '/6', [], [], [], False, None), {'request': '/requests/' + str(N) + '/6', 'decision': [[], [], [], [], '', [], [], 0, [], '']})
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': [[['a', '1'], ['a', '3']], [['a', '1'], ['b', '2'], ['a', '3'], ['a', '4']], [['a', '1'], ['b', '2'], ['a', '3'], ['a', '4']], ['a=1', 'b=2', 'a=3'], '#section', ['a', 'b', 'a'], [['a', '1'], ['b', '2'], ['a', '3']], 1, [], '?'], 'request': '/requests/1/0'}{'decision': [[['a', '1'], ['a', '3']], [['a', '1'], ['b', '2'], ['a', '3'], ['a', '4']], [['a', '1'], ['b', '2'], ['a', '3'], ['a', '4']], ['a=1', 'b=2', 'a=3'], '#section', ['a', 'b', 'a'], [['a', '1'], ['b', '2'], ['a', '3']], 1, [], '?'], 'request': '/requests/1/0'}Passed
fixture 2{'decision': [[['a', '1'], ['a', '2']], [['a', '1'], ['a', '2'], ['a', '3']], [['a', '3']], ['a=1', 'a=2'], '#', ['a', 'a'], [['a', '1'], ['a', '2']], 1, [], '?'], 'request': '/requests/1/1'}{'decision': [[['a', '1'], ['a', '2']], [['a', '1'], ['a', '2'], ['a', '3']], [['a', '3']], ['a=1', 'a=2'], '#', ['a', 'a'], [['a', '1'], ['a', '2']], 1, [], '?'], 'request': '/requests/1/1'}Passed
fixture 3{'decision': [[], [['q', '']], [['q', '']], [], '', [], [], 1, [], '?'], 'request': '/requests/1/2'}{'decision': [[], [['q', '']], [['q', '']], [], '', [], [], 1, [], '?'], 'request': '/requests/1/2'}Passed
fixture 4{'decision': [[['flag', None]], [['x', ''], ['flag', None]], [['x', ''], ['flag', None]], ['x=', 'flag'], '#z', ['x', 'flag'], [['x', '']], 0, [], '?'], 'request': '/requests/1/3'}{'decision': [[['flag', None]], [['x', ''], ['flag', None]], [['x', ''], ['flag', None]], ['x=', 'flag'], '#z', ['x', 'flag'], [['x', '']], 0, [], '?'], 'request': '/requests/1/3'}Passed
fixture 5{'decision': [[['b', '2'], ['a', '1']], [['b', '2'], ['a', '1'], ['c', '3'], ['c', '4']], [['b', '2'], ['a', '1'], ['c', '3'], ['c', '4']], ['b=2', 'a=1'], '##x', ['b', 'a'], [['b', '2'], ['a', '1']], 2, ['absent'], '?'], 'request': '/requests/1/4'}{'decision': [[['b', '2'], ['a', '1']], [['b', '2'], ['a', '1'], ['c', '3'], ['c', '4']], [['b', '2'], ['a', '1'], ['c', '3'], ['c', '4']], ['b=2', 'a=1'], '##x', ['b', 'a'], [['b', '2'], ['a', '1']], 2, ['absent'], '?'], 'request': '/requests/1/4'}Passed
fixture 6{'decision': [[], [['a', '1'], ['a', '2']], [['a', '2']], ['a=1'], '', ['a'], [['a', '1']], 1, [], '?'], 'request': '/requests/1/5'}{'decision': [[], [['a', '1'], ['a', '2']], [['a', '2']], ['a=1'], '', ['a'], [['a', '1']], 1, [], '?'], 'request': '/requests/1/5'}Passed
fixture 7{'decision': [[], [], [], [], '', [], [], 0, [], ''], 'request': '/requests/1/6'}{'decision': [[], [], [], [], '', [], [], 0, [], ''], 'request': '/requests/1/6'}Passed

SHA-256 / aed87be89cdccccfb65d81facdfdc388216327c16f312ff4f80570731d2340f2

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

Case digest / 3f44ce155b29cf48be7ae6acfe2a7c4a0b1d55babf4c59d09d3246b5ea88415a