FAILURE MAP
← Case archive

FA-6641 / HTTP redirects / Open access

A redirect without a fragment inherits the original fragment · case 01

A redirect without a fragment inherits the original fragment.

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

ROOT CAUSE

The faulty implementation uses `location` for the redirect-fragment decision.

THE FAILURE

The faulty implementation uses `location` for the redirect-fragment decision.

Unsuccessful approach: The attempted repair uses `location + ('#' + old.split('#',1)[1] if '#' in old else '')` and still violates a separate fixture.

Case contract

A redirect without a fragment inherits the original fragment: return the result specified by the explicit input/output boundary fixtures.

Why this case matters

This deterministic http redirects model isolates the redirect-fragment policy at a network component boundary.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(old, location):
    return location
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('/a#x', '/b'), '/b#x')", "check('fixture 2', solve('/a#x', '/b#y'), '/b#y')", "check('fixture 3', solve('/a', '/b'), '/b')", "check('fixture 4', solve('/a#x', '/b#'), '/b#')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 2/b#y/b#yPassed
fixture 3/b/bPassed
fixture 4/b#/b#Passed
fixture 1/b/b#xFailed

SHA-256 / 91500471fa8468dc6028f9d81c4d14844eb889c8bee3f44bc74fa583378818c1

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(old, location):
    return location + ('#' + old.split('#',1)[1] if '#' in old else '')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('/a#x', '/b'), '/b#x')", "check('fixture 2', solve('/a#x', '/b#y'), '/b#y')", "check('fixture 3', solve('/a', '/b'), '/b')", "check('fixture 4', solve('/a#x', '/b#'), '/b#')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 2/b#y#x/b#yFailed
fixture 3/b/bPassed
fixture 4/b##x/b#Failed
fixture 1/b#x/b#xPassed

SHA-256 / 9f1b6e65c8b62d80976d56d37fca49481b15d315a9566654c51ebf6166a0f48d

HELD IN THE MEMBER ARCHIVE

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

This mechanism has 4 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

Bounded deterministic policy model over validated inputs; not a complete protocol stack or an interoperability claim. The five variants rotate the same explicit fixture set. 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:38:03.891851+00:00.

Case digest / 8789402dd2fb8f840ce8a00f0f446f38bb0b94fc38bf28bd58077a962f54501a