{"abstract":"A relative Location resolves against the current request URL.","category":"HTTP redirects","checks":4,"contract":"A relative Location resolves against the current request URL: return the result specified by the explicit input/output boundary fixtures.","contract_signature":"base, location","evaluation_group":"xh-relative-location","failed_approach":"The attempted repair uses `base.rstrip('/') + '/' + location.lstrip('/')` and still violates a separate fixture.","family":"xh-relative-location","id":"FA-6636","implementations":{"attempt":{"sha256":"58b12b069815d8301abd561b3f6c0292a1fb29ab9bc2d01ac53aaed17d9aedc2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport ipaddress\nimport re\nfrom urllib.parse import urlsplit, urljoin\nN = 1\nobservations = []\ndef solve(base, location):\n    return base.rstrip('/') + '/' + location.lstrip('/')\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_fixtures = [\"check('fixture 1', solve('https://h/a/b', '../c'), 'https://h/c')\", \"check('fixture 2', solve('https://h/a/b', '/c'), 'https://h/c')\", \"check('fixture 3', solve('https://h/a', 'https://z/x'), 'https://z/x')\", \"check('fixture 4', solve('https://h/a', '?q=1'), 'https://h/a?q=1')\"]\nfor _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:\n    exec(_line)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"32aa69cd7acb96557ae55f17cfd6f70a6f8fb3b18d6c4fdb633c2751344ee4d2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport ipaddress\nimport re\nfrom urllib.parse import urlsplit, urljoin\nN = 1\nobservations = []\ndef solve(base, location):\n    return location\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_fixtures = [\"check('fixture 1', solve('https://h/a/b', '../c'), 'https://h/c')\", \"check('fixture 2', solve('https://h/a/b', '/c'), 'https://h/c')\", \"check('fixture 3', solve('https://h/a', 'https://z/x'), 'https://z/x')\", \"check('fixture 4', solve('https://h/a', '?q=1'), 'https://h/a?q=1')\"]\nfor _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:\n    exec(_line)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"xh-relative-location","generated_at":"2026-09-29T14:38:03.801520+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This deterministic http redirects model isolates the relative-location policy at a network component boundary.","root_cause":"The faulty implementation uses `location` for the relative-location decision.","sha256":"ebbcd5ea609b8e8b6d4e16837ce4930f39709ed5a35cd92905c86345342cce57","title":"A relative Location resolves against the current request URL · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":37.509,"exit_code":1,"observations":[{"actual":"https://h/a/b/c","check":"fixture 2","expected":"https://h/c","passed":false},{"actual":"https://h/a/https://z/x","check":"fixture 3","expected":"https://z/x","passed":false},{"actual":"https://h/a/?q=1","check":"fixture 4","expected":"https://h/a?q=1","passed":false},{"actual":"https://h/a/b/../c","check":"fixture 1","expected":"https://h/c","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": \"https://h/a/b/c\", \"expected\": \"https://h/c\", \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": \"https://h/a/https://z/x\", \"expected\": \"https://z/x\", \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": \"https://h/a/?q=1\", \"expected\": \"https://h/a?q=1\", \"passed\": false}, {\"check\": \"fixture 1\", \"actual\": \"https://h/a/b/../c\", \"expected\": \"https://h/c\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":36.451,"exit_code":1,"observations":[{"actual":"/c","check":"fixture 2","expected":"https://h/c","passed":false},{"actual":"https://z/x","check":"fixture 3","expected":"https://z/x","passed":true},{"actual":"?q=1","check":"fixture 4","expected":"https://h/a?q=1","passed":false},{"actual":"../c","check":"fixture 1","expected":"https://h/c","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": \"/c\", \"expected\": \"https://h/c\", \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": \"https://z/x\", \"expected\": \"https://z/x\", \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": \"?q=1\", \"expected\": \"https://h/a?q=1\", \"passed\": false}, {\"check\": \"fixture 1\", \"actual\": \"../c\", \"expected\": \"https://h/c\", \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}