FAILURE MAP
← Case archive

FA-28526 / HTTP redirects / Open access

Select a redirect rule by explicit priority, specificity and declaration order: head not get alias · case 01

Select a redirect rule by explicit priority, specificity and declaration order: the head not get alias branch emits an incorrect decision.

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

ROOT CAUSE

The head-not-get-alias decision uses "method in ('GET','HEAD')"; this violates the stipulated controller policy.

THE FAILURE

The head-not-get-alias decision uses "method in ('GET','HEAD')"; this violates the stipulated controller policy.

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

Case contract

Select a redirect rule by explicit priority, specificity and declaration 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, rules, path, method):
    return {'request': request, 'decision': [[r[3] for r in rules if r[0]==path], [r[3] for r in rules if r[2]==method], [r[3] for r in sorted(rules,key=lambda r:r[1])], [r[3] for r in rules], next((r[3] for r in sorted(rules,key=lambda r:r[1]) if r[0]==path and r[2]==method),None), len(rules), sum(r[0]==path and r[2]==method for r in rules), method in ('GET','HEAD'), [r[3] for r in sorted(rules,key=lambda r:r[1]) if r[0]==path and r[2]==method][1:], not any(r[0]==path and r[2]==method for r in rules)]} 
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', 3, 'GET', '/x'], ['/a', 1, 'GET', '/y']], '/a', 'GET'), {'request': '/requests/' + str(N) + '/0', 'decision': [['/x', '/y'], ['/x', '/y'], ['/y', '/x'], ['/x', '/y'], '/y', 2, 2, False, ['/x'], False]})
check('fixture 2', solve('/requests/' + str(N) + '/1', [['/a', 1, 'POST', '/p'], ['/a', 2, 'GET', '/g']], '/a', 'GET'), {'request': '/requests/' + str(N) + '/1', 'decision': [['/p', '/g'], ['/g'], ['/p', '/g'], ['/p', '/g'], '/g', 2, 1, False, [], False]})
check('fixture 3', solve('/requests/' + str(N) + '/2', [['/b', 1, 'GET', '/b'], ['/a', 1, 'GET', '/a']], '/a', 'GET'), {'request': '/requests/' + str(N) + '/2', 'decision': [['/a'], ['/b', '/a'], ['/b', '/a'], ['/b', '/a'], '/a', 2, 1, False, [], False]})
check('fixture 4', solve('/requests/' + str(N) + '/3', [['/a', 1, 'GET', '/x'], ['/a', 1, 'GET', '/y']], '/a', 'GET'), {'request': '/requests/' + str(N) + '/3', 'decision': [['/x', '/y'], ['/x', '/y'], ['/x', '/y'], ['/x', '/y'], '/x', 2, 2, False, ['/y'], False]})
check('fixture 5', solve('/requests/' + str(N) + '/4', [], '/a', 'GET'), {'request': '/requests/' + str(N) + '/4', 'decision': [[], [], [], [], None, 0, 0, False, [], True]})
check('fixture 6', solve('/requests/' + str(N) + '/5', [['/a', 1, 'HEAD', '/h'], ['/ab', 0, 'GET', '/q']], '/ab', 'HEAD'), {'request': '/requests/' + str(N) + '/5', 'decision': [['/q'], ['/h'], ['/q', '/h'], ['/h', '/q'], None, 2, 0, True, [], True]})
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': [['/x', '/y'], ['/x', '/y'], ['/y', '/x'], ['/x', '/y'], '/y', 2, 2, True, ['/x'], False], 'request': '/requests/1/0'}{'decision': [['/x', '/y'], ['/x', '/y'], ['/y', '/x'], ['/x', '/y'], '/y', 2, 2, False, ['/x'], False], 'request': '/requests/1/0'}Failed
fixture 2{'decision': [['/p', '/g'], ['/g'], ['/p', '/g'], ['/p', '/g'], '/g', 2, 1, True, [], False], 'request': '/requests/1/1'}{'decision': [['/p', '/g'], ['/g'], ['/p', '/g'], ['/p', '/g'], '/g', 2, 1, False, [], False], 'request': '/requests/1/1'}Failed
fixture 3{'decision': [['/a'], ['/b', '/a'], ['/b', '/a'], ['/b', '/a'], '/a', 2, 1, True, [], False], 'request': '/requests/1/2'}{'decision': [['/a'], ['/b', '/a'], ['/b', '/a'], ['/b', '/a'], '/a', 2, 1, False, [], False], 'request': '/requests/1/2'}Failed
fixture 4{'decision': [['/x', '/y'], ['/x', '/y'], ['/x', '/y'], ['/x', '/y'], '/x', 2, 2, True, ['/y'], False], 'request': '/requests/1/3'}{'decision': [['/x', '/y'], ['/x', '/y'], ['/x', '/y'], ['/x', '/y'], '/x', 2, 2, False, ['/y'], False], 'request': '/requests/1/3'}Failed
fixture 5{'decision': [[], [], [], [], None, 0, 0, True, [], True], 'request': '/requests/1/4'}{'decision': [[], [], [], [], None, 0, 0, False, [], True], 'request': '/requests/1/4'}Failed
fixture 6{'decision': [['/q'], ['/h'], ['/q', '/h'], ['/h', '/q'], None, 2, 0, True, [], True], 'request': '/requests/1/5'}{'decision': [['/q'], ['/h'], ['/q', '/h'], ['/h', '/q'], None, 2, 0, True, [], True], 'request': '/requests/1/5'}Passed

SHA-256 / da1ab425b1014806da21aeb359ce2e8ecccb9841e6fa117aafe5988b36cd176f

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, rules, path, method):
    return {'request': request, 'decision': [[r[3] for r in rules if r[0]==path], [r[3] for r in rules if r[2]==method], [r[3] for r in sorted(rules,key=lambda r:r[1])], [r[3] for r in rules], next((r[3] for r in sorted(rules,key=lambda r:r[1]) if r[0]==path and r[2]==method),None), len(rules), sum(r[0]==path and r[2]==method for r in rules), False, [r[3] for r in sorted(rules,key=lambda r:r[1]) if r[0]==path and r[2]==method][1:], not any(r[0]==path and r[2]==method for r in rules)]} 
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', 3, 'GET', '/x'], ['/a', 1, 'GET', '/y']], '/a', 'GET'), {'request': '/requests/' + str(N) + '/0', 'decision': [['/x', '/y'], ['/x', '/y'], ['/y', '/x'], ['/x', '/y'], '/y', 2, 2, False, ['/x'], False]})
check('fixture 2', solve('/requests/' + str(N) + '/1', [['/a', 1, 'POST', '/p'], ['/a', 2, 'GET', '/g']], '/a', 'GET'), {'request': '/requests/' + str(N) + '/1', 'decision': [['/p', '/g'], ['/g'], ['/p', '/g'], ['/p', '/g'], '/g', 2, 1, False, [], False]})
check('fixture 3', solve('/requests/' + str(N) + '/2', [['/b', 1, 'GET', '/b'], ['/a', 1, 'GET', '/a']], '/a', 'GET'), {'request': '/requests/' + str(N) + '/2', 'decision': [['/a'], ['/b', '/a'], ['/b', '/a'], ['/b', '/a'], '/a', 2, 1, False, [], False]})
check('fixture 4', solve('/requests/' + str(N) + '/3', [['/a', 1, 'GET', '/x'], ['/a', 1, 'GET', '/y']], '/a', 'GET'), {'request': '/requests/' + str(N) + '/3', 'decision': [['/x', '/y'], ['/x', '/y'], ['/x', '/y'], ['/x', '/y'], '/x', 2, 2, False, ['/y'], False]})
check('fixture 5', solve('/requests/' + str(N) + '/4', [], '/a', 'GET'), {'request': '/requests/' + str(N) + '/4', 'decision': [[], [], [], [], None, 0, 0, False, [], True]})
check('fixture 6', solve('/requests/' + str(N) + '/5', [['/a', 1, 'HEAD', '/h'], ['/ab', 0, 'GET', '/q']], '/ab', 'HEAD'), {'request': '/requests/' + str(N) + '/5', 'decision': [['/q'], ['/h'], ['/q', '/h'], ['/h', '/q'], None, 2, 0, True, [], True]})
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': [['/x', '/y'], ['/x', '/y'], ['/y', '/x'], ['/x', '/y'], '/y', 2, 2, False, ['/x'], False], 'request': '/requests/1/0'}{'decision': [['/x', '/y'], ['/x', '/y'], ['/y', '/x'], ['/x', '/y'], '/y', 2, 2, False, ['/x'], False], 'request': '/requests/1/0'}Passed
fixture 2{'decision': [['/p', '/g'], ['/g'], ['/p', '/g'], ['/p', '/g'], '/g', 2, 1, False, [], False], 'request': '/requests/1/1'}{'decision': [['/p', '/g'], ['/g'], ['/p', '/g'], ['/p', '/g'], '/g', 2, 1, False, [], False], 'request': '/requests/1/1'}Passed
fixture 3{'decision': [['/a'], ['/b', '/a'], ['/b', '/a'], ['/b', '/a'], '/a', 2, 1, False, [], False], 'request': '/requests/1/2'}{'decision': [['/a'], ['/b', '/a'], ['/b', '/a'], ['/b', '/a'], '/a', 2, 1, False, [], False], 'request': '/requests/1/2'}Passed
fixture 4{'decision': [['/x', '/y'], ['/x', '/y'], ['/x', '/y'], ['/x', '/y'], '/x', 2, 2, False, ['/y'], False], 'request': '/requests/1/3'}{'decision': [['/x', '/y'], ['/x', '/y'], ['/x', '/y'], ['/x', '/y'], '/x', 2, 2, False, ['/y'], False], 'request': '/requests/1/3'}Passed
fixture 5{'decision': [[], [], [], [], None, 0, 0, False, [], True], 'request': '/requests/1/4'}{'decision': [[], [], [], [], None, 0, 0, False, [], True], 'request': '/requests/1/4'}Passed
fixture 6{'decision': [['/q'], ['/h'], ['/q', '/h'], ['/h', '/q'], None, 2, 0, False, [], True], 'request': '/requests/1/5'}{'decision': [['/q'], ['/h'], ['/q', '/h'], ['/h', '/q'], None, 2, 0, True, [], True], 'request': '/requests/1/5'}Failed

SHA-256 / b18dc268b91d0c7f47f5d46ce7ac6dfbfdd18d8bba12e1cd5bd15bee48d2b6c6

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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

Case digest / beb8fd24942cc6006957d06f39ba5daf2b83426a99b7659f43d177d2b53d42c7