{"abstract":"An empty field is confused with an absent field.","category":"HTTP redirects","checks":6,"contract":"Select an unambiguous Location field without losing raw syntax. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.","contract_signature":"request, lines","evaluation_group":"s3-http-redirects-location-lines","failed_approach":"The partial repair uses \"'present' if lines else 'missing'\" and still fails an explicit boundary or control.","family":"s3-http-redirects-location-lines-missing-vs-empty","id":"FA-27861","implementations":{"attempt":{"sha256":"e3b3a72df03abbeeef1f0df66f01453f7bafb5565d3c0c9f019392a145a82c03","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom urllib.parse import urlsplit, unquote, quote\nimport posixpath\nimport re\nN = 1\nobservations = []\ndef solve(request, lines):\n    return {'request': request, 'decision': [[v for k,v in lines if k.lower() == 'location'], len([v for k,v in lines if k.lower() == 'location']) > 1, [v.strip(' \\t') for k,v in lines if k.lower() == 'location'], [v for k,v in lines if k.lower() == 'location'], 'present' if lines else 'missing']} \ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve('/requests/' + str(N) + '/0', [('Location', ' /a,b '), ('X', 'z')]), {'request': '/requests/' + str(N) + '/0', 'decision': [[' /a,b '], False, ['/a,b'], [' /a,b '], 'present']})\ncheck('fixture 2', solve('/requests/' + str(N) + '/1', [('location', '/a b')]), {'request': '/requests/' + str(N) + '/1', 'decision': [['/a b'], False, ['/a b'], ['/a b'], 'present']})\ncheck('fixture 3', solve('/requests/' + str(N) + '/2', [('LOCATION', '')]), {'request': '/requests/' + str(N) + '/2', 'decision': [[''], False, [''], [''], 'present']})\ncheck('fixture 4', solve('/requests/' + str(N) + '/3', [('X', 'z')]), {'request': '/requests/' + str(N) + '/3', 'decision': [[], False, [], [], 'missing']})\ncheck('fixture 5', solve('/requests/' + str(N) + '/4', [('Location', '/a'), ('location', '/b')]), {'request': '/requests/' + str(N) + '/4', 'decision': [['/a', '/b'], True, ['/a', '/b'], ['/a', '/b'], 'present']})\ncheck('fixture 6', solve('/requests/' + str(N) + '/5', []), {'request': '/requests/' + str(N) + '/5', 'decision': [[], False, [], [], 'missing']})\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":"db247d807719c1ce8fc4f1880394d300df73400cc032b30817a3b11e2b239faf","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom urllib.parse import urlsplit, unquote, quote\nimport posixpath\nimport re\nN = 1\nobservations = []\ndef solve(request, lines):\n    return {'request': request, 'decision': [[v for k,v in lines if k.lower() == 'location'], len([v for k,v in lines if k.lower() == 'location']) > 1, [v.strip(' \\t') for k,v in lines if k.lower() == 'location'], [v for k,v in lines if k.lower() == 'location'], 'present' if any(v for k,v in lines if k.lower() == 'location') else 'missing']} \ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve('/requests/' + str(N) + '/0', [('Location', ' /a,b '), ('X', 'z')]), {'request': '/requests/' + str(N) + '/0', 'decision': [[' /a,b '], False, ['/a,b'], [' /a,b '], 'present']})\ncheck('fixture 2', solve('/requests/' + str(N) + '/1', [('location', '/a b')]), {'request': '/requests/' + str(N) + '/1', 'decision': [['/a b'], False, ['/a b'], ['/a b'], 'present']})\ncheck('fixture 3', solve('/requests/' + str(N) + '/2', [('LOCATION', '')]), {'request': '/requests/' + str(N) + '/2', 'decision': [[''], False, [''], [''], 'present']})\ncheck('fixture 4', solve('/requests/' + str(N) + '/3', [('X', 'z')]), {'request': '/requests/' + str(N) + '/3', 'decision': [[], False, [], [], 'missing']})\ncheck('fixture 5', solve('/requests/' + str(N) + '/4', [('Location', '/a'), ('location', '/b')]), {'request': '/requests/' + str(N) + '/4', 'decision': [['/a', '/b'], True, ['/a', '/b'], ['/a', '/b'], 'present']})\ncheck('fixture 6', solve('/requests/' + str(N) + '/5', []), {'request': '/requests/' + str(N) + '/5', 'decision': [[], False, [], [], 'missing']})\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":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"s3-http-redirects-location-lines-missing-vs-empty","generated_at":"2026-09-29T14:41:28.871817+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Models a redirect controller decision before following a target or exposing a redirect result.","root_cause":"The missing-vs-empty decision uses \"'present' if any(v for k,v in lines if k.lower() == 'location') else 'missing'\"; this violates the stipulated controller policy.","sha256":"71ba72b5a4ea2a9e59e7150525caa97e2e755d8fdb2b982757ba092aa47ef2ce","title":"Select an unambiguous Location field without losing raw syntax: missing vs empty · case 01","variant":1,"variant_policy":"N changes request correlation identity. Policy boundary fixtures are reused; numbered variants are not independent examples.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":38.338,"exit_code":1,"observations":[{"actual":{"decision":[[" /a,b "],false,["/a,b"],[" /a,b "],"present"],"request":"/requests/1/0"},"check":"fixture 1","expected":{"decision":[[" /a,b "],false,["/a,b"],[" /a,b "],"present"],"request":"/requests/1/0"},"passed":true},{"actual":{"decision":[["/a b"],false,["/a b"],["/a b"],"present"],"request":"/requests/1/1"},"check":"fixture 2","expected":{"decision":[["/a b"],false,["/a b"],["/a b"],"present"],"request":"/requests/1/1"},"passed":true},{"actual":{"decision":[[""],false,[""],[""],"present"],"request":"/requests/1/2"},"check":"fixture 3","expected":{"decision":[[""],false,[""],[""],"present"],"request":"/requests/1/2"},"passed":true},{"actual":{"decision":[[],false,[],[],"present"],"request":"/requests/1/3"},"check":"fixture 4","expected":{"decision":[[],false,[],[],"missing"],"request":"/requests/1/3"},"passed":false},{"actual":{"decision":[["/a","/b"],true,["/a","/b"],["/a","/b"],"present"],"request":"/requests/1/4"},"check":"fixture 5","expected":{"decision":[["/a","/b"],true,["/a","/b"],["/a","/b"],"present"],"request":"/requests/1/4"},"passed":true},{"actual":{"decision":[[],false,[],[],"missing"],"request":"/requests/1/5"},"check":"fixture 6","expected":{"decision":[[],false,[],[],"missing"],"request":"/requests/1/5"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": {\"request\": \"/requests/1/0\", \"decision\": [[\" /a,b \"], false, [\"/a,b\"], [\" /a,b \"], \"present\"]}, \"expected\": {\"request\": \"/requests/1/0\", \"decision\": [[\" /a,b \"], false, [\"/a,b\"], [\" /a,b \"], \"present\"]}, \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": {\"request\": \"/requests/1/1\", \"decision\": [[\"/a b\"], false, [\"/a b\"], [\"/a b\"], \"present\"]}, \"expected\": {\"request\": \"/requests/1/1\", \"decision\": [[\"/a b\"], false, [\"/a b\"], [\"/a b\"], \"present\"]}, \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": {\"request\": \"/requests/1/2\", \"decision\": [[\"\"], false, [\"\"], [\"\"], \"present\"]}, \"expected\": {\"request\": \"/requests/1/2\", \"decision\": [[\"\"], false, [\"\"], [\"\"], \"present\"]}, \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": {\"request\": \"/requests/1/3\", \"decision\": [[], false, [], [], \"present\"]}, \"expected\": {\"request\": \"/requests/1/3\", \"decision\": [[], false, [], [], \"missing\"]}, \"passed\": false}, {\"check\": \"fixture 5\", \"actual\": {\"request\": \"/requests/1/4\", \"decision\": [[\"/a\", \"/b\"], true, [\"/a\", \"/b\"], [\"/a\", \"/b\"], \"present\"]}, \"expected\": {\"request\": \"/requests/1/4\", \"decision\": [[\"/a\", \"/b\"], true, [\"/a\", \"/b\"], [\"/a\", \"/b\"], \"present\"]}, \"passed\": true}, {\"check\": \"fixture 6\", \"actual\": {\"request\": \"/requests/1/5\", \"decision\": [[], false, [], [], \"missing\"]}, \"expected\": {\"request\": \"/requests/1/5\", \"decision\": [[], false, [], [], \"missing\"]}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.77,"exit_code":1,"observations":[{"actual":{"decision":[[" /a,b "],false,["/a,b"],[" /a,b "],"present"],"request":"/requests/1/0"},"check":"fixture 1","expected":{"decision":[[" /a,b "],false,["/a,b"],[" /a,b "],"present"],"request":"/requests/1/0"},"passed":true},{"actual":{"decision":[["/a b"],false,["/a b"],["/a b"],"present"],"request":"/requests/1/1"},"check":"fixture 2","expected":{"decision":[["/a b"],false,["/a b"],["/a b"],"present"],"request":"/requests/1/1"},"passed":true},{"actual":{"decision":[[""],false,[""],[""],"missing"],"request":"/requests/1/2"},"check":"fixture 3","expected":{"decision":[[""],false,[""],[""],"present"],"request":"/requests/1/2"},"passed":false},{"actual":{"decision":[[],false,[],[],"missing"],"request":"/requests/1/3"},"check":"fixture 4","expected":{"decision":[[],false,[],[],"missing"],"request":"/requests/1/3"},"passed":true},{"actual":{"decision":[["/a","/b"],true,["/a","/b"],["/a","/b"],"present"],"request":"/requests/1/4"},"check":"fixture 5","expected":{"decision":[["/a","/b"],true,["/a","/b"],["/a","/b"],"present"],"request":"/requests/1/4"},"passed":true},{"actual":{"decision":[[],false,[],[],"missing"],"request":"/requests/1/5"},"check":"fixture 6","expected":{"decision":[[],false,[],[],"missing"],"request":"/requests/1/5"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": {\"request\": \"/requests/1/0\", \"decision\": [[\" /a,b \"], false, [\"/a,b\"], [\" /a,b \"], \"present\"]}, \"expected\": {\"request\": \"/requests/1/0\", \"decision\": [[\" /a,b \"], false, [\"/a,b\"], [\" /a,b \"], \"present\"]}, \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": {\"request\": \"/requests/1/1\", \"decision\": [[\"/a b\"], false, [\"/a b\"], [\"/a b\"], \"present\"]}, \"expected\": {\"request\": \"/requests/1/1\", \"decision\": [[\"/a b\"], false, [\"/a b\"], [\"/a b\"], \"present\"]}, \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": {\"request\": \"/requests/1/2\", \"decision\": [[\"\"], false, [\"\"], [\"\"], \"missing\"]}, \"expected\": {\"request\": \"/requests/1/2\", \"decision\": [[\"\"], false, [\"\"], [\"\"], \"present\"]}, \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": {\"request\": \"/requests/1/3\", \"decision\": [[], false, [], [], \"missing\"]}, \"expected\": {\"request\": \"/requests/1/3\", \"decision\": [[], false, [], [], \"missing\"]}, \"passed\": true}, {\"check\": \"fixture 5\", \"actual\": {\"request\": \"/requests/1/4\", \"decision\": [[\"/a\", \"/b\"], true, [\"/a\", \"/b\"], [\"/a\", \"/b\"], \"present\"]}, \"expected\": {\"request\": \"/requests/1/4\", \"decision\": [[\"/a\", \"/b\"], true, [\"/a\", \"/b\"], [\"/a\", \"/b\"], \"present\"]}, \"passed\": true}, {\"check\": \"fixture 6\", \"actual\": {\"request\": \"/requests/1/5\", \"decision\": [[], false, [], [], \"missing\"]}, \"expected\": {\"request\": \"/requests/1/5\", \"decision\": [[], false, [], [], \"missing\"]}, \"passed\": true}], \"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."}}