{"abstract":"Redirect rewriting preserves methods for 307 and 308.","category":"HTTP redirects","checks":4,"contract":"Redirect rewriting preserves methods for 307 and 308: return the result specified by the explicit input/output boundary fixtures.","contract_signature":"status, method","evaluation_group":"xh-redirect-rewrite","failed_approach":"The attempted repair uses `'GET' if status == 303 else method` and still violates a separate fixture.","family":"xh-redirect-rewrite","id":"FA-6631","implementations":{"attempt":{"sha256":"e668ac09e1c8339c199dc68ca03ca2c5b938b2e28d33729464e3de1674e32d2d","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(status, method):\n    return 'GET' if status == 303 else method\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_fixtures = [\"check('fixture 1', solve(307, 'POST'), 'POST')\", \"check('fixture 2', solve(302, 'POST'), 'GET')\", \"check('fixture 3', solve(303, 'HEAD'), 'HEAD')\", \"check('fixture 4', solve(308, 'PUT'), 'PUT')\"]\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":"b99806aabfce9395e6fee2abe3f7e913e49f7197fee947520a9d828c0b79d8fd","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(status, method):\n    return 'GET' if status in (301,302,303,307,308) else method\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_fixtures = [\"check('fixture 1', solve(307, 'POST'), 'POST')\", \"check('fixture 2', solve(302, 'POST'), 'GET')\", \"check('fixture 3', solve(303, 'HEAD'), 'HEAD')\", \"check('fixture 4', solve(308, 'PUT'), 'PUT')\"]\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-redirect-rewrite","generated_at":"2026-09-29T14:38:03.801405+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This deterministic http redirects model isolates the redirect-rewrite policy at a network component boundary.","root_cause":"The faulty implementation uses `'GET' if status in (301,302,303,307,308) else method` for the redirect-rewrite decision.","sha256":"6ab11d9c1e8dff3fff988fc573110b8b8d183aeb4d3656be1d85574a9cfbd640","title":"Redirect rewriting preserves methods for 307 and 308 · 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.828,"exit_code":1,"observations":[{"actual":"POST","check":"fixture 2","expected":"GET","passed":false},{"actual":"GET","check":"fixture 3","expected":"HEAD","passed":false},{"actual":"PUT","check":"fixture 4","expected":"PUT","passed":true},{"actual":"POST","check":"fixture 1","expected":"POST","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": \"POST\", \"expected\": \"GET\", \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": \"GET\", \"expected\": \"HEAD\", \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": \"PUT\", \"expected\": \"PUT\", \"passed\": true}, {\"check\": \"fixture 1\", \"actual\": \"POST\", \"expected\": \"POST\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":36.716,"exit_code":1,"observations":[{"actual":"GET","check":"fixture 2","expected":"GET","passed":true},{"actual":"GET","check":"fixture 3","expected":"HEAD","passed":false},{"actual":"GET","check":"fixture 4","expected":"PUT","passed":false},{"actual":"GET","check":"fixture 1","expected":"POST","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": \"GET\", \"expected\": \"GET\", \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": \"GET\", \"expected\": \"HEAD\", \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": \"GET\", \"expected\": \"PUT\", \"passed\": false}, {\"check\": \"fixture 1\", \"actual\": \"GET\", \"expected\": \"POST\", \"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."}}